# Perceptlayer: full text Generated from https://perceptlayer.com. Each section is a page's markdown copy. --- title: "Pricing | Perceptlayer" description: "100 free credits on signup. Credit packs from $15, down to $0.60 per 1,000 calls, with 5 to 300 requests a second. Failed calls are free." url: https://perceptlayer.com/pricing --- Pricing # Pay for data, not for errors Prepaid credits, no subscription. One successful call costs one credit on nearly every endpoint, and failed calls are free. ## Credit packs ### Free $0 100 credits on signup - 1 request a second - Every API in the catalogue - No card on file [Get a free API key](https://perceptlayer.com/signup) ### Starter $15 once $1.50 per 1,000 calls - 10,000 credits - 5 requests a second included - Up to 25 requests a second at checkout - Credits last 12 months [Buy Starter](https://perceptlayer.com/dashboard#buy) ### Build $59 once $1.18 per 1,000 calls - 50,000 credits - 5 requests a second included - Up to 50 requests a second at checkout - Credits last 12 months [Buy Build](https://perceptlayer.com/dashboard#buy) ### Growth $199 once $1.00 per 1,000 calls - 200,000 credits - 5 requests a second included - Up to 100 requests a second at checkout - Credits last 12 months [Buy Growth](https://perceptlayer.com/dashboard#buy) ### Pro $399 once $0.80 per 1,000 calls - 500,000 credits - 5 requests a second included - Up to 100 requests a second at checkout - Credits last 12 months [Buy Pro](https://perceptlayer.com/dashboard#buy) ### Scale $699 once $0.70 per 1,000 calls - 1,000,000 credits - 10 requests a second included - Up to 300 requests a second at checkout - Credits last 12 months [Buy Scale](https://perceptlayer.com/dashboard#buy) ### Volume $2,999 once $0.60 per 1,000 calls - 5,000,000 credits - 20 requests a second included - Up to 300 requests a second at checkout - Credits last 12 months [Buy Volume](https://perceptlayer.com/dashboard#buy) ### Volume 10M $5,999 once $0.60 per 1,000 calls - 10,000,000 credits - 25 requests a second included - Up to 300 requests a second at checkout - Credits last 12 months [Buy Volume 10M](https://perceptlayer.com/dashboard#buy) ### Volume 25M $14,999 once $0.60 per 1,000 calls - 25,000,000 credits - 25 requests a second included - Up to 300 requests a second at checkout - Credits last 12 months [Buy Volume 25M](https://perceptlayer.com/dashboard#buy) ### Volume 50M $29,999 once $0.60 per 1,000 calls - 50,000,000 credits - 50 requests a second included - Up to 300 requests a second at checkout - Credits last 12 months [Buy Volume 50M](https://perceptlayer.com/dashboard#buy) ### Custom Talk to us Over 50,000,000 credits or 300 requests a second - Credits and rate sized to your workload - Every API in the catalogue - Failed calls stay free [Contact us](https://perceptlayer.com/contact) Request rate ## Every pack includes a request rate Bigger packs include a faster rate: 5 requests a second on the smaller packs, up to 50 on Volume 50M. Need more speed than a pack includes? Pick a faster rate at checkout, up to 25 a second on Starter, 50 on Build, 100 from Growth and 300 from Scale. It costs extra, as a share of the pack price: 20% per doubling up to 50 a second, 40% from 50 to 100 and 60% above 100. Limits apply to the whole account, across all its keys, and are counted per minute: 5 requests a second is 300 a minute. Credits bought at a faster rate are used first, and your account runs at the rate of the credits it is using. When those run out it returns to 5 a second. Free accounts get 1 request a second. | Pack | 5/s | 10/s | 20/s | 25/s | 50/s | 100/s | 300/s | | --- | --- | --- | --- | --- | --- | --- | --- | | Starter 10,000 | $15 included | $18 | $21 | $22 | – | – | – | | Build 50,000 | $59 included | $71 | $83 | $86 | $98 | – | – | | Growth 200,000 | $199 included | $239 | $279 | $291 | $331 | $411 | – | | Pro 500,000 | $399 included | $479 | $559 | $584 | $664 | $824 | – | | Scale 1,000,000 | – | $699 included | $839 | $884 | $1,024 | $1,303 | $1,968 | | Volume 5,000,000 | – | – | $2,999 included | $3,192 | $3,792 | $4,991 | $7,843 | | Volume 10M 10,000,000 | – | – | – | $5,999 included | $7,199 | $9,598 | $15,303 | | Volume 25M 25,000,000 | – | – | – | $14,999 included | $17,999 | $23,998 | $38,262 | | Volume 50M 50,000,000 | – | – | – | – | $29,999 included | $41,999 | $70,527 | How it works ## From sign-up to data in three steps 1. 01 ### Create a key Sign up with your email and verify it. Your account starts with 100 free credits. ``` X-API-Key: sk_live_… ``` 2. 02 ### Call any endpoint Send your key in a header. Parameters go in the query string, and results come back as JSON. ``` GET /v1/zillow/search?latitude=47.6062&longitude=-122.3321&radius_mi=5&listing_category=category1&page_size=20 ``` 3. 03 ### See what each call cost A successful call costs one credit. Failed calls are free, and every response tells you what it cost. ``` X-Credits-Used: 1 X-Credits-Remaining: 999 ``` FAQ ## Questions **Is there a subscription?** No. You buy credit packs when you need them and spend them at your own pace. **Which calls are charged?** Only calls that return data. Invalid parameters, no data for a query, rate limits and source outages all cost nothing, and every response reports its cost in the X-Credits-Used header. **What if I need more requests a second?** Pick a faster rate when you buy a pack, up to 25 a second on Starter, 50 on Build, 100 from Growth and 300 from Scale. It costs extra, as a share of the pack price: 20% per doubling up to 50 a second, 40% from 50 to 100 and 60% above 100. Above 300 a second, contact us. Credits bought at a faster rate are used first. Over your rate, calls return 429 with a Retry-After header and cost nothing. **How long do credits last?** Credits from packs last 12 months from purchase. Credits bought at a faster rate are spent first, then the oldest. The 100 free credits are granted once, on signup. **How do taxes and invoices work?** Our payment provider calculates taxes at checkout and issues your invoice. **Can I get a refund?** Within 14 days of purchase we refund the unused part of a pack, pro rata. See the refund policy for details. **Do I need a separate key for each website?** No. One key works for all 480 websites and every endpoint, and every call draws on the same credit balance. **What do responses look like?** JSON, with no HTML to parse. Fields differ by source, and every API page shows a recorded example and lists its parameters. **Can AI agents use the API?** Yes. Our MCP server lets an agent search the catalogue, read an endpoint's parameters and call it with your key. Searching and reading are free; calls cost the same credits as the API. **What happens when I run out of credits?** Calls return 402 insufficient\_credits until you buy a pack. Free credits are granted once: 100 when you verify your email. --- title: "Discogs API: Releases and Marketplace Data as JSON" description: "Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master_id and have/want counts, 1 to 2 credits a call." url: https://perceptlayer.com/blog/discogs-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Discogs API: Releases and Marketplace Data as JSON 18 Nov 2026 Perceptlayer 7 min read The Discogs API on Perceptlayer is three endpoints that return Discogs data as JSON: `search` finds releases, masters, artists and labels, `release` looks up one release by `id`, and `marketplace` returns listings for a `release_id`. Search and marketplace cost 1 credit per successful call, and release costs 1–2 credits. This guide shows each request, the parameters, a recorded vinyl search, and what a daily record-price tracker costs per release. ## Key takeaways - `GET /v1/discogs/search` has no required parameters and filters on `q`, `type`, `format`, `genre`, `style`, `year` and `country`, with `page` and `per_page` for paging. It costs 1 credit. - Each search result carries `id`, `title`, `year`, `country`, `master_id`, `formats`, `labels`, `catalog_number`, `barcodes` and `community.have` and `community.want`. - `GET /v1/discogs/release` takes a required `id` plus `currency` and `include_sales_stats`, and costs 1–2 credits; `GET /v1/discogs/marketplace` takes a required `release_id` plus condition, currency and shipping filters, and costs 1 credit. - A daily price check on one release, with one release call and one marketplace call, costs 2 to 3 credits a day. Tracking 100 releases for 30 days costs 6,000 to 9,000 credits, within the Starter pack's 10,000. - Failed calls cost nothing and return `X-Credits-Used: 0`; the `X-Credits-Used` header on a successful call tells you what that call cost. ## Which Discogs endpoints are there? There are three Discogs endpoints, all `GET`, all on the standard tier. Search is the entry point when you have an artist, title or barcode-style query; release gives you one release by its numeric `id`; marketplace gives you listings for one release. Search and marketplace cost 1 credit per successful call, and release costs 1–2 credits. | Endpoint | What it's for | Credits | Required | Optional | | --- | --- | --- | --- | --- | | `GET /v1/discogs/search` | Releases, masters, artists or labels | 1 | none | `q`, `type`, `format`, `genre`, `style`, `year`, `country`, `page`, `per_page` | | `GET /v1/discogs/release` | One release | 1–2 | `id` | `currency`, `include_sales_stats` | | `GET /v1/discogs/marketplace` | Marketplace listings for a release | 1 | `release_id` | `condition`, `sleeve_condition`, `currency`, `ships_from`, `limit`, `cursor` | Each endpoint has its own page with the playground: [search](https://perceptlayer.com/apis/discogs/search), [release](https://perceptlayer.com/apis/discogs/release) and [marketplace](https://perceptlayer.com/apis/discogs/marketplace). The [Discogs API page](https://perceptlayer.com/apis/discogs) lists all three together. This guide covers what Perceptlayer returns; if you're also weighing Discogs' own developer offering, compare its terms and limits yourself. ## How do you search Discogs releases? Send a `GET` request to `https://api.perceptlayer.com/v1/discogs/search` with your filters and your key in the `X-API-Key` header. The recorded request below searches for `nirvana`, limits results to `type=release` and `format=vinyl`, and asks for 5 results a page. It costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/discogs/search?q=nirvana&type=release&format=vinyl&per_page=5" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, the key can go in the `api_key` query parameter; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a job can log what each call cost and what's left. ### Which search parameters can you use? Every search parameter is optional, so a call can filter on text, on catalogue facets, or on both. The table lists each parameter with the constraint the API documents. Defaults and page sizes aren't documented, so set `type` and `per_page` explicitly in scheduled jobs. | Parameter | Type | Documented constraint | | --- | --- | --- | | `q` | string | Up to 200 characters | | `type` | string | One of `release`, `master`, `artist`, `label` | | `format` | string | Up to 100 characters | | `genre` | string | Up to 100 characters | | `style` | string | Up to 100 characters | | `year` | integer | No further constraint documented | | `country` | string | Up to 100 characters | | `page` | integer | No further constraint documented | | `per_page` | integer | No further constraint documented | ## What does the search response contain? The response holds the query context, a `results` array of releases, and a `pagination` block with `page`, `per_page`, `pages` and `total`. The recorded vinyl search for `nirvana` reports 3,587 matching releases across 718 pages. This is the recorded response, trimmed to two results: ```json { "success": true, "data": { "query": "nirvana", "type": "release", "results": [ { "id": 7445961, "type": "release", "title": "Nirvana - Nirvana", "year": 2015, "country": "Europe", "url": "https://www.discogs.com/release/7445961-Nirvana-Nirvana", "master_id": 42476, "formats": ["Vinyl", "LP"], "labels": ["DGC", "Sub Pop"], "genres": ["Rock"], "styles": ["Grunge", "Alternative Rock"], "catalog_number": "0602547378781", … "community": { "have": 22869, "want": 1807 } }, { "id": 7802791, … "year": 2015, "country": "US", "master_id": 42476, "labels": ["Geffen Records", "Sub Pop"], "catalog_number": "B0023396-01", … "community": { "have": 10779, "want": 755 } } ], "pagination": { "page": 1, "per_page": 5, "pages": 718, "total": 3587 } }, "meta": { "endpoint_family": "search", "credits_charged": 1, … } } ``` | Field | What it tells you | | --- | --- | | `id` | The release's numeric identifier | | `master_id` | Groups pressings of the same record: both results share `42476` | | `year`, `country` | Which pressing this is (here, a 2015 Europe and a 2015 US release) | | `labels`, `catalog_number`, `barcodes` | How to tell pressings apart on the shelf | | `community.have`, `community.want` | The community's have and want counts for the release | | `pagination.pages`, `pagination.total` | How much more there is to page through | Two details matter for collectors and price trackers. The two results are different pressings of one record: same `master_id`, different `country`, `labels` and `catalog_number`. A tracker should key on `id`, not on title. And `community.want` against `community.have` is a rough demand signal: 1,807 wants to 22,869 haves for the Europe pressing, 755 to 10,779 for the US one. ## How do you look up a release and its listings? Once you have a release `id`, call `release` for that one release and `marketplace` for its listings. The search result's `id` and the `release` endpoint's `id` parameter share a name, and `marketplace` takes an integer `release_id`; the names match, though we don't have a recording of the hand-off. Try the recorded `7445961` on both endpoint pages in the playground to see the fields before you build on them. ```bash curl "https://api.perceptlayer.com/v1/discogs/release?id=7445961¤cy=EUR" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/discogs/marketplace?release_id=7445961&condition=near_mint¤cy=EUR" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for either endpoint, so this guide doesn't show their fields. The parameters are documented: | Endpoint | Parameter | Documented constraint | | --- | --- | --- | | `release` | `id` | Integer, required | | `release` | `currency` | One of `USD`, `EUR`, `GBP`, `AUD`, `CAD`, `JPY`, `CHF`, `MXN`, `BRL`, `NZD`, `SEK`, `ZAR` | | `release` | `include_sales_stats` | Boolean | | `marketplace` | `release_id` | Integer, required | | `marketplace` | `condition` | One of `mint`, `near_mint`, `very_good_plus`, `very_good`, `good_plus`, `good`, `fair`, `poor` | | `marketplace` | `sleeve_condition` | The same grades, plus `generic`, `not_graded`, `no_cover` | | `marketplace` | `currency` | Same list as `release` | | `marketplace` | `ships_from` | String, up to 60 characters | | `marketplace` | `limit` | Integer | | `marketplace` | `cursor` | String, up to 300 characters | The `release` endpoint costs 1–2 credits per successful call. Read `X-Credits-Used` on each response rather than assuming either figure. When you store marketplace data, keep the listing fields you need and leave seller names out. ## How do you build a record-price tracker? A record-price tracker resolves each record to a release `id` once, then checks the release and its marketplace listings on a schedule. The resolving step uses `search`, whose fields are recorded, so the script below stores them in SQLite along with `community.have` and `community.want`, which you can chart as a demand signal over time. ```python import datetime import os import sqlite3 import time import requests API_KEY = os.environ["API_KEY"] BASE = "https://api.perceptlayer.com/v1/discogs" WATCH = ["nirvana nevermind", "radiohead ok computer"] def get(path, params, attempts=3): for _ in range(attempts): r = requests.get(f"{BASE}/{path}", params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json(), r.headers.get("X-Credits-Used") raise RuntimeError(f"gave up on {path} {params}") db = sqlite3.connect("records.db") db.execute("""CREATE TABLE IF NOT EXISTS releases ( day TEXT, query TEXT, id INTEGER, master_id INTEGER, title TEXT, year INTEGER, country TEXT, catalog_number TEXT, have INTEGER, want INTEGER, PRIMARY KEY (day, id))""") today = datetime.date.today().isoformat() for q in WATCH: body, credits = get("search", {"q": q, "type": "release", "format": "vinyl", "per_page": 5}) for item in body["data"]["results"]: community = item.get("community", {}) db.execute("INSERT OR REPLACE INTO releases VALUES (?,?,?,?,?,?,?,?,?,?)", ( today, q, item["id"], item.get("master_id"), item.get("title"), item.get("year"), item.get("country"), item.get("catalog_number"), community.get("have"), community.get("want"))) print(q, "credits used:", credits) time.sleep(1) db.commit() ``` From those rows, pick the pressings you care about and add their `id` values to a second job that calls `release` and `marketplace` once a day each. Look at one response of each in the playground first and add the price and condition columns you see there. The one-second pause keeps the script within the free tier's 1 request a second; a paying account runs at least 5 a second. ### What should the job do with errors? Every error comes back with an HTTP status and a JSON body with `code`, `message` and `request_id`. The script waits on `rate_limited` (429) and `temporarily_unavailable` (503) using `Retry-After`. Treat `not_found` (404) as a release `id` to check and `invalid_parameters` (422) as a bug in your parameters, such as a `condition` outside the documented grades. Requests have no idempotency key, so a client timeout may hide a call that succeeded and was billed. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking record prices cost? Tracking one release costs the release call plus the marketplace call for each check: 1–2 credits plus 1 credit, so 2 to 3 credits per release per day. The one-time search to resolve each record costs 1 credit per query. Only successful calls are billed, so a retry after a failure doesn't double the bill. | Plan | Arithmetic | Credits | | --- | --- | --- | | Resolve 100 records with `search` | 100 × 1 credit, once | 100 | | 100 releases, `marketplace` only, daily for 30 days | 100 × 30 × 1 credit | 3,000 | | 100 releases, `release` and `marketplace` daily for 30 days | 100 × 30 × (1–2 + 1) credits | 6,000 to 9,000 | | 500 releases, `marketplace` only, daily for 30 days | 500 × 30 × 1 credit | 15,000 | The 100 free credits on signup cover resolving 100 records, or a week of daily `release` and `marketplace` checks on 4 releases (at most 4 × 7 × 3 = 84 credits). The 100-release plans fit the Starter pack's 10,000 credits, and 500 releases fit the Build pack's 50,000. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To try it, run `search` with a record you own in the playground on the [Discogs API page](https://perceptlayer.com/apis/discogs), then call `marketplace` with its `id` and see what comes back. When the fields fit, [get a free API key](https://perceptlayer.com/signup) and schedule the script. More guides like this one are in the [API guides](https://perceptlayer.com/blog/category/api-guides) category. ## APIs in this post - [Discogs **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/discogs) ## Frequently asked questions ### How much does a Discogs API call cost? On Perceptlayer, `search` and `marketplace` cost 1 credit per successful call, and `release` costs 1–2 credits. Failed calls cost nothing and return `X-Credits-Used: 0`, and every successful response carries `X-Credits-Used`, so you can log the exact cost of each call. The pricing page lists what credit packs cost. ### Can I search Discogs by barcode or catalogue number? The `search` endpoint takes `q` as free text up to 200 characters, plus `type`, `format`, `genre`, `style`, `year` and `country`. Results carry `catalog_number` and `barcodes`, so you can check a match against what's on your sleeve. Whether a barcode in `q` finds the release is worth testing in the playground with a record you have. ### How do I tell pressings of the same record apart? Use `master_id` to group them and `id` to tell them apart. In the recorded vinyl search, two results share `master_id` 42476 but differ in `country` (Europe and US), `labels` and `catalog_number`. Key your tracker on the release `id`, since prices and demand differ between pressings. ### Can I filter marketplace listings by condition and currency? Yes. `GET /v1/discogs/marketplace` takes `condition` (from `mint` down to `poor`), `sleeve_condition` (the same grades plus `generic`, `not_graded` and `no_cover`), `currency` (12 currencies including `USD`, `EUR` and `GBP`), `ships_from`, `limit` and `cursor`. Each call costs 1 credit. ### How fast can a Discogs tracking job run? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute). Paying accounts run at least 5 a second (300 a minute), so 100 releases with two calls each finish in about 40 seconds. A 429 carries `Retry-After`; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. discogs vinyl music data record prices marketplace ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Nov 2026 Perceptlayer 7 min read ## [Spotify Scraper or API: What You Get](https://perceptlayer.com/blog/spotify-scraper-vs-api) A Spotify scraper vs 18 Spotify endpoints: playlist-tracks at 1–10 credits, charts at 1–10, top tracks at 1, and how to budget a playlist and chart tracker. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Oct 2026 Updated 12 Nov 2026 Perceptlayer 8 min read ## [Spotify API: Official Web API vs Public Music Data](https://perceptlayer.com/blog/spotify-api-public-music-data) The Spotify Web API needs an OAuth app and limits new apps; 18 public-data endpoints cover artists, top tracks, playlists and charts, most at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. --- title: "Google Books Data as JSON: Search, ISBN and Volumes" description: "Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn_13, page_count and categories as JSON at 1 credit a call." url: https://perceptlayer.com/blog/google-books-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Books Data as JSON: Search, ISBN and Volumes 18 Nov 2026 Perceptlayer 7 min read If you want a Google Books API that returns clean JSON with one key, Perceptlayer has three endpoints for it: `search` finds books by author, title, subject, publisher or ISBN, `isbn` looks up one book by ISBN, and `volume` returns one book by its volume `id`. Each costs 1 credit per successful call. This guide shows the requests, the parameters, a recorded search for Dune, and how to enrich a catalogue or reading list by ISBN with the cost per book. ## Key takeaways - `GET /v1/google-books/search` has no required parameters; `author`, `title`, `subject`, `publisher`, `isbn` and `q` filter results, and `page` and `limit` control paging. - A recorded search with `author=frank herbert`, `title=dune` and `limit=2` returned `total_results: 101`, `has_next: true` and two items with `id`, `title`, `authors`, `publisher`, `published_date`, `categories` and cover URLs. - Fields vary by book: the first recorded item has `isbn_10` and `isbn_13` but no `page_count`; the second has `page_count: 510` and `average_rating: 4.2` but no ISBN fields. - `GET /v1/google-books/isbn` takes a required `isbn`, and `GET /v1/google-books/volume` takes a required `id`. All three endpoints cost 1 credit. - Enriching 2,000 books by ISBN once costs 2,000 × 1 = 2,000 credits; the 100 free credits on signup cover a 100-book reading list. ## Which Google Books endpoints are there? There are three, all `GET`, all on the standard tier, all 1 credit per successful call. Use `search` when you have an author, title or subject; use `isbn` when you already have an ISBN; use `volume` when you have a volume `id` from an earlier result. Failed calls cost nothing and return `X-Credits-Used: 0`. | Endpoint | What it's for | Credits | Required | Optional | | --- | --- | --- | --- | --- | | `GET /v1/google-books/search` | Books matching your filters | 1 | none | `q`, `author`, `title`, `publisher`, `subject`, `isbn`, `free_only`, `page`, `limit`, language, print type, filter and sort parameters, `country` | | `GET /v1/google-books/isbn` | One book by ISBN | 1 | `isbn` | none | | `GET /v1/google-books/volume` | One book by volume id | 1 | `id` | none | Each has its own page with the playground: [search](https://perceptlayer.com/apis/google-books/search), [isbn](https://perceptlayer.com/apis/google-books/isbn) and [volume](https://perceptlayer.com/apis/google-books/volume), and the [Google Books API page](https://perceptlayer.com/apis/google-books) lists them together. This guide covers what Perceptlayer returns. Google also publishes its own Books API; if you're choosing between the two, compare its keys, quotas and terms with what's here yourself. ## How do you search for a book? Send a `GET` request to `https://api.perceptlayer.com/v1/google-books/search` with your filters and your key in the `X-API-Key` header. The recorded request below asks for books by Frank Herbert with "dune" in the title, two results a page, and costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/google-books/search?author=frank+herbert&title=dune&limit=2" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, the key can go in the `api_key` query parameter; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a batch job can log what it spent. ### Which search parameters can you use? All search parameters are optional, and the API documents their types and length limits but not their defaults or page sizes. The table lists them. Several names look related, such as `language`, `lang`, `lr` and `langRestrict`, or `sort` and `orderby`; the documentation gives only their types, so test the one you plan to use in the playground and keep it fixed in your job. | Parameter | Type | Documented constraint | | --- | --- | --- | | `q` | string | Up to 300 characters | | `author` | string | Up to 150 characters | | `title` | string | Up to 200 characters | | `publisher` | string | Up to 150 characters | | `subject` | string | Up to 150 characters | | `isbn` | string | No further constraint documented | | `free_only` | boolean | No further constraint documented | | `page`, `limit` | integer | No further constraint documented | | `language`, `lang`, `lr`, `langRestrict` | string | No further constraint documented | | `print_type`, `printType`, `ebooks`, `filter` | string | No further constraint documented | | `sort`, `orderby`, `country` | string | No further constraint documented | ## What does the search response contain? The response holds the query as it was run, the total match count, paging flags and an `items` array of books. In the recording, `author` and `title` came back combined in `query` as `inauthor:"frank herbert" intitle:dune`, with 101 matches and `has_next: true`. This is the recorded response, trimmed: ```json { "success": true, "data": { "query": "inauthor:\"frank herbert\" intitle:dune", "total_results": 101, "page": 1, "limit": 2, "has_next": true, "items": [ { "id": "DxmKzQEACAAJ", "title": "Dune", "authors": ["Frank Herbert"], "publisher": "Hodder Paperbacks", "published_date": "2021-01-27", "description": "Before The Matrix, before Star Wars, before Ender's Game and Neuromancer, there was Dune, …", "print_type": "book", "isbn_10": "1529347858", "isbn_13": "9781529347852", "language": "en", "categories": ["Fiction"], "viewability": "none", … "cover_url": "https://books.google.com/books/content?id=DxmKzQEACAAJ&printsec=frontcover&img=1&zoom=1", "info_url": "https://books.google.com/books?id=DxmKzQEACAAJ", … }, { "id": "i9-wAAAAIAAJ", "title": "Chapterhouse, Dune", "authors": ["Frank Herbert"], "publisher": "Putnam Publishing Group", "published_date": "1985", … "page_count": 510, "language": "en", "categories": ["Fiction"], "average_rating": 4.2, … } ] }, "meta": { "endpoint_family": "search", "credits_charged": 1, … } } ``` | Field | Notes from the recording | | --- | --- | | `id` | The volume id, such as `DxmKzQEACAAJ` | | `title`, `authors`, `publisher` | Present on both items | | `published_date` | A full date ( `2021-01-27`) on one item, a year ( `1985`) on the other | | `isbn_10`, `isbn_13` | Present on the first item only | | `page_count`, `average_rating` | Present on the second item only | | `categories`, `language`, `print_type` | Present on both items | | `thumbnail_url`, `cover_url`, `info_url`, `preview_url` | Links to the cover and the book's page | | `viewability`, `embeddable`, `open_access` | Present on both items | Three details matter when you store this. Fields are optional per book, so read every field with a fallback. `published_date` isn't always a full date, so store it as text, or parse the year separately. And the first item's `description` ends with `…` in the recording, so check whether `volume` returns longer text before you rely on it for display. ## How do you look up a book by ISBN or volume id? When you already know the book, skip search and call `isbn` with the ISBN or `volume` with the volume `id`. Each takes one required parameter and costs 1 credit. The search result's `id` and the `volume` endpoint's `id` parameter share a name; try the recorded `DxmKzQEACAAJ` on the volume page in the playground to see its fields before you build on them. ```bash curl "https://api.perceptlayer.com/v1/google-books/isbn?isbn=9781529347852" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/google-books/volume?id=DxmKzQEACAAJ" \ -H "X-API-Key: $API_KEY" ``` We don't have recorded responses for `isbn` or `volume`, so this guide doesn't show their fields. `isbn` accepts a string of up to 300 characters, and `volume` takes the `id` as a string. The ISBN in the request above is the `isbn_13` from the recorded search. ## How do you enrich a reading list by ISBN? To enrich a list of ISBNs, send one call per ISBN and write the fields you get back next to each one. The script below uses the `search` endpoint with its `isbn` parameter, because its response fields are recorded, and writes a CSV row per ISBN. Swap in the `isbn` endpoint once you've checked its response in the playground; the cost is the same 1 credit per book. ```python import csv import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/google-books/search" ISBNS = ["9781529347852", "9780441013593"] FIELDS = ["id", "title", "publisher", "published_date", "isbn_13", "page_count", "language", "average_rating", "cover_url"] def fetch(isbn, attempts=3): for _ in range(attempts): r = requests.get(URL, params={"isbn": isbn, "limit": 1}, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"].get("items", []) raise RuntimeError(f"gave up on {isbn}") with open("books.csv", "w", newline="") as f: out = csv.writer(f) out.writerow(["isbn", "authors", "categories"] + FIELDS) for isbn in ISBNS: items = fetch(isbn) if not items: out.writerow([isbn, "", ""] + ["not found"] + [""] * (len(FIELDS) - 1)) else: book = items[0] out.writerow([isbn, "; ".join(book.get("authors", [])), "; ".join(book.get("categories", []))] + [book.get(k, "") for k in FIELDS]) time.sleep(1) ``` Every field is read with a fallback, since the recording shows `isbn_13`, `page_count` and `average_rating` missing on some items. The one-second pause keeps the script within the free tier's 1 request a second; a paying account runs at least 5 a second. An ISBN that returns no items is written as "not found" rather than guessed. ### What should the job do with errors? Every error comes back with an HTTP status and a JSON body with `code`, `message` and `request_id`. The script waits on `rate_limited` (429) and `temporarily_unavailable` (503) using `Retry-After`. Treat `invalid_parameters` (422) as a malformed ISBN to clean up, and `source_error` (502) as a book to retry later. Requests have no idempotency key, so a client timeout may hide a call that succeeded and was billed. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does enriching books cost? Enriching books costs 1 credit per book per lookup, whichever endpoint you use. A one-time enrichment is one call per ISBN; a refresh, for example to pick up a changed `average_rating`, repeats it. Only successful calls are billed, so a failed lookup followed by a successful retry costs 1 credit. | Plan | Arithmetic | Credits | | --- | --- | --- | | A 100-book reading list, once | 100 × 1 credit | 100 | | A 2,000-book catalogue, once | 2,000 × 1 credit | 2,000 | | 500 books refreshed weekly for a month | 500 × 4 × 1 credit | 2,000 a month | | A 40,000-book catalogue, once | 40,000 × 1 credit | 40,000 | The 100 free credits on signup cover the reading list. The 2,000-book catalogue and the weekly refresh fit the Starter pack's 10,000 credits, and the 40,000-book catalogue fits the Build pack's 50,000. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To try it, run `search` with an author and title you know in the playground on the [Google Books API page](https://perceptlayer.com/apis/google-books), then call `isbn` with one of your own ISBNs and compare the fields. When they fit, [get a free API key](https://perceptlayer.com/signup) and run the script on your list. The [reviews APIs](https://perceptlayer.com/verticals/reviews) page lists related sources. ## APIs in this post - [Google Books **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/google-books) ## Frequently asked questions ### How much does a Google Books lookup cost on Perceptlayer? Each successful call to `search`, `isbn` or `volume` costs 1 credit, and a failed call costs nothing and returns `X-Credits-Used: 0`. Enriching a 2,000-book catalogue once is 2,000 credits; the 100 free credits on signup cover 100 books. The pricing page lists what credit packs cost. ### How does this compare with Google's own Books API? This guide makes no claims about Google's own Books API, its keys, quotas or pricing. If you're choosing, read Google's documentation and terms, then compare them with the three endpoints here: one `X-API-Key` header, 1 credit per successful call, and the same key for the rest of the catalogue of 480 websites. ### Why are some fields missing from a book? Fields vary from book to book. In the recorded search, the first item has `isbn_10` and `isbn_13` but no `page_count`, and the second has `page_count` and `average_rating` but no ISBN fields. `published_date` is a full date on one and a year on the other. Read every field with a fallback. ### How do I page through search results? The search endpoint takes `page` and `limit`, and the response returns `page`, `limit`, `total_results` and `has_next`. The recorded call with `limit=2` returned `total_results: 101` and `has_next: true`. Each page is another call at 1 credit, so a narrower filter is cheaper than paging through broad results. ### Can an AI agent look up books? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Google Books endpoints with `search_endpoints`, reads their parameters with `get_endpoint` (both free) and runs a lookup with `call_endpoint`, which spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show how to add the server. google books books isbn book metadata python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Costco API: Product Data and Prices as JSON](https://perceptlayer.com/blog/costco-api-product-prices) A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Etsy API: Product Data as JSON](https://perceptlayer.com/blog/etsy-api-listings-json) One GET to /v1/etsy/product returns an Etsy listing's price, discount, stock, variations and images as JSON, at 10 credits per successful call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. --- title: "Reddit Scraper or API: What You Get | Perceptlayer" description: "A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num_comments and next_after, and the cost per subreddit tracked." url: https://perceptlayer.com/blog/reddit-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Reddit Scraper or API: What You Get 18 Nov 2026 Perceptlayer 9 min read A Reddit scraper is code that loads subreddit listings, search pages and threads, then pulls titles, scores, comment counts and timestamps out of what comes back. You maintain the fetching, the parsing, the paging and the monitoring. The other route is 14 Reddit endpoints on Perceptlayer that return the same kind of data as JSON at 1 credit per successful call. This post compares the two on a recorded search, prices tracking subreddits and topics, and gives a verdict per use case. ## Key takeaways - A scraper for Reddit is three jobs you keep running: a fetcher, a parser for listings and threads, and a monitor that notices when a run quietly returns less than it should. - All 14 Reddit endpoints cost 1 credit per successful call. The ones for aggregate work are `search-posts`, `subreddit-posts`, `subreddit`, `popular`, `domain`, `search-subreddits` and `post`. - A recorded `GET /v1/reddit/search-posts` call for `openai`, sorted `top` over a `week`, returned posts with `id`, `title`, `subreddit`, `subreddit_subscribers`, `score`, `upvote_ratio`, `num_comments`, `created_at` and `permalink`, plus `pagination.next_after` and `has_more`. - Tracking 25 subreddits with one call each a day is 25 × 30 = 750 credits a month. The 100 free credits on signup cover the first 4 days. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a retry after a 429 or 503 is billed once, when it succeeds. ## What would a Reddit scraper have to handle? A Reddit scraper has to do three things on a schedule: fetch the listing, search and thread pages you care about, turn each one into rows with stable fields, and tell you when either step starts failing. Each is code you write once and then repair whenever the pages it depends on change. None of the pieces is hard on its own; the cost is that all of them are ongoing. The fetcher decides what to request and how often. For topic or brand work that means search pages per keyword, listing pages per subreddit and sort order, and then follow-up requests for threads that matter. It needs pacing, retries with backoff, and a plan for pages that respond slowly or not at all. The parser is where most upkeep lands. It has to find each post's identifier, title, community, score, comment count and timestamp, and it has to keep finding them after the page layout changes. A broken parser rarely throws an error. It returns empty strings or zeros, which look like a quiet day. The monitor closes that gap: row counts per run, null rates per field, and alerts when a subreddit that usually yields dozens of posts yields none. Before you build any collector, read the site's terms, and if your traffic gets blocked or challenged, stop rather than work around it. [Threads Scraper or API](https://perceptlayer.com/blog/threads-scraper-vs-api) covers the same trade-off for another social source. ## What do the Reddit endpoints cover? The [Reddit API](https://perceptlayer.com/apis/reddit) on Perceptlayer has 14 endpoints, all `GET`, all 1 credit per successful call, all on the standard tier. They split into community and topic endpoints, single-item lookups, and endpoints keyed on an account. For subreddit, topic and brand tracking, the first two groups are the ones you need. | Endpoint | What it's for | Required | Optional | | --- | --- | --- | --- | | `GET /v1/reddit/search-posts` | Posts matching a query | `query` | `sort`, `t`, `subreddit`, `nsfw`, `after`, `limit` | | `GET /v1/reddit/subreddit-posts` | Posts in one subreddit | `subreddit` | `sort`, `t`, `after`, `limit` | | `GET /v1/reddit/subreddit` | One subreddit | `subreddit` | `rules` | | `GET /v1/reddit/search-subreddits` | Subreddits matching a query | `query` | `after`, `limit` | | `GET /v1/reddit/popular` | The popular or best feed | none | `feed`, `sort`, `t`, `after`, `limit` | | `GET /v1/reddit/domain` | Results for a domain name | `domain` | `sort`, `t`, `after`, `limit` | | `GET /v1/reddit/post` | One post | `id` | none | | `GET /v1/reddit/oembed` | Embed data for a URL | `url` | none | | `GET /v1/reddit/autocomplete` | Suggestions for a typed query | `query` | `limit`, `nsfw` | The remaining five are keyed on an account rather than a topic: `search-users` ( `query`, `after`, `limit`), `user-profile` ( `username`), and `user-posts`, `user-comments` and `user-overview` (each `username`, with `sort`, `t`, `after`, `limit`). This post sticks to aggregate data and doesn't use them. The documented values for sorting differ by endpoint. `search-posts` takes `sort` as one of `relevance`, `hot`, `top`, `new` or `comments`; `subreddit-posts` and `popular` take `hot`, `new`, `top`, `rising` or `controversial`; `domain` takes `hot`, `new` or `top`. The time window `t` is one of `hour`, `day`, `week`, `month`, `year` or `all` wherever it appears. Defaults and page sizes aren't documented, so set `sort`, `t` and `limit` explicitly in scheduled jobs. ## What does a recorded search return? A search call returns the query context, a `posts` array with named, typed fields, and a `pagination` block with a cursor. The recorded call searched for `openai`, sorted by `top`, over the past `week`, with `limit=10`. Each post arrives as an object you can store as a row without any parsing of your own. ```bash curl "https://api.perceptlayer.com/v1/reddit/search-posts?query=openai&sort=top&t=week&limit=10" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to one post and the fields an aggregate tracker keeps (account fields removed): ```json { "success": true, "data": { "query": "openai", "sort": "top", "time": "week", "posts": [ { "id": "1xtu7qr", "fullname": "t3_1xtu7qr", "title": "What a poor soul..", … "subreddit": "memes", "subreddit_id": "t5_2qjpg", "subreddit_subscribers": 36169974, "permalink": "https://www.reddit.com/r/memes/comments/1xtu7qr/what_a_poor_soul/", "domain": "i.redd.it", "post_type": "image", "score": 31390, "upvote_ratio": 0.97, "num_comments": 107, "num_crossposts": 3, … "created_at": "2026-11-11T21:27:52+00:00", "created_utc": 1794432472, "over_18": false, "stickied": false, "locked": false, … }, … ], "pagination": { "limit": 10, "next_after": "t3_1xtzobg", "has_more": true } }, "meta": { "endpoint_family": "search_posts", "credits_charged": 1, … } } ``` Three details matter for a tracker. First, the top weekly results for `openai` in this recording were image posts in `memes` and `SipsTea`, so a broad keyword search returns whatever matches, not only on-topic discussion; add `subreddit` to scope a search to the communities you watch. Second, the response carries both `created_at` (ISO 8601) and `created_utc` (a Unix timestamp), so you don't have to convert. Third, the endpoint takes an `after` parameter and the response returns `pagination.next_after` with `has_more`; the names match, so try passing `next_after` as `after` in the playground before you build paging on it. Some fields are optional per post. The second recorded post carries a `flair` object that the first one doesn't, so treat anything beyond the fields shown above as possibly absent. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries terms and blocking risk; the endpoints cost credits per call and remove the parsing and upkeep. Neither is free. The table compares them for a recurring job, such as tracking a set of subreddits and brand keywords every day. | | DIY Reddit scraper | Reddit endpoints | | --- | --- | --- | | Setup | Fetcher, parsers for listings and threads, storage, monitoring | API key in the `X-API-Key` header | | What you get | Whatever you can parse from each page | `posts[]` with `id`, `title`, `subreddit`, `score`, `upvote_ratio`, `num_comments`, `created_at`, `permalink` and more | | When pages change | Your parser breaks, often silently | You read named JSON fields; there's no parser of yours to fix | | Blocks and challenges | Yours to handle | Not yours to handle; a failed call returns an error code and costs 0 | | Paging | Follow the site's pages | `after` parameter, `next_after` and `has_more` in the response | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | | Freshness | Whatever the page showed when you fetched it | Returned as found at the time of the call | ### What does a subreddit, topic or thread cost to track? On the endpoints, cost follows calls, not posts. One `subreddit-posts` or `search-posts` call returns a page of posts at whatever `limit` you set, for 1 credit. So the bill is the number of subreddits, keywords and threads you check, times how often, times the pages you read each time. | Plan | Arithmetic | Credits a month | | --- | --- | --- | | 25 subreddits, `sort=new`, one page a day | 25 × 30 days × 1 credit | 750 | | 10 brand keywords, `t=day`, one page a day | 10 × 30 days × 1 credit | 300 | | 25 subreddits, one page every hour | 25 × 24 × 30 days × 1 credit | 18,000 | | 200 threads re-checked 4 times a day with `post` | 200 × 4 × 30 days × 1 credit | 24,000 | The 100 free credits on signup cover the first 4 days of the first plan. The first two plans together come to 1,050 credits a month, so the Starter pack's 10,000 credits last about nine months. The hourly plan and the thread re-checks each fit the Build pack's 50,000 credits for two months. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. ## How do you track a topic in code? A topic tracker is a loop over keyword and subreddit pairs: one `search-posts` call each, a row per post keyed on `id`, and a pause between calls. The script below reads only fields that appear in the recorded `search-posts` response, so it runs against the endpoint as recorded. Swap in your own keywords and communities, and keep `sort` and `t` fixed so each day's rows compare with the last. ```python import csv import datetime import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/reddit/search-posts" WATCH = [ {"query": "web scraping api", "subreddit": "webscraping"}, {"query": "pandas", "subreddit": "dataengineering"}, ] FIELDS = ["id", "subreddit", "title", "score", "upvote_ratio", "num_comments", "created_at", "permalink"] def fetch(params, attempts=3): for _ in range(attempts): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json() raise RuntimeError(f"gave up on {params['query']}") today = datetime.date.today().isoformat() with open("mentions.csv", "a", newline="") as f: out = csv.writer(f) for watch in WATCH: params = dict(watch, sort="new", t="day", limit=25) body = fetch(params) for post in body.get("data", {}).get("posts", []): out.writerow([today, watch["query"]] + [post.get(k, "") for k in FIELDS]) time.sleep(1) ``` The script keeps no account fields, and one row per post per day lets you chart `score` and `num_comments` over time. The one-second pause keeps it within the free tier's 1 request a second; a paying account runs at least 5 a second. Every error comes back with an HTTP status and a JSON body with `code`, `message` and `request_id`, and the [errors docs](https://docs.perceptlayer.com/errors) list every code. Requests have no idempotency key, so a client timeout may hide a call that succeeded and was billed; keep the timeout generous. ## Which route fits your job? Choose by how often you need the data and how many communities or topics you watch, because that decides whether upkeep or per-call cost dominates. The verdicts below assume a recurring job. For reading a handful of threads once, open Reddit in a browser and skip both. - **Daily tracking of a set of subreddits**: use `subreddit-posts` with `sort=new` on a schedule and store rows keyed on `id`. At one page a day, 25 subreddits cost 750 credits a month. - **Brand or product mentions**: use `search-posts` with your brand as `query`, `sort=new` or `t=day`, and `subreddit` where you know the communities. Store `score` and `num_comments` over time to see which threads gain traction. - **Watching your own site's presence**: try `domain` with your domain name and `sort=new`, and check in the playground what it returns before you schedule it. - **Finding which communities discuss a topic**: run `search-subreddits` with the topic, then `subreddit` on the candidates to compare them before you add them to a tracker. - **Re-checking known threads**: call `post` with each thread's `id` and store what it returns per check; run one in the playground first to see its fields. - **Learning how scraping works**: build a scraper against a practice site, not a large social network. - **An agent answering questions about discussion on a topic**: give it the Reddit endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `search-posts` instead of browsing pages. To check the fields against your own subreddits, run `subreddit-posts` or [`search-posts`](https://perceptlayer.com/apis/reddit/search-posts) in the playground on the [Reddit API page](https://perceptlayer.com/apis/reddit), then [get a free API key](https://perceptlayer.com/signup) when they fit. The [social media APIs](https://perceptlayer.com/verticals/social) page lists other sources with the same call shape. ## APIs in this post - [Reddit **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/reddit) ## Frequently asked questions ### Is scraping Reddit allowed? That depends on Reddit's terms, the terms on any content you store, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Aggregate data such as post counts, scores and topics per subreddit is lower risk than data about individuals; leave account names out of anything you keep unless you have a lawful basis. ### How much does a Reddit API call cost on Perceptlayer? Every one of the 14 Reddit endpoints costs 1 credit per successful call, and one call returns a page of posts at the `limit` you set. A failed call costs nothing and returns `X-Credits-Used: 0`. Tracking 25 subreddits once a day is 25 × 30 = 750 credits a month. The pricing page lists what credit packs cost. ### How do I get more than one page of results? The recorded `search-posts` response returned `pagination.next_after` with the value `t3_1xtzobg` and `has_more: true`, and the listing endpoints take an `after` parameter, so the names match. Test passing `next_after` as `after` in the playground. Each extra page is another call at 1 credit, so decide how deep you read before you budget. ### Can I search within one subreddit? Yes. `GET /v1/reddit/search-posts` takes an optional `subreddit` parameter alongside `query`, `sort`, `t`, `nsfw`, `after` and `limit`. The recorded unscoped search for `openai` returned top weekly posts from `memes` and `SipsTea`, which shows why scoping matters for topic tracking. Each scoped search is still one call at 1 credit. ### How fast can I run a Reddit tracking job? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 25-subreddit daily run finishes in under a minute. Paying accounts run at least 5 requests a second (300 a minute). A 429 carries `Retry-After`; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. reddit social media scraping brand monitoring subreddits ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Threads Scraper or API: What You Get](https://perceptlayer.com/blog/threads-scraper-vs-api) A DIY Threads scraper versus 8 Threads endpoints at 1 credit a call: keyword search, topic tags, brand posts, upkeep, terms and the cost per tag tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Nov 2026 Perceptlayer 8 min read ## [Facebook Scraper or API: What You Get](https://perceptlayer.com/blog/facebook-scraper-vs-api) A Facebook scraper vs 21 restricted Facebook endpoints at 1 credit a call: pages, events and Marketplace for brand and market work, and the cost per page. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Nov 2026 Perceptlayer 8 min read ## [Google Images Scraper or API: What You Get](https://perceptlayer.com/blog/google-images-scraper-vs-api) Compare a Google Images scraper with one 1-credit call that returns position, source, link, original URL, pixel size and is\_product for each result. --- title: "Etsy Scraper or API: What You Get | Perceptlayer" description: "An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked." url: https://perceptlayer.com/blog/etsy-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Etsy Scraper or API: What You Get 17 Nov 2026 Perceptlayer 8 min read An Etsy scraper is code that loads listing pages and pulls out the price, discount, stock, variations and favorites count, then keeps doing that as the pages change. The alternative is one endpoint, `GET /v1/etsy/product`, that returns those fields as JSON for 10 credits per successful call. Because every listing you track costs 10 credits per check, the answer depends on how many listings you watch and how often. This post compares both on a recorded listing and works out where each one wins. ## Key takeaways - `GET /v1/etsy/product` takes a `listing_id` or a `url` (up to 500 characters) and costs 10 credits per successful call. It's the only Etsy endpoint, so you bring your own list of listings. - The recorded call for listing `1241528786` returned `price.current: 28`, `price.original: 70`, `discount_percent: 60`, `quantity_available: 1333`, `favorites_count: 19378` and two `variations` groups. - Cost is per listing per check: 50 listings checked daily is 50 × 10 = 500 credits a day, 15,000 over 30 days, inside the Build pack's 50,000. - The 100 free signup credits cover 10 listing lookups, enough to check the fields against your own listings before you buy credits. - At tens of thousands of listings a day, the credit bill grows linearly, and a maintained scraper can be the cheaper route if you can run one within the site's terms. ## What does an Etsy scraper have to fetch, parse and maintain? An Etsy scraper for listing data is a fetcher, a parser and a monitor. The fetcher requests each listing page on a schedule. The parser finds the title, current and original price, discount, stock count, variation options, materials, images and favorites count in whatever the page returns. The monitor notices when a run quietly returns empty prices or fewer variations than yesterday, because a broken parser rarely raises an error. Listing pages on a handmade marketplace carry more structure than a plain product page. A single listing can have several variation groups, such as a colour and an engraving option, each with its own option labels and IDs. A sale shows two prices and a percentage, and you have to decide which number is the price you store. Stock can be a count, a status, or both. Each of these is a parsing rule you write and then repair when the page layout moves. The fetcher has its own upkeep. Request pacing, retries with backoff, and handling slow or challenge responses are ongoing work at any real volume. Store the currency with every price, because a change in where or how you fetch can change the currency you parse. Read Etsy's terms before you build a collector, and if your traffic gets blocked or challenged, stop rather than work around it with rotating proxies or CAPTCHA solvers. None of this is hard to write once. The cost is keeping it correct every day for as long as you track prices, which is the same trade-off covered for other marketplaces in [AliExpress Scraper or API](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) and [Vinted Scraper or API](https://perceptlayer.com/blog/vinted-scraper-vs-api). ## What does the Etsy product endpoint return? The Etsy API on Perceptlayer has one endpoint, `GET /v1/etsy/product`, at 10 credits per successful call. It takes two optional parameters: `listing_id` (a string) and `url` (a string of up to 500 characters). One call returns one listing with named fields for title, description, category, a price object, availability, stock quantity, images, materials, variations, shipping origin, the shop, favorites count and a listed date. | Parameter | Type | Notes from the reference | | --- | --- | --- | | `listing_id` | string | Optional. The recorded call used `1241528786`. | | `url` | string | Optional. Up to 500 characters. | This is the recorded request: ```bash curl "https://api.perceptlayer.com/v1/etsy/product?listing_id=1241528786" \ -H "X-API-Key: $API_KEY" ``` And this is the recorded response, trimmed. The shop's name and URL are cut; keep the shop `id` if you need a key to group listings. ```json { "success": true, "data": { "listing_id": "1241528786", "url": "https://www.etsy.com/listing/1241528786/personalized-leather-rfid-wallet", "title": "Personalized Leather RFID Wallet, Engraved Genuine Leather Custom Wallet, …", "category": [ "Wallets" ], "price": { "current": 28, "original": 70, "discount_percent": 60, "currency": "USD" }, "availability": "InStock", "quantity_available": 1333, "rating": {}, "images": [ { "url": "https://i.etsystatic.com/35016605/r/il/a5f633/4007318605/il_fullxfull.4007318605_mj36.jpg", "thumbnail": "https://i.etsystatic.com/35016605/r/il/a5f633/4007318605/il_340x270.4007318605_mj36.jpg" }, … ], "materials": [ "Leather", "Nylon" ], "variations": [ { "name": "Engraving Side", "options": [ { "id": "2705057689", "label": "No Engraving" }, … ] }, { "name": "Color", "options": [ { "id": "2682504516", "label": "Light Brown" }, … ] } ], "shipping": { "origin_country": "US" }, "shop": { "id": "35016605", … }, "favorites_count": 19378, "listed_on": "2026-11-12" }, "meta": { "endpoint_family": "etsy-listing", "attempts": 1, … "credits_charged": 10, … } } ``` ### Which fields replace which parsing rules? Four groups of fields map to the parsing rules a scraper would need. The `price` object separates `current`, `original` and `discount_percent`, so a sale doesn't have to be inferred from two numbers on a page. `quantity_available` and `availability` give stock as a count and a status. `variations` lists each group by `name` with option `id` and `label` pairs. `favorites_count` is a demand signal you can track over time. Two details are worth handling in code. The recorded `rating` is an empty object, so treat rating fields as optional and don't assume a listing has one. And the `meta` block reports `credits_charged: 10`, which lets you log what each check cost next to the data it returned. The `X-Credits-Used` and `X-Credits-Remaining` headers carry the same information on every successful response. ### A daily price check in Python This script reads a list of listing IDs, calls the endpoint once per listing and appends one row per listing to a CSV file. It reads only fields that appear in the recorded response and skips a listing when a call fails. ```python import csv import datetime import os import requests API = "https://api.perceptlayer.com/v1/etsy/product" HEADERS = {"X-API-Key": os.environ["API_KEY"]} LISTINGS = ["1241528786"] today = datetime.date.today().isoformat() with open("etsy_prices.csv", "a", newline="") as f: writer = csv.writer(f) for listing_id in LISTINGS: r = requests.get(API, headers=HEADERS, params={"listing_id": listing_id}, timeout=60) if r.status_code != 200: print(listing_id, r.status_code, r.json().get("error", {}).get("code")) continue d = r.json()["data"] price = d.get("price", {}) writer.writerow([ today, d["listing_id"], price.get("current"), price.get("original"), price.get("discount_percent"), price.get("currency"), d.get("quantity_available"), d.get("favorites_count"), ]) ``` A failed call returns an HTTP status and a JSON error with a `code`, and costs 0 credits, so the script logs it and moves on. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## How do a scraper and the endpoint compare? A scraper trades per-call cost for engineering time and the risk of blocks and breakage; the endpoint trades upkeep for 10 credits per listing per check. The table compares them for a recurring job: checking a fixed set of Etsy listings for price, discount and stock changes. | | DIY Etsy scraper | `GET /v1/etsy/product` | | --- | --- | --- | | Setup | Fetcher, page parser, storage, monitoring | API key in the `X-API-Key` header | | Input | Listing URLs you collect | `listing_id` or `url` you collect | | Price and sale | Parse two prices and a label, decide which is current | `price.current`, `price.original`, `price.discount_percent`, `price.currency` | | Stock | Parse a count or status if shown | `quantity_available` and `availability` | | Variations | Parse each option group | `variations[].name` with `options[].id` and `label` | | When the page changes | Your parser breaks and you fix it | You read named JSON fields | | Blocks and challenges | Yours to handle | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time, roughly flat per listing | 10 credits per successful call, linear per listing | | Discovery | Whatever pages you crawl | None: one endpoint, no search | The last row matters. The endpoint looks up listings you already know; it doesn't search or browse categories. If your job starts with "find every listing for leather wallets", you need another source of listing URLs first. ## What does tracking one Etsy listing cost? Every check of one listing is one call at 10 credits, so the cost per item tracked is 10 credits per check, and the monthly bill is listings × checks × 10. There's no per-page batching to lower it. The worked examples below use 30-day months and the pack sizes from [pricing](https://perceptlayer.com/pricing). | Job | Arithmetic | Credits | Fits in | | --- | --- | --- | --- | | Try it on your own listings | 10 calls × 10 credits | 100 | The 100 free signup credits | | 200 listings, weekly | 200 × 4 weeks × 10 | 8,000 a month | Starter pack, 10,000 | | 50 listings, daily | 50 × 30 × 10 | 15,000 a month | Build pack, 50,000 | | 500 listings, daily | 500 × 30 × 10 | 150,000 a month | Growth pack, 200,000 | | 10,000 listings, daily | 10,000 × 30 × 10 | 3,000,000 a month | Volume pack, 5,000,000 | Rate limits set how long a run takes. At the free rate of 1 request a second, 50 listings take under a minute. At the paid minimum of 5 a second, 10,000 listings take about 33 minutes. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes, and the [credits docs](https://docs.perceptlayer.com/credits) explain how credits are debited. Purchased credits last 12 months, so a weekly job doesn't have to use a pack within a month. ## Which should you choose for your use case? Choose by how many listings you track and how often, because at 10 credits a check that decides whether credits or upkeep costs more. For a handful of listings checked by hand, a browser is enough and neither route is worth building. For anything recurring, the verdicts below apply. - **Watching competitors' prices and sales on a few hundred listings**: use the endpoint. Store `price.current`, `price.original`, `discount_percent` and the date. 200 listings weekly is 8,000 credits a month. - **Tracking stock or demand on bestsellers**: use the endpoint and store `quantity_available` and `favorites_count` per check, so you can chart them over time. - **Building a product catalogue with variations and materials**: use the endpoint once per listing, then re-check only the ones you sell against. `variations` and `materials` come back as lists, not text to parse. - **Discovering listings across a whole category**: neither route alone. The endpoint has no search, and a crawler that discovers listings is a bigger job than a price checker. Start from listing URLs you already have. - **Daily checks on tens of thousands of listings**: price it both ways. 10,000 daily checks is 3,000,000 credits a month. If you can run a scraper within the site's terms and maintain it, it may cost less at that scale. - **An agent answering questions about one listing**: give it the endpoint through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. Each lookup costs 10 credits and only on success. To see the fields on a listing you care about, run `product` with its `listing_id` in the playground on the [Etsy API page](https://perceptlayer.com/apis/etsy), then [get a free API key](https://perceptlayer.com/signup) for the scripted version. The [Marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists the other marketplace sources, and the [Etsy product endpoint page](https://perceptlayer.com/apis/etsy/product) has the parameter reference. ## APIs in this post - [Etsy **from 10 credits per call** · 1 endpoint](https://perceptlayer.com/apis/etsy) ## Frequently asked questions ### How much does an Etsy API call cost? `GET /v1/etsy/product` costs 10 credits per successful call, and one call returns one listing. A failed call costs nothing and returns `X-Credits-Used: 0`. The 100 free credits you get once on signup cover 10 listing lookups. Checking 50 listings daily for 30 days is 15,000 credits, inside the Build pack's 50,000. ### Can I search Etsy listings with this API? No. The Etsy API has one endpoint, `product`, which takes a `listing_id` or a `url` and returns that one listing. It doesn't search, browse categories or list a shop's items. You need the listing IDs or URLs from your own records or another source before you call it. ### Which price fields does the response include? The `price` object has `current`, `original`, `discount_percent` and `currency`. In the recorded listing they were 28, 70, 60 and USD, so a sale shows up as a gap between `current` and `original`. Store `currency` with every price so values from different checks stay comparable. ### Is scraping Etsy allowed? That depends on Etsy's terms, how you collect and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks or challenges. Listing facts such as price and stock are lower risk than personal data; leave shop owners' and buyers' personal details out of what you keep. ### Why is the rating object empty in the response? In the recorded call, `rating` came back as `{}` for a listing with 19,378 favorites, so a listing can return no rating values. Treat any rating field as optional in your code, check for its presence before reading it, and don't treat an empty object as a zero rating. etsy scraping marketplaces price tracking ecommerce ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Etsy API: Product Data as JSON](https://perceptlayer.com/blog/etsy-api-listings-json) One GET to /v1/etsy/product returns an Etsy listing's price, discount, stock, variations and images as JSON, at 10 credits per successful call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 8 min read ## [Amazon Scraper or API: Search, Offers and Reviews](https://perceptlayer.com/blog/amazon-scraper-vs-api) An Amazon scraper vs 18 endpoints at 1 credit a call: a recorded laptop stand search with asin, price.amount and rating, and the domains each call takes. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 8 min read ## [AliExpress Scraper or API: What You Get](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) An AliExpress scraper vs 1-credit endpoints: a recorded search with 60 products a page, price.amount, sold\_count and is\_sponsored, and cost per product. --- title: "Grocery Price Data from Five Stores as JSON | Perceptlayer" description: "Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost." url: https://perceptlayer.com/blog/grocery-price-data-api --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Grocery Price Data from Five Stores as JSON 17 Nov 2026 Perceptlayer 7 min read A grocery price API returns a store's products with their prices as JSON, so you can compare a basket across stores or track it week by week without scraping five sites. Perceptlayer has search endpoints for Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit per successful call, and each returns a page of products for a query. The stores don't return the same fields: some give a regular and a sale price, some a unit price, some stock. This guide shows the requests, compares the recorded fields and prices a weekly basket. ## Key takeaways - Each store has a `search` endpoint at 1 credit a call: `/v1/kroger/search`, `/v1/whole-foods/search` (needs `store_id`), `/v1/trader-joes/search`, `/v1/sprouts/search` and `/v1/costco/search`. - Kroger and Sprouts return `regular_price` and `sale_price`, so promotions are explicit; Kroger also returns `sale_ends`. Whole Foods returns `regular_price` and `on_sale`. - Unit prices come back from Kroger ( `unit_price`, `unit`), Trader Joe's ( `unit_price`, `unit_price_unit`) and Sprouts ( `unit_price.amount`, `unit_price.unit`), which is what a basket comparison needs. - A 20-item basket at all five stores, checked weekly, is 20 × 5 = 100 calls × 1 credit = 100 credits a week, 5,200 credits a year, inside the Starter pack's 10,000. ## What is grocery price data good for? Grocery price data answers three kinds of questions: what a fixed basket costs and how that changes (a price index), which store is cheaper for the same items (a basket comparison), and when and how deep discounts run (promotion tracking). Each needs a slightly different set of fields, and the five stores cover them unevenly, so it helps to know which store gives you what before you design the job. A **price index** needs the same products every week, a stable product key and, ideally, a unit price so pack-size changes don't distort it. A **basket comparison** needs unit prices or sizes, because a 64 oz carton and a half-gallon carton only compare per ounce. **Promotion tracking** needs the regular price next to the current one, plus an end date where a store gives one. Kroger's response carries all three; Trader Joe's carries a unit price but, in the recording, no regular-versus-sale pair. If your interest is a single retailer's prices over time rather than grocery specifically, [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) covers the storage and alerting side. ## Which fields does each store return? The five recorded searches return different shapes, and this table lists what each one carries for price, promotion, unit price, stock and product key. Everything in it comes from the recorded responses below. The Costco recording is a search for `laptop`, not a grocery item, so check its fields on a grocery query in the playground before you rely on them. | Field | Kroger | Whole Foods | Trader Joe's | Sprouts | Costco | | --- | --- | --- | --- | --- | --- | | Product key | `id`, `upc` | `id` | `sku` | `id`, `product_id`, `upc` | `id`, `model` | | Current price | `price` | `price` | `price` | `price` | `price.delivery_min`, `price.delivery_max` | | Regular price | `regular_price` | `regular_price` | none recorded | `regular_price` | `price.original` | | Sale flag or price | `sale_price`, `sale_ends` | `on_sale` | none recorded | `sale_price`, `on_sale` | `promotions[].short_text` | | Unit price | `unit_price`, `unit`, `unit_price_text` | none recorded | `unit_price`, `unit_price_unit` | `unit_price.amount`, `unit_price.unit` | none recorded | | Size | `size` | in `name` | `size`, `size_value`, `size_unit` | `size` | none recorded | | Stock | `stock_level` | none recorded | none recorded | `availability.in_stock`, `availability.stock_level` | `availability.delivery` | | Store context | `aisle` | `store_id` (required) | none | `store_id` in response | `warehouse` in response | | Other | `diets`, `organic`, `snap_eligible`, `rating` | `is_local`, `facets` | `country_of_origin`, `characteristics`, `updated_at` | `badges`, `nutrition_highlights`, `rating` | `member_only`, `rating`, `facets` | ## How do you request each store's prices? Every request is a `GET` with your key in the `X-API-Key` header and a `query`. The parameters differ by store, and they're the first thing to get right: Whole Foods requires a `store_id`, Sprouts takes an optional `store_id` or a `zip` from a fixed list, and Kroger's search takes only `query` and `page`. The table lists the search parameters from the reference. | Endpoint | Required | Optional | | --- | --- | --- | | `GET /v1/kroger/search` | `query` | `page` (only `1` is allowed) | | `GET /v1/whole-foods/search` | `query`, `store_id` | `page`, `per_page`, `category`, `diet` | | `GET /v1/trader-joes/search` | `query` | `page`, `per_page` | | `GET /v1/sprouts/search` | `query` | `store_id`, `zip` (85260, 90210, 77002, 30301 or 80202), `page`, `per_page` | | `GET /v1/costco/search` | `query` | `country` (us, ca), `locale`, `page`, `per_page`, `sort`, `brand[]`, `min_price`, `max_price`, `category`, `in_stock`, `warehouse` and more | ### Kroger: sale price and its end date ```bash curl "https://api.perceptlayer.com/v1/kroger/search?query=milk" \ -H "X-API-Key: $API_KEY" ``` The recorded response returned `count: 24` and `has_next_page: false`. Trimmed to the first item: ```json { "data": { "query": "milk", "count": 24, "has_next_page": false, "items": [ { "position": 1, "upc": "0001111050434", "name": "Simple Truth Organic® Lactose Free Vitamin D Whole Milk Half Gallon", "size": "1/2 gal", … "stock_level": "high", "price": 3.99, "regular_price": 4.99, "sale_price": 3.99, "sale_ends": "2026-12-02T04:59:59.999Z", "unit_price": 0.0623, "unit": "fl oz", … }, … ] } } ``` ### Whole Foods: one store at a time ```bash curl "https://api.perceptlayer.com/v1/whole-foods/search?query=milk&store_id=10245" \ -H "X-API-Key: $API_KEY" ``` The response reports `total_results: 514` and a `featured` facet with an `on-sale` count, which is a quick read on how much of a query's results are discounted at that store: ```json { "data": { "store_id": "10245", "per_page": 24, "total_results": 514, "items": [ { "id": "B082VVT75S", "name": "Unsweetened Oat Milk, 32 FZ", "brand": "Elmhurst", "is_local": true, "price": 7.29, "regular_price": 7.29, "on_sale": false }, … ], "facets": [ … { "key": "featured", "options": [ { "slug": "on-sale", "label": "Sales & Deals", "count": 248 }, … ] } ] } } ``` The `/v1/whole-foods/store` endpoint takes a `store_id` and returns that store, which helps when you track several locations. ### Trader Joe's: unit price and size, split out ```bash curl "https://api.perceptlayer.com/v1/trader-joes/search?query=hummus" \ -H "X-API-Key: $API_KEY" ``` ```json { "data": { "total_results": 10, "items": [ { "sku": "059248", "name": "Organic Hummus", "price": 2.99, "unit_price": 0.3738, "unit_price_unit": "oz", "size_value": 8, "size_unit": "oz", … "updated_at": "2026-11-07 20:40:09", … }, … ] } } ``` ### Sprouts: sale and stock together ```bash curl "https://api.perceptlayer.com/v1/sprouts/search?query=milk" \ -H "X-API-Key: $API_KEY" ``` The recorded call passed no `store_id`, and the response came back with `store_id: 393864`, so store that value with each row: ```json { "data": { "store_id": "393864", "per_page": 20, "total_results": 249, "items": [ { "product_id": "120137222", "name": "Grazeful Dairy Whole Grassfed A2/A2 Milk", "size": "64 oz", "upc": "00850221001627", "price": 3.79, "regular_price": 4.99, "sale_price": 3.79, "on_sale": true, "unit_price": { "amount": 0.06, "unit": "oz", … }, "availability": { "in_stock": true, "stock_level": "inStock" }, … }, … ] } } ``` ### Costco: price ranges and promotions ```bash curl "https://api.perceptlayer.com/v1/costco/search?query=laptop" \ -H "X-API-Key: $API_KEY" ``` The price is an object rather than a number, and promotions come as a list: ```json { "data": { "country": "us", "total_results": 164, "warehouse": "243", "items": [ { "id": "4201046364", "brand": "Acer", … "price": { "currency": "USD", "delivery_min": 599.99, "delivery_max": 599.99, "original": 899.99 }, "member_only": false, … "promotions": [ { "short_text": "$90 OFF" }, … ], … }, … ] } } ``` Costco also has a `product-price` endpoint that takes a required `item` and an optional `warehouses[]` list; there's no recorded response for it here, so check its fields in the playground. ## How do you build a weekly basket across stores? Run one search per basket item per store each week, pick the matching product from the results by its key, and store the date, store, key, price, regular price and unit price where the store returns them. The first week, match by name and size and save the key; after that, match on the key. Kroger and Sprouts both return `upc`, a candidate key for matching products across the two; the recorded values differ in length (13 and 14 digits), so normalise leading zeros first. This script runs a basket against Kroger, Trader Joe's and Sprouts, reads only recorded fields and writes one CSV row per result it keeps: ```python import csv import datetime import os import requests BASE = "https://api.perceptlayer.com/v1" HEADERS = {"X-API-Key": os.environ["API_KEY"]} BASKET = ["milk", "hummus"] def kroger(item): return item.get("upc"), item.get("price"), item.get("regular_price"), item.get("unit_price"), item.get("unit") def trader_joes(item): return item.get("sku"), item.get("price"), None, item.get("unit_price"), item.get("unit_price_unit") def sprouts(item): unit = item.get("unit_price") or {} return item.get("upc"), item.get("price"), item.get("regular_price"), unit.get("amount"), unit.get("unit") STORES = {"kroger": kroger, "trader-joes": trader_joes, "sprouts": sprouts} today = datetime.date.today().isoformat() with open("basket.csv", "a", newline="") as f: writer = csv.writer(f) for store, read in STORES.items(): for query in BASKET: r = requests.get(f"{BASE}/{store}/search", headers=HEADERS, params={"query": query}, timeout=60) if r.status_code != 200: print(store, query, r.status_code) continue items = r.json()["data"].get("items", []) if items: writer.writerow([today, store, query, items[0].get("name"), *read(items[0])]) ``` It keeps the first result per query to stay short; a real index should match the saved key instead. Failed calls cost 0 credits and the script skips them. The [errors docs](https://docs.perceptlayer.com/errors) list the codes, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain the per-account rate: a free account runs 1 request a second. ## What does a weekly grocery basket cost? Cost is one credit per search call, and a basket check is one call per item per store, so the weekly cost is items × stores × 1 credit. Each search returns a page of products, so one call per item is enough when the item you want is on the first page. Whole Foods needs a call per `store_id`, so tracking several locations multiplies its share. | Job | Arithmetic | Credits | | --- | --- | --- | | Try every store once | 5 calls × 1 credit | 5, out of the 100 free signup credits | | 20-item basket, 5 stores, weekly | 20 × 5 × 1 | 100 a week, 5,200 a year | | 50-item index, 5 stores, weekly | 50 × 5 × 1 | 250 a week, 13,000 a year | | 50-item index, 5 stores, daily | 50 × 5 × 30 | 7,500 a month | The 20-item basket for a year is 5,200 credits, inside the Starter pack's 10,000, and purchased credits last 12 months. The 50-item weekly index is 13,000 a year, inside the Build pack's 50,000. Adding a product-detail call for items whose search result changed costs 1 credit each. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. To start, run a `milk` search on the [Kroger API page](https://perceptlayer.com/apis/kroger) playground and the same query on the [Sprouts API page](https://perceptlayer.com/apis/sprouts), compare the fields side by side, then [get a free API key](https://perceptlayer.com/signup) for the weekly job. The [Whole Foods](https://perceptlayer.com/apis/whole-foods), [Trader Joe's](https://perceptlayer.com/apis/trader-joes) and [Costco](https://perceptlayer.com/apis/costco) pages have the other stores' endpoints. ## APIs in this post - [Kroger **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/kroger) - [Whole Foods Market **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/whole-foods) - [Trader Joe's **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/trader-joes) - [Sprouts Farmers Market **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/sprouts) - [Costco **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/costco) ## Frequently asked questions ### How much does a grocery price API call cost? Each search endpoint for Kroger, Whole Foods, Trader Joe's, Sprouts and Costco costs 1 credit per successful call, and one call returns a page of products. Failed calls cost nothing. The 100 free credits you get once on signup cover 100 searches, enough to run a 20-item basket across all five stores once. ### Can I get prices for a specific store location? It depends on the store. Whole Foods search requires a `store_id`. Sprouts search takes an optional `store_id` or a `zip` from five allowed values. Costco search takes an optional `warehouse`, and its `product-price` endpoint takes a `warehouses[]` list. Kroger search takes only `query` and `page`, and Trader Joe's only `query`, `page` and `per_page`. ### Which stores show sale prices? Kroger returns `regular_price`, `sale_price` and `sale_ends`. Sprouts returns `regular_price`, `sale_price` and `on_sale`. Whole Foods returns `regular_price` and `on_sale`, plus an `on-sale` facet count. Costco returns `price.original` and a `promotions` list. The recorded Trader Joe's search returned only `price`, so detect its changes by comparing week to week. ### How do I compare prices across different pack sizes? Use the unit price where the store returns one: Kroger's `unit_price` with `unit`, Trader Joe's `unit_price` with `unit_price_unit`, and Sprouts' `unit_price.amount` with `unit_price.unit`. Convert to one unit before comparing, since Kroger reports milk per `fl oz` and Sprouts per `oz`. For stores without a unit price, store the size and compute it yourself. ### Is the data live? Each call returns the data as found at the time of the call, collected from publicly available sources. Store the date with every row so your index reflects when each price was seen. Trader Joe's items also carry an `updated_at` timestamp, which is worth keeping alongside your own check date. grocery prices price index retail data promotions unit price ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 31 Oct 2026 Perceptlayer 9 min read ## [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 27 Oct 2026 Perceptlayer 8 min read ## [Jobs API: Indeed, Glassdoor and Google Jobs Compared](https://perceptlayer.com/blog/jobs-api-comparison) Indeed returns postings with apply\_url and coordinates, Glassdoor returns ratings, reviews and pay percentiles, Google Jobs adds date filters. 1 credit a call. --- title: "Homes.com API: Listings and Neighborhoods as JSON" description: "Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list_date, plus neighborhood lookups." url: https://perceptlayer.com/blog/homes-com-api-listings-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Homes.com API: Listings and Neighborhoods as JSON 17 Nov 2026 Perceptlayer 7 min read The Homes.com API on Perceptlayer returns Homes.com listings, single listings, neighborhoods and schools as JSON, at 1 credit per successful call. Start with `GET /v1/homes-com/search`, which takes a `location` and filters such as `listing_type`, `min_beds` and `sort`, and returns a page of listings with price, address, beds, baths, square footage and list date. This guide shows the request, the parameters, a recorded Austin search, a script that pages through it, and the cost per listing and per neighborhood tracked. ## Key takeaways - `GET /v1/homes-com/search` takes no required parameters; `location`, `listing_type` (sale or rent), `status` (active or sold), price, bed, bath, size and year filters, `property_type[]`, `sort`, `page` and `per_page` are optional. Each call costs 1 credit. - The recorded search for `Austin, TX` with `min_beds=3` returned `per_page: 25`, `total: 4617`, `reachable_total: 700` and `total_pages: 28`. - Each listing has `id`, `listing_id`, `status`, `price.value`, `address.full`, `beds`, `baths`, `sqft`, `price_per_sqft`, `year_built` and `list_date`. It also has an `agent` object with personal contact details: drop it. - Covering the 700 reachable listings in that search is 28 calls × 1 credit = 28 credits, or 0.04 credits per listing per sweep. - `neighborhood` and `school` each take an `id` and cost 1 credit, so tracking 20 neighborhoods weekly is 20 credits a week. ## Which Homes.com endpoints are there? The Homes.com API has seven endpoints, all `GET` and all 1 credit per successful call. Three cover listings (search, listing and place autocomplete), two cover the area around a home (neighborhood and school), and two cover agents. Only the search endpoint has a recorded response in this guide, so for the others the table gives what the reference documents: the parameters and what each returns. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | `GET /v1/homes-com/search` | Listings for a place or area | none | `location`, `location_id`, `bounding_box`, filters, `sort`, `page`, `per_page`, `facets` | | `GET /v1/homes-com/listing` | One listing | none | `id`, `url` (up to 300 characters) | | `GET /v1/homes-com/autocomplete` | Suggestions for a typed place | `query` | `limit`, `type`, `listing_type` | | `GET /v1/homes-com/neighborhood` | One neighborhood | `id` | none | | `GET /v1/homes-com/school` | One school | `id` | none | | `GET /v1/homes-com/agent` | One agent | `id` | none | | `GET /v1/homes-com/agent-autocomplete` | Agent suggestions | `query` | `limit` | `autocomplete` takes a `type` of `place`, `neighborhood`, `school`, `building`, `community` or `address`, and a `listing_type` of `sale` or `rent`. The [Homes.com API page](https://perceptlayer.com/apis/homes-com) has every endpoint with a playground, so you can see what autocomplete returns for your area before you build on it. ## How do you search Homes.com listings? Send a `GET` to `/v1/homes-com/search` with a `location` string and the filters you need, with your key in the `X-API-Key` header. The recorded call below asks for homes for sale in Austin with at least three bedrooms, cheapest first. Every filter is optional, and the reference documents no defaults, so set the ones your job depends on. ```bash curl "https://api.perceptlayer.com/v1/homes-com/search?location=Austin%2C+TX&listing_type=sale&min_beds=3&sort=price_asc" \ -H "X-API-Key: $API_KEY" ``` ### Which parameters does search take? | Parameter | Type | Allowed values or limits | | --- | --- | --- | | `location` | string | Up to 100 characters, such as `Austin, TX` | | `location_id` | string | Also returned by search | | `bounding_box` | string | Format not documented; check in the playground | | `listing_type` | string | `sale`, `rent` | | `status` | string | `active`, `sold` | | `open_houses` | boolean | | | `min_price`, `max_price` | integer | | | `min_beds`, `max_beds` | integer | | | `min_baths`, `max_baths` | integer | | | `min_sqft`, `max_sqft` | integer | | | `min_year_built`, `max_year_built` | integer | | | `property_type[]` | list of strings | `house`, `townhouse`, `condo`, `multifamily` | | `sort` | string | `recommended`, `price_asc`, `price_desc`, `newest`, `beds_desc`, `sqft_desc`, `baths_desc`, `rent_asc` | | `page`, `per_page` | integer | | | `facets` | boolean | | The response to a `location` search includes a `location_id`, and `location_id` is also a search parameter, so the names match. Try passing the returned value back in the playground before you rely on it for repeat searches. ## What does the search response contain? The response has three parts: the resolved `location_id`, the `applied_filters` the search used, and a `pagination` block, followed by `items`. Each item is one listing with its price, address and coordinates, size, property type, list date, description and photos. This is the recorded Austin response, trimmed to the first listing, with the `agent` object removed: ```json { "success": true, "data": { "location_id": "2.f5xx96v6x6171", "applied_filters": { "listing_type": "sale", "sort": "price_asc", "min_beds": "3" }, "pagination": { "page": 1, "per_page": 25, "total": 4617, "reachable_total": 700, "total_pages": 28, "has_next_page": true }, "items": [ { "id": "mddcspkby1g47", "listing_id": "nj97f2thtpkfq", "url": "https://www.homes.com/property/8212-barton-club-dr-austin-tx-unit-11-5/mddcspkby1g47/", "listing_type": "sale", "status": "active", "price": { "value": 32000, "currency": "USD", "label": "$32,000" }, "original_price": { "value": 32000, "currency": "USD" }, "address": { "full": "8212 Barton Club Dr Unit 11-5, Austin, TX 78735", "coordinates": { "latitude": 30.29249, "longitude": -97.85977 }, … }, "beds": 3, "baths": 3.5, "sqft": 2660, "lot_sqft": 10890, "year_built": 2001, "price_per_sqft": 12, "property_type": { "code": 1, "slug": "house", "label": "House" }, "list_date": "2026-01-23T00:00:00+00:00", "description": "TIMESHARE!! FRACTIONAL OWNERSHIP! …", "photos": [ { "url": "https://images.homes.com/listings/111/9890504574-604919412/8212-barton-club-dr-austin-tx-primaryphoto.jpg", "width": 2048, "height": 1536 }, … ], … }, … ] }, "meta": { "endpoint_family": "search", … "credits_charged": 1, … } } ``` ### What should you watch for in this data? Four details from the recording matter when you build on it. First, `total` was 4,617 but `reachable_total` was 700, and `total_pages` was 28: one query reaches at most 700 listings, so a full market needs several narrower queries. Second, each item has both an `id` (which appears in its `url`) and a separate `listing_id`; store both. Third, `price` and `original_price` are separate objects, so a price cut shows up as a difference between them. Fourth, sorting by `price_asc` surfaced outliers: the first two results are fractional-ownership units at `price.value: 32000` and `price_per_sqft: 12`, at the same street address with different `unit` values. If you're building a price model, set a `min_price` floor or filter on `description` before averaging. Each item also carries an `agent` object with a name, phone number and photo. Leave it out of what you store; the listing fields are what a tracker needs. ### From a search result to one listing The `listing` endpoint takes an `id` or a `url`, and every search item carries an `id` and a `url`, so the names match. The recorded calls don't include a `listing` lookup, so run one in the playground on the [Homes.com listing endpoint page](https://perceptlayer.com/apis/homes-com/listing) with an `id` from your search to see the fields it adds. ## How do you sweep one search in Python? Loop over `page` until `has_next_page` is false, and write the listing fields to CSV with the agent object left out. This script reads only fields that appear in the recorded response and stops on the first failed call, which costs 0 credits: ```python import csv import datetime import os import requests URL = "https://api.perceptlayer.com/v1/homes-com/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PARAMS = {"location": "Austin, TX", "listing_type": "sale", "min_beds": 3, "sort": "price_asc"} today = datetime.date.today().isoformat() page = 1 with open("homes_austin.csv", "a", newline="") as f: writer = csv.writer(f) while True: r = requests.get(URL, headers=HEADERS, params={**PARAMS, "page": page}, timeout=60) if r.status_code != 200: print("stopped at page", page, r.status_code) break data = r.json()["data"] for item in data.get("items", []): writer.writerow([ today, item.get("id"), item.get("listing_id"), item.get("status"), item.get("price", {}).get("value"), item.get("original_price", {}).get("value"), item.get("address", {}).get("full"), item.get("beds"), item.get("baths"), item.get("sqft"), item.get("price_per_sqft"), item.get("list_date"), ]) if not data.get("pagination", {}).get("has_next_page"): break page += 1 ``` For this search, the loop makes up to 28 calls. A free account runs 1 request a second, so the sweep takes under a minute; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the paid rates, and the [errors docs](https://docs.perceptlayer.com/errors) list the codes a failed call can return. ## How do you add neighborhood and school data? Call `/v1/homes-com/neighborhood` or `/v1/homes-com/school` with an `id`, at 1 credit each. These answer the questions a listing alone doesn't: what the area around a home is like and which schools are near it. There's no recorded response for either here, so open them in the playground on the [neighborhood endpoint page](https://perceptlayer.com/apis/homes-com/neighborhood) and the [school endpoint page](https://perceptlayer.com/apis/homes-com/school) to see their fields before you design storage. To find IDs, `autocomplete` takes a `query` and a `type` of `neighborhood` or `school`. Check its output in the playground for your area: if it returns an ID for each suggestion, that's the value to try on the neighborhood or school endpoint. How often to re-check them is up to you; the cost table below assumes weekly for neighborhoods and monthly for schools. ## What does it cost per listing and per neighborhood? Every Homes.com call costs 1 credit, and search returns a page of listings per call, so the cost per listing is 1 credit divided by the page size. In the recording, a page held 25 listings, so each listing cost 0.04 credits per sweep. Neighborhood and school lookups are one call each, so they cost 1 credit per area per check. | Job | Arithmetic | Credits | | --- | --- | --- | | Try the endpoints | A search, a listing, a neighborhood, a school | 4, out of the 100 free signup credits | | Daily sweep of one 700-listing search | 28 calls × 30 days | 840 a month | | Daily sweep of all 4,617 Austin listings | At least 185 calls (4,617 ÷ 25, split into price bands of up to 700) × 30 | At least 5,550 a month | | 20 neighborhoods, weekly | 20 × 4 weeks | 80 a month | | 50 schools, monthly | 50 × 1 | 50 a month | The full Austin sweep plus 20 neighborhoods is about 5,630 credits a month, inside the Starter pack's 10,000. Split the market with `min_price` and `max_price` bands so each query's `reachable_total` covers it, and each band adds its own pages. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. To check the fields for your own market, run `search` with your `location` in the playground on the [Homes.com API page](https://perceptlayer.com/apis/homes-com), then [get a free API key](https://perceptlayer.com/signup) for the script. The [real estate APIs](https://perceptlayer.com/verticals/real-estate) page lists the other property sources, and [Redfin Scraper or API](https://perceptlayer.com/blog/redfin-scraper-vs-api) covers a similar listing workflow. ## APIs in this post - [Homes.com **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/homes-com) ## Frequently asked questions ### How much does a Homes.com API call cost? Every Homes.com endpoint costs 1 credit per successful call. A search call returns a page of listings, 25 in the recorded Austin search, so each listing costs 0.04 credits per sweep. Failed calls cost nothing and return `X-Credits-Used: 0`. The 100 free credits you get once on signup cover 100 calls. ### How many listings can one search reach? The recorded Austin search reported `total: 4617` but `reachable_total: 700` and `total_pages: 28`, so a single query reached 700 listings. To cover a larger market, split it into narrower searches with `min_price` and `max_price` bands, `property_type[]`, a `bounding_box` or bed and bath filters, and page through each. ### Can I get sold listings or rentals? Yes. `status` takes `active` or `sold`, and `listing_type` takes `sale` or `rent`. For rentals, `sort` includes `rent_asc`. The recorded call used `listing_type=sale` and didn't set `status`, so run a `sold` or `rent` search in the playground to see how those responses look before you store them. ### Does the response include agent details? Each search item in the recording has an `agent` object with a name, agency, phone number and photo. There are also `agent` and `agent-autocomplete` endpoints. Leave agents' personal details out of what you store unless you have a lawful basis for keeping them, and don't use them to contact people. ### Can an AI agent search Homes.com? Yes. Add the MCP server at `https://perceptlayer.com/mcp` and the agent can find the Homes.com endpoints with `search_endpoints` and call them with `call_endpoint`, at 1 credit per successful call. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup, including the Claude Code command. homes.com real estate listings neighborhoods schools ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 20 Oct 2026 Perceptlayer 6 min read ## [MLS API: How to Get MLS Listing Data](https://perceptlayer.com/blog/mls-api-listing-data) An MLS API means a RESO Web API feed licensed through an MLS or broker. Compare it with Zillow and Redfin listing endpoints at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Oct 2026 Updated 24 Oct 2026 Perceptlayer 7 min read ## [Redfin API: Search Homes, Then Property and Valuation](https://perceptlayer.com/blog/redfin-api-property-valuation) Four Redfin endpoints at 1 credit each: find a region, search homes with a real JSON response, then call property and valuation by property\_id. --- title: "Poshmark and Mercari APIs: Resale Listings as JSON" description: "Poshmark and Mercari search side by side: filters, listing fields such as original_price and condition, paging, and 1 credit per page of listings." url: https://perceptlayer.com/blog/poshmark-mercari-api-resale-listings --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Poshmark and Mercari APIs: Resale Listings as JSON 16 Nov 2026 Perceptlayer 7 min read The Poshmark API on Perceptlayer returns Poshmark search results as JSON: one `GET /v1/poshmark/search` call takes a query plus brand, size, condition, colour and price filters, and returns a page of listings with price, original price, condition, sizes and dates, for 1 credit. Mercari has a matching `GET /v1/mercari/search` at the same cost. This guide puts the two side by side using recorded responses: the request, the parameters, the listing fields, paging, and the cost per listing. ## Key takeaways - Poshmark has 4 endpoints ( `search`, `listing`, `closet`, `suggestions`) and Mercari has 3 ( `search`, `item`, `seller`); every one is `GET` and costs 1 credit per successful call. - Poshmark search needs no parameter; Mercari search requires `market` ( `us` or `jp`), `status` ( `on_sale` or `sold`) and `page`. - Poshmark returns prices as objects ( `price.amount`, `original_price`, `first_listed_price`, optional `discount.percent`); Mercari returns `price` as a number with a separate `currency`. - The recorded Mercari search reports `per_page` 30, so 1 credit buys 30 listings, about 0.033 credits per listing; Poshmark's recorded `pagination.count` is 48. - Poshmark pages with a `cursor` (the response carries `pagination.next_cursor`); Mercari pages with `page` and reports `has_next`. ## Which Poshmark and Mercari endpoints are there? Poshmark has four endpoints and Mercari has three, all at 1 credit per successful call. For listings data, search is the endpoint you'll use most on both: it returns a page of listings with their prices and details, so you rarely need the single-listing call. Failed calls cost nothing on either. | Site | Endpoint | Returns | Required parameters | Optional parameters | | --- | --- | --- | --- | --- | | Poshmark | `GET /v1/poshmark/search` | A page of listings | none | `query`, `brand[]`, `category`, `category_feature`, `department`, `size[]`, `condition[]`, `color[]`, `price_min`, `price_max`, `availability`, `sort`, `cursor`, `page`, `count`, `country` | | Poshmark | `GET /v1/poshmark/listing` | One listing | none | `id`, `url`, `country` | | Poshmark | `GET /v1/poshmark/suggestions` | Search suggestions | `query` | `country` | | Poshmark | `GET /v1/poshmark/closet` | Closet | `username` | `availability`, `sort`, `cursor`, `page`, `country` | | Mercari | `GET /v1/mercari/search` | A page of items | `market`, `status`, `page` | `query`, `category`, `brand`, `size`, `color`, `condition`, `min_price`, `max_price`, `sort`, `shipping_payer`, `seller` | | Mercari | `GET /v1/mercari/item` | One item | `market` | `id`, `url` | | Mercari | `GET /v1/mercari/seller` | Seller | `market`, `id`, `status`, `page` | none | Search listings on both sites carry an `id` and a `url`, and the single-listing endpoints take `id` or `url`, so the names match. This guide has recorded responses for the two search endpoints only; the [Poshmark API page](https://perceptlayer.com/apis/poshmark) and [Mercari API page](https://perceptlayer.com/apis/mercari) have playgrounds for the rest. ## How do you search Poshmark listings? Send a `GET` request to `https://api.perceptlayer.com/v1/poshmark/search` with your key in the `X-API-Key` header. No parameter is required, but you'll want a `query` and a few filters. List filters take bracketed names and can repeat. This request searches for Zara jackets, new with tags, with `price_max=60`, sorted by price: ```bash curl "https://api.perceptlayer.com/v1/poshmark/search?query=jacket&brand[]=Zara&condition[]=nwt&price_max=60&sort=price_asc" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the `api_key` query parameter for clients that can't set headers. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`. ## How do you search Mercari listings? Mercari search requires three parameters: `market` ( `us` or `jp`), `status` ( `on_sale` or `sold`) and `page`. Add `query`, `sort` and filters on top. The `status` parameter makes it a choice in every call whether you read live listings or sold ones. This request searches the US market for Nike items on sale, cheapest first: ```bash curl "https://api.perceptlayer.com/v1/mercari/search?market=us&query=nike&status=on_sale&sort=price_asc&page=1" \ -H "X-API-Key: $API_KEY" ``` ## Which search parameters do the two sites take? Both search endpoints filter on keyword, brand, size, colour, condition and price, and both sort by price, but the names, the list syntax and the allowed values differ. Poshmark takes lists ( `brand[]`, `size[]`) and a coded condition; Mercari takes single strings and adds a shipping filter. The table lists what the API documents; nothing else about these parameters is documented. | What it filters | Poshmark | Mercari | | --- | --- | --- | | Keyword | `query`, up to 100 characters | `query`, up to 200 characters | | Brand | `brand[]`, list, up to 60 characters | `brand`, string | | Category | `category`, `category_feature`, `department` ( `Women`, `Men`, `Kids`) | `category` | | Size | `size[]`, list | `size` | | Colour | `color[]`, list | `color` | | Condition | `condition[]`: `nwt`, `uln`, `ug`, `uf` | `condition`, string | | Price | `price_min`, `price_max` | `min_price`, `max_price` | | Live or sold | `availability`: `available`, `sold`, `not_for_sale`, `all` | `status` (required): `on_sale`, `sold` | | Sort | `relevance`, `price_asc`, `price_desc`, `added_desc`, `price_drop`, `like_count` | `relevance`, `price_asc`, `price_desc`, `newest` | | Shipping | none | `shipping_payer`: `buyer`, `seller` | | Country or market | `country`: `us`, `ca` | `market` (required): `us`, `jp` | | Paging | `cursor`, `page` (only `1`), `count` | `page` (required) | The Poshmark response includes a `filters_applied` object that echoes what the search used. In the recording it lists `availability` as `available`, which the request didn't send, so log `filters_applied` with each run rather than assuming what a search covered. Only one condition code is labelled in the recording: `nwt` comes back as "New with tags". ## What does a listing look like on each site? A Poshmark listing is the richer record: prices as objects with a currency, the original and first-listed price, a discount where there is one, per-size quantities, and likes, comments and shares. A Mercari item is flatter: a numeric `price` with `currency`, `condition`, `category`, optional `brand` and `size` objects, photos and dates. Both carry an `id`, `url`, `title` and `listed_at`. This is the first part of the second recorded Poshmark listing, with the seller block and images removed: ```json { "success": true, "items": [ … { "id": "6abbe055728253db5936c234", "url": "https://poshmark.com/listing/6abbe055728253db5936c234", "title": "Zara Kids Jacket in Beige Size 3 Years NWT", "brand": "Zara", "department": "Kids", "category": { "slug": "Jackets_&_Coats", "name": "Jackets & Coats" }, "condition": { "code": "nwt", "label": "New with tags" }, "size": "98 cm", "sizes": [ { "size": "98 cm", "quantity_available": 1, "quantity_sold": 0, "quantity_reserved": 0 } ], "price": { "amount": 3, "currency": "USD" }, "original_price": { "amount": 30, "currency": "USD" }, "discount": { "percent": 90, "amount": 27 }, "first_listed_price": { "amount": 5, "currency": "USD" }, … "likes": 2, "comments_count": 0, "shares": 17, "listed_at": "2026-09-29T16:04:11+00:00", "updated_at": "2026-10-19T19:20:40+00:00", … "availability": "available", "sold": false } ], "pagination": { "next_cursor": "ENC_eyJtYXhfaWRzIjpbNDksMSwxXSwi…", "has_more": true, "count": 48, "total": 5000, "total_capped": true }, … } ``` And the second recorded Mercari item, with the seller block removed: ```json { "success": true, "data": { "market": "us", "query": "nike", "page": 1, "per_page": 30, "total": 10000, "total_is_capped": true, "has_next": true, "items": [ … { "id": "m47199620622", "url": "https://www.mercari.com/us/item/m47199620622/", "title": "XL Nike Baseball Pants", "price": 1, "currency": "USD", "status": "on_sale", "condition": { "id": 3, "name": "Good" }, "brand": { "id": 4578, "name": "Nike" }, "size": { "id": 12, "name": "XL (46-48)" }, "category": { "id": 379, "name": "Pants" }, … "likes": 0, "listed_at": "2024-11-23T00:33:02Z", "updated_at": "2025-01-08T00:52:46Z", … } ] }, … } ``` | Field | Poshmark | Mercari | | --- | --- | --- | | Price | `price.amount`, `price.currency` | `price`, `currency` | | Earlier prices | `original_price`, `first_listed_price`, optional `discount` | none in the recording | | Condition | `condition.code`, `condition.label` | `condition.id`, `condition.name` | | Brand | `brand` (string) | `brand.id`, `brand.name` (optional) | | Size | `size`, `sizes[]` with quantities | `size.id`, `size.name` (optional) | | Category | `category.slug`, `category.name`, `category_path` | `category.id`, `category.name` | | Images | `images[].url`, `images[].thumbnail` | `thumbnail`, `photos[]` | | Engagement | `likes`, `comments_count`, `shares` | `likes` | | Status | `availability`, `sold` | `status` | | Dates | `listed_at`, `updated_at` | `listed_at`, `updated_at` | Both responses also include a `seller` object on each listing. If you store listings, drop it: listing data such as price, brand, size and condition answers resale questions without any details about the people selling. ### What should you watch for in the results? Cheapest-first sorting surfaces odd matches on both sites. The first recorded Mercari result for "nike" is a sticker in the "Single Cards" category at a price of 1, and the first Poshmark result is titled just "Jackets" at 3. Narrow with category, brand and `price_min` or `min_price` before you sort by price, and treat optional fields such as Mercari's `brand` and `size`, which the first item lacks, as possibly absent. ## How do you page through results? The two sites page differently. Poshmark's `page` parameter accepts only `1`, and the response carries `pagination.next_cursor` and `has_more`, while the endpoint takes a `cursor` parameter; the names match, so try passing `next_cursor` back as `cursor` in the playground. Mercari takes a required `page` and reports `has_next`, `per_page` and `total`. Both report capped totals. The Poshmark recording shows `total` 5000 with `total_capped: true`, and the Mercari recording shows `total` 10000 with `total_is_capped: true`. Treat those as "at least" figures, and split a broad search into narrower ones by brand, size or price band when you need all of it. ### A script that reads both into one table This Python script runs one search on each site and writes the listings to a CSV file with shared columns. It reads only fields in the recorded responses, uses `.get` for optional ones, and leaves the `seller` object out. ```python import csv import os import requests API_KEY = os.environ["API_KEY"] BASE = "https://api.perceptlayer.com/v1" HEADERS = {"X-API-Key": API_KEY} def get(path, params): r = requests.get(f"{BASE}/{path}", params=params, headers=HEADERS, timeout=60) r.raise_for_status() return r.json() def poshmark_rows(query): body = get("poshmark/search", {"query": query, "sort": "price_asc"}) for item in body["items"]: yield ["poshmark", item["id"], item["title"], item["price"]["amount"], item["price"]["currency"], item["condition"]["label"], item.get("brand", ""), item["url"], item["listed_at"]] def mercari_rows(query): body = get("mercari/search", {"market": "us", "query": query, "status": "on_sale", "sort": "price_asc", "page": 1}) for item in body["data"]["items"]: brand = item.get("brand") yield ["mercari", item["id"], item["title"], item["price"], item["currency"], item["condition"]["name"], brand["name"] if brand else "", item["url"], item["listed_at"]] with open("resale.csv", "w", newline="") as f: out = csv.writer(f) out.writerow(["site", "id", "title", "price", "currency", "condition", "brand", "url", "listed_at"]) out.writerows(poshmark_rows("zara jacket")) out.writerows(mercari_rows("zara jacket")) ``` That's 2 calls, 2 credits. Add `try`/ `except` around `get` for production: every error comes back with an HTTP status and a JSON body with `code`, `message` and `request_id`, and a 429 or 503 carries `Retry-After`. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does resale listing data cost? Each successful search call costs 1 credit on either site, so the cost per listing is 1 credit divided by the listings a page returns. At the recorded Mercari `per_page` of 30, that's about 0.033 credits per listing. On Poshmark, the recorded `pagination.count` is 48; check it in your own calls before you budget on it. | Plan | Arithmetic | Credits | | --- | --- | --- | | 10 searches on each site, first page, once | 10 × 2 × 1 credit | 20 | | 20 searches on each site, 3 pages each, daily for 30 days | 20 × 2 × 3 × 30 × 1 credit | 3,600 | | 3,000 Mercari listings once (30 per page) | 3,000 ÷ 30 × 1 credit | 100 | | 100 single-listing lookups a day for 30 days | 100 × 30 × 1 credit | 3,000 | The 100 free credits on signup cover the first plan five times, or one 100-page Mercari pull. The second and fourth plans each fit the Starter pack's 10,000 credits, and together (6,600) still do. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To try it, run `search` in the playground on the [Poshmark search endpoint](https://perceptlayer.com/apis/poshmark/search) and the [Mercari search endpoint](https://perceptlayer.com/apis/mercari/search) with the same query, compare the fields you need, then [get a free API key](https://perceptlayer.com/signup). The [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists other resale sources, and [Vinted Scraper or API](https://perceptlayer.com/blog/vinted-scraper-vs-api) covers a third. ## APIs in this post - [Poshmark **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/poshmark) - [Mercari **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/mercari) ## Frequently asked questions ### How much does a Poshmark API call cost? Every Poshmark and Mercari endpoint costs 1 credit per successful call, and a failed call costs nothing and returns `X-Credits-Used: 0`. A search call returns a page of listings, so the cost per listing is a fraction of a credit: at the recorded Mercari `per_page` of 30, about 0.033 credits. The 100 free credits on signup cover 100 searches. ### Can I get sold listings from Poshmark and Mercari? Yes, as a filter. Poshmark search takes `availability` with `available`, `sold`, `not_for_sale` or `all`, and each listing carries `availability` and `sold`. Mercari search requires `status`, either `on_sale` or `sold`, and each item carries `status`. Both recorded searches are of live listings, so check a sold search in the playground before you build on its fields. ### Does the Poshmark API work for Canada? Every Poshmark endpoint takes an optional `country` parameter, `us` or `ca`; the recorded response reports `country` as `us`. Mercari's endpoints require `market`, `us` or `jp`. Each country or market is a separate call at 1 credit, so store the country with every listing and keep currencies apart: each Poshmark price object carries its own `currency`. ### Do the responses include seller details? Each listing in both recorded responses carries a `seller` object. Leave it out of what you store: resale analysis needs price, brand, size, condition and dates, not the people selling. Don't use listing data to contact sellers. The `closet` and `seller` endpoints exist, and their parameters are listed on the Poshmark and Mercari API pages. ### Can an AI agent search Poshmark and Mercari? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the endpoints with `search_endpoints`, reads their parameters with `get_endpoint` (both free) and runs a search with `call_endpoint`, which spends credits only on success and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover the setup. poshmark mercari resale marketplaces listings data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Oct 2026 Updated 7 Nov 2026 Perceptlayer 6 min read ## [Vinted API: Search Second-Hand Items as JSON](https://perceptlayer.com/blog/vinted-api-search-items-json) Search Vinted as JSON with 14 optional parameters, then price-check one query across 19 countries. Each call costs 1 credit; failed calls cost nothing. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [StockX API: Product and Resale Price Data as JSON](https://perceptlayer.com/blog/stockx-api-sneaker-prices) Search StockX and read lowest\_ask, highest\_bid, last\_sale and sales\_last\_90d as JSON at 1 credit a call, then track a sneaker list daily. --- title: "Shopify Scraper or API: What You Get | Perceptlayer" description: "A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked." url: https://perceptlayer.com/blog/shopify-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Shopify Scraper or API: What You Get 16 Nov 2026 Perceptlayer 8 min read A Shopify scraper is code that reads the public product pages of a store built on Shopify and pulls out titles, prices, variants, stock status and images. You maintain the fetching, the parsing and the paging, for every store you track. The alternative is `GET /v1/shopify/products`, which takes a store's domain and returns its public storefront products as JSON, variants included, at 1 credit a call. This post compares the two on a recorded call, works out the cost per product tracked, and gives a verdict per use case. ## Key takeaways - `GET /v1/shopify/products` requires only `store` (a domain, up to 255 characters) and takes optional `page`, `limit` and `collection`; each successful call costs 1 credit. - The recorded call for `store=allbirds.com` returned `count` 30 products with `next_page` 2, and a store-level `currency` of USD. - Each product carries `title`, `handle`, `vendor`, `tags`, `price_min`, `price_max`, `available`, `options`, `images` and `variants[]`, and each variant its own `sku`, `price` and `available`. - At 30 products a call, reading a 600-product store is 20 calls × 1 credit = 20 credits, or about 0.033 credits per product per check. - This reads public storefront product data, the same products any visitor sees. It isn't a way into a store's back office, orders or customers. ## What would a Shopify scraper have to handle? A scraper for Shopify stores has the usual three parts (a fetcher, a parser and a monitor), with one twist: you rarely track one store. Each store you add has its own page layout, its own product URLs and its own way of showing sizes, colours and stock, so a parser that works on one store can return nothing useful on the next. The work grows with the number of stores, not just the number of products. The fetcher has to find every product: walk collection or listing pages, follow pagination, and avoid counting the same product twice when it appears in several collections. The parser has to get beyond the visible price. A product page shows one price and one selected size, while the data you usually want sits per variant: each size or colour with its own SKU, price and stock flag. Pulling that out of page markup is the part most likely to break when a store redesigns. The monitor is what tells you a run went wrong, because a broken parser tends to return empty fields rather than errors. You also need pacing, retries and storage. None of this is specific to Shopify; it's what any multi-site scraper costs to keep running. Before you collect from any store, read that store's terms, and if a store blocks automated traffic, stop rather than work around it. ## What does the products endpoint return? The products endpoint returns one page of a store's public products, each with its variants, options and images already split into fields. You pass the store's domain in `store`; `page` and `limit` control paging and `collection` narrows the read to one collection. One request, one credit, and no parser of your own. | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `store` | string | yes | Up to 255 characters | | `page` | integer | no | No further constraint documented | | `limit` | integer | no | No further constraint documented | | `collection` | string | no | Up to 255 characters | This is the recorded request: ```bash curl "https://api.perceptlayer.com/v1/shopify/products?store=allbirds.com" \ -H "X-API-Key: $API_KEY" ``` And the recorded response, trimmed to the first product: ```json { "success": true, "data": { "store": "allbirds.com", "page": 1, "limit": 30, "next_page": 2, "currency": "USD", "count": 30, "products": [ { "id": 7292464824400, "title": "Women's Wool Cruiser - Port (Port Sole)", "handle": "womens-wool-cruiser-port-port-sole", "url": "https://allbirds.com/products/womens-wool-cruiser-port-port-sole", "vendor": "Allbirds", "tags": [ "11/3/26 DROP", … ], "description_html": "

Innovation meets individuality in the Wool Cruiser, …", "published_at": "2026-11-04T15:48:27-08:00", "created_at": "2026-02-04T17:37:18-08:00", "updated_at": "2026-11-12T05:01:31-08:00", "available": true, "price_min": 120, "price_max": 120, "options": [ { "name": "Size", "position": 1, "values": [ "5", "5.5" ] } ], "variants": [ { "id": 41990816137296, "title": "5", "option1": "5", "sku": "A12858W050", "price": 120, "available": false, "grams": 1000, "requires_shipping": true, "taxable": true, "position": 1 }, … ], "images": [ { "id": 38092255035472, "src": "https://cdn.shopify.com/s/files/1/1104/4168/files/A12858W090-PORT_SIDE_TRANSPARENT.png?v=1793836076", "width": 2000, "height": 2000, "position": 1 }, … ] }, … ] }, "meta": { "request_id": "req_91a533fca14245c29898ff0cd3538c6f", "credits_charged": 1, "credits_remaining": 1911 } } ``` ### Why read variants, not just the product? The product-level fields can hide what changed. In the recording, the first product is `available: true`, yet both variants shown, sizes 5 and 5.5, are `available: false`; the second product's same two sizes are `available: true`. A tracker that stores only the product flag misses which sizes sold out. Key your history on `variants[].id` or `sku`, and store `price` and `available` per variant. `price_min` and `price_max` are worth keeping too: when they differ, variants are priced differently, and a change in either is a quick signal that something moved. The `currency` sits once at the top of `data`, not on each price, so store it with every run. ### How does paging work? The response reports `page` 1, `limit` 30, `count` 30 and `next_page` 2, and the endpoint takes `page` and `limit` parameters, so the names match. Request the next page with `page=2` and check in the playground what it returns for your store, including how the last page looks, before you automate it. Each page is another call at 1 credit. ## How do a scraper and the endpoint compare? A scraper costs engineering time per store and fails quietly when a layout changes; the endpoint costs a credit per page and returns named JSON fields. The table compares them for a recurring job, such as checking prices and stock across a set of competitor stores every day. | | DIY Shopify scraper | Shopify products endpoint | | --- | --- | --- | | Setup | Fetcher, per-store parsers, paging, storage, monitoring | API key in the `X-API-Key` header | | Adding a store | Check its layout, adjust or write a parser | Pass its domain in `store` | | Variant data | Parsed from page markup, per store | `variants[]` with `id`, `sku`, `price`, `available`, `option1` | | Images | Collected and deduplicated yourself | `images[]` with `src`, `width`, `height`, `position` | | When a store redesigns | Parser returns empty fields until you fix it | You read named JSON fields; there's no parser of yours to fix | | Paging | Walk collection pages, dedupe products | `page` and `limit`; response reports `next_page` and `count` | | Content outside product data | Whatever you can parse from the page | Not included: only the fields in the response | | Speed | As fast as you can fetch politely | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call; failed calls cost 0 | ### What does tracking a product cost? On the endpoint, the cost follows pages, not products. At the recorded 30 products a call, one check of a 600-product store is 600 ÷ 30 = 20 calls, so 20 credits, or about 0.033 credits per product. Narrow with `collection` when you only care about one range, and the call count drops with it. | Plan | Arithmetic | Credits | | --- | --- | --- | | One 600-product store, once | 20 pages × 1 credit | 20 | | One 600-product store, daily for 30 days | 20 × 30 × 1 credit | 600 | | 10 stores of 600 products, daily for 30 days | 10 × 20 × 30 × 1 credit | 6,000 | | 10 stores, one 90-product collection each, daily for 30 days | 10 × 3 × 30 × 1 credit | 900 | The 100 free credits on signup cover five full reads of a 600-product store, enough to test change detection before you commit. The 10-store daily plan at 6,000 credits a month fits the Starter pack's 10,000; a year of it, 72,000 credits, fits the Growth pack's 200,000. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. ## How do you detect price and stock changes? Change detection is a comparison of today's variants with yesterday's: key each variant by its `id`, and report any change in `price` or `available`. The Python script below reads page 1 of each store, saves a JSON snapshot, and prints the differences from the last run. It reads only fields in the recorded response. ```python import json import os import pathlib import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/shopify/products" STORES = ["allbirds.com"] SNAPSHOT = pathlib.Path("shopify_snapshot.json") def variants(store, page=1): r = requests.get(URL, params={"store": store, "page": page}, headers={"X-API-Key": API_KEY}, timeout=60) r.raise_for_status() data = r.json()["data"] for product in data["products"]: for v in product["variants"]: yield str(v["id"]), { "store": store, "product": product["title"], "sku": v["sku"], "price": v["price"], "available": v["available"], "currency": data["currency"], } previous = json.loads(SNAPSHOT.read_text()) if SNAPSHOT.exists() else {} current = {} for store in STORES: current.update(variants(store)) for vid, now in current.items(): before = previous.get(vid) if before is None: print("new", now["sku"], now["product"], now["price"]) elif before["price"] != now["price"]: print("price", now["sku"], before["price"], "->", now["price"]) elif before["available"] != now["available"]: print("stock", now["sku"], "in stock" if now["available"] else "sold out") SNAPSHOT.write_text(json.dumps(current)) ``` Extend `variants` to further pages once you've confirmed paging for your stores, and run it from cron once a day. Errors come back with an HTTP status and a JSON body with `code`, `message` and `request_id`; a 429 or 503 carries `Retry-After`, and treat `invalid_parameters` (422) as a bug in your store list. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## Which route fits your job? Pick by how many stores you track, how often, and whether the fields in the response cover what you need. If they do, the endpoint removes per-store parsing, which is the expensive part of a Shopify scraper. If you need something the response doesn't carry, only a page fetcher gets it. - **Daily price and stock tracking across competitor stores**: use the endpoint. Key on `variants[].id`, store `price` and `available`, and budget about 0.033 credits per product per check. - **Building a product catalogue with SKUs and images**: use the endpoint. `sku`, `options`, `images` and `description_html` come back per product, with no parser per store. - **Watching one collection or new arrivals**: pass `collection`, and compare `published_at` across runs to spot new products. - **Data that isn't in the response**, such as page content a store adds around its products: you need a page fetcher, and the per-store parsing that comes with it. - **Your own store's data**: use what you already have as the merchant. This endpoint reads the public storefront, the same view a visitor gets. - **A one-off look at a few products**: open the store in a browser. - **An agent researching products**: give it the endpoint through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. For the wider picture of retail price data, [Google Shopping Scraper or API](https://perceptlayer.com/blog/google-shopping-scraper-vs-api) compares offers across sellers, and [AliExpress Scraper or API](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) covers a marketplace. To check the fields against a store you track, run `products` in the playground on the [Shopify API page](https://perceptlayer.com/apis/shopify), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Shopify **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/shopify) ## Frequently asked questions ### Is scraping Shopify stores allowed? It depends on each store's terms and the law where you operate, so read the terms of every store you collect from and get legal advice for commercial use. Don't get around blocks or other protections. Public product facts such as titles, prices and stock flags are a different matter from personal data; the products endpoint returns product data only. ### Can I get every product in a store? The recorded call returned `count` 30 with `next_page` 2, and the endpoint takes `page` and `limit`, so you read a store page by page at 1 credit each. A 600-product store at 30 a page is 20 calls. Use `collection` to read only part of a store. Check in the playground how paging behaves for the stores you track. ### Does the Shopify endpoint return stock levels? It returns stock flags, not quantities. Each product has `available`, and each variant has its own `available` boolean next to its `sku` and `price`. In the recorded response, a product marked `available: true` has two sizes marked `available: false`, so track the variant flags to see which sizes sold out. ### Does a failed call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with `code`, `message` and `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. Requests have no idempotency key, so a client timeout may hide a call that succeeded. ### How fast can I check many stores? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 200-call daily run takes under four minutes. Paying accounts run at least 5 requests a second (300 a minute). The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. shopify ecommerce product data scraping price monitoring ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Google Shopping Scraper or API: What You Get](https://perceptlayer.com/blog/google-shopping-scraper-vs-api) A Google Shopping scraper vs one GET at 1 credit: the recorded iphone 15 search with source, extracted\_price and product\_id, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 8 min read ## [Amazon Scraper or API: Search, Offers and Reviews](https://perceptlayer.com/blog/amazon-scraper-vs-api) An Amazon scraper vs 18 endpoints at 1 credit a call: a recorded laptop stand search with asin, price.amount and rating, and the domains each call takes. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 8 min read ## [AliExpress Scraper or API: What You Get](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) An AliExpress scraper vs 1-credit endpoints: a recorded search with 60 products a page, price.amount, sold\_count and is\_sponsored, and cost per product. --- title: "StockX API: Product and Resale Price Data as JSON" description: "Search StockX and read lowest_ask, highest_bid, last_sale and sales_last_90d as JSON at 1 credit a call, then track a sneaker list daily." url: https://perceptlayer.com/blog/stockx-api-sneaker-prices --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # StockX API: Product and Resale Price Data as JSON 16 Nov 2026 Perceptlayer 8 min read The StockX API on Perceptlayer returns StockX product and market data as JSON: one `GET /v1/stockx/search` call returns a page of products, each with its `lowest_ask`, `highest_bid`, `last_sale`, 90-day average price and sales counts, at 1 credit per successful call. Two more endpoints cover a single product and its sales. This guide shows the search request, its parameters, a recorded response, a script that tracks resale prices for a sneaker list, and what that costs in credits. ## Key takeaways - The StockX API has 3 endpoints, all `GET` and 1 credit per successful call: `search`, `product` and `sales`. Each requires `country` (US, DE or GB) and `currency` (USD, EUR or GBP). - `search` requires `sort`, `page`, `country` and `currency`; `sort` is one of `featured`, `lowest_ask`, `price_premium`, `recent_asks`, `volatility` or `average_price`. - Each search item carries `id`, `slug`, `title`, `lowest_ask`, `all_in_price`, `highest_bid`, `last_sale`, `price_premium`, `volatility`, `average_price_90d`, `sales_last_90d` and more, so one call prices a page of products. - The recorded "jordan 4" search reports `page_size` 40 and `total` 1000 across 25 pages: 25 calls × 1 credit = 25 credits to read all of them, or 0.025 credits per product. - Tracking 50 sneakers once a day with one search each is 50 × 30 days = 1,500 credits a month, inside the Starter pack's 10,000. ## Which StockX endpoints are there? There are three StockX endpoints, and search does most of the work. `search` returns a page of products with their market figures already attached, `product` returns one product, and `sales` returns a product's sales, optionally for one size. All three cost 1 credit per successful call, a failed call costs nothing, and each one needs a `country` and a `currency`, so every figure you store comes with the market it was read in. | Endpoint | Returns | Required parameters | Optional parameters | Credits | | --- | --- | --- | --- | --- | | `GET /v1/stockx/search` | A page of products with market data | `sort`, `page`, `country`, `currency` | `query`, `category`, `brand`, `gender`, `min_price`, `max_price` | 1 | | `GET /v1/stockx/product` | One product | `country`, `currency` | `url`, `slug`, `id` | 1 | | `GET /v1/stockx/sales` | A product's sales | `product`, `country`, `currency` | `size` | 1 | Only the search endpoint has a recorded response in this guide, so the fields below all come from search. For the shape of `product` and `sales` responses, run them in the playground on the [StockX API page](https://perceptlayer.com/apis/stockx), or read the [product endpoint](https://perceptlayer.com/apis/stockx/product) and [sales endpoint](https://perceptlayer.com/apis/stockx/sales) pages. ## How do you search StockX products? Send a `GET` request to `https://api.perceptlayer.com/v1/stockx/search` with your key in the `X-API-Key` header and the four required parameters. Add `query` for a keyword, and narrow with `brand`, `category`, `gender` or a price range. This is the request behind the recorded response used throughout this guide: ```bash curl "https://api.perceptlayer.com/v1/stockx/search?query=jordan+4&sort=lowest_ask&page=1&country=US¤cy=USD" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, the key can go in the `api_key` query parameter; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a job can log what each call cost. ### Which parameters does the search endpoint take? The search endpoint takes ten parameters, four of them required. The table lists each with the constraints the API documents; nothing else about them is documented, so test a filter in the playground before you rely on how it narrows results. | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `query` | string | no | Up to 200 characters | | `category` | string | no | Up to 60 characters | | `brand` | string | no | Up to 400 characters | | `gender` | string | no | No further constraint documented | | `min_price` | number | no | No further constraint documented | | `max_price` | number | no | No further constraint documented | | `sort` | string | yes | One of `featured`, `lowest_ask`, `price_premium`, `recent_asks`, `volatility`, `average_price` | | `page` | integer | yes | No further constraint documented | | `country` | string | yes | One of `US`, `DE`, `GB` | | `currency` | string | yes | One of `USD`, `EUR`, `GBP` | The recorded response echoes `query`, `country`, `currency` and `sort` back at the top of `data`, which is worth logging with every run so each stored price records the search that produced it. ## What does a StockX search result contain? Each item in `data.items` is one product with its identity, its catalogue details and a block of market figures: the lowest ask, the highest bid, the last sale, averages over 90 days and a year, sales counts, and the ask count per delivery level. This is the recorded response, trimmed to the first item and the paging block: ```json { "success": true, "data": { "query": "jordan 4", "country": "US", "currency": "USD", "sort": "lowest_ask", "items": [ { "id": "b9dc5dd4-05ec-4f97-8fa7-6808802c0b83", "slug": "air-jordan-4-retro-vivid-sulfur-womens", "url": "https://stockx.com/air-jordan-4-retro-vivid-sulfur-womens", "title": "Jordan 4 Retro Vivid Sulfur (Women's)", "model": "Jordan 4 Retro", "brand": "Jordan", "gender": "women", "category": "sneakers", "condition": "New", "release_date": "2024-04-06", … "sizes_count": 25, "lowest_ask": { "amount": 12, "currency": "USD" }, "lowest_ask_updated_at": "2026-11-11T06:57:02Z", "all_in_price": { "amount": 18.91, "currency": "USD" }, "highest_bid": { "amount": 122, "currency": "USD" }, "ask_count": 434, "ask_levels": { "standard": { … "ask_count": 434 }, "express_standard": { … "ask_count": 117 }, … }, "last_sale": { "amount": 69, "currency": "USD" }, "price_premium": -0.674, "volatility": 0.38852, "annual_average_price": { "amount": 132, "currency": "USD" }, "annual_sales_count": 1515, "average_price_90d": { "amount": 124, "currency": "USD" }, "sales_last_90d": 152, "sales_last_72h": 16 }, … ], "pagination": { "page": 1, "page_size": 40, "page_count": 25, "total": 1000, "has_more": true } }, "meta": { "endpoint_family": "search", "request_id": "req_34511ce3baab4c70bcdda87da9814f30", "credits_charged": 1, "credits_remaining": 1918 } } ``` | Field | What a price tracker does with it | | --- | --- | | `id`, `slug`, `url` | Identify the product across runs | | `lowest_ask.amount`, `lowest_ask_updated_at` | The current ask and when it last changed | | `all_in_price.amount` | Stored next to the ask; it's higher than `lowest_ask` in both recorded items | | `highest_bid.amount` | The bid side; absent on the second recorded item | | `last_sale.amount` | The most recent sale price | | `average_price_90d.amount`, `annual_average_price.amount` | Baselines to compare the ask against | | `sales_last_90d`, `sales_last_72h`, `annual_sales_count` | How liquid the product is | | `price_premium`, `volatility` | Figures you can also sort by | | `ask_levels` | Ask counts per delivery level: `standard`, `express_standard` and others | ### Which fields can be missing? Not every product carries every figure. In the recorded response, the second item, "Jordan 4 RM Bred (TD)", has no `highest_bid` and no `sales_last_72h`, and its `ask_levels` holds two levels where the first item holds four. Read these fields as optional and store an empty value, not a zero, when they're absent. Note also that the first item's `lowest_ask` of 12 sits far below its `average_price_90d` of 124, and the search item doesn't say which of its `sizes_count` 25 sizes the ask belongs to. When the size matters, look at the `sales` endpoint, which takes a `size`. ## How do you get one product or its sales? To look up one product, call `GET /v1/stockx/product` with `country`, `currency` and one of `url`, `slug` or `id`. Each search item carries an `id`, a `slug` and a `url`, so the names match the product endpoint's parameters; try a `slug` from your own search in the playground to see the product response before you build on it. Each call costs 1 credit. For sales, call `GET /v1/stockx/sales` with `product`, `country` and `currency`, and add `size` (up to 30 characters) to narrow it to one size. This guide has no recorded `sales` response, so it doesn't describe the fields; run it on the [sales endpoint page](https://perceptlayer.com/apis/stockx/sales) with one of your products to see what comes back, and what `product` value it accepts, before you write code against it. ## How do you track resale prices for a sneaker list? The simplest tracker runs one search per sneaker each day, finds the item whose `slug` matches the one you're tracking, and appends its market figures to a CSV file. It reads only fields that appear in the recorded response, treats `highest_bid` and `sales_last_72h` as optional, and records "not found" when the slug isn't on the page. It waits on a 429 or 503 using `Retry-After`. ```python import csv import datetime import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/stockx/search" WATCHLIST = [ {"query": "jordan 4 vivid sulfur", "slug": "air-jordan-4-retro-vivid-sulfur-womens"}, {"query": "jordan 4 rm bred", "slug": "air-jordan-4-rm-bred-td"}, ] def search(query, attempts=3): params = {"query": query, "sort": "lowest_ask", "page": 1, "country": "US", "currency": "USD"} for _ in range(attempts): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"]["items"] raise RuntimeError(f"gave up on {query}") def amount(item, key): value = item.get(key) return value["amount"] if value else "" today = datetime.date.today().isoformat() with open("stockx_prices.csv", "a", newline="") as f: out = csv.writer(f) for entry in WATCHLIST: items = search(entry["query"]) hit = next((i for i in items if i["slug"] == entry["slug"]), None) if hit is None: out.writerow([today, entry["slug"], "not found"]) else: out.writerow([ today, hit["slug"], amount(hit, "lowest_ask"), amount(hit, "all_in_price"), amount(hit, "highest_bid"), amount(hit, "last_sale"), amount(hit, "average_price_90d"), hit.get("sales_last_90d", ""), hit.get("sales_last_72h", ""), hit.get("lowest_ask_updated_at", ""), ]) time.sleep(1) ``` The one-second pause keeps the script inside the free tier's 1 request a second; paying accounts run at least 5 a second. Run it from cron once a day. To track the same sneakers in Germany or the UK, add rows with `country=DE` and `currency=EUR`, or `country=GB` and `currency=GBP`; each combination is a separate call. ### What should the job do with errors? Every error comes back with an HTTP status and a JSON body with `code`, `message` and `request_id`, and costs nothing. Treat `invalid_parameters` (422) as a bug in your watchlist, for example a `country` outside US, DE and GB, and `source_error` (502) as a reason to retry later. Requests have no idempotency key, so a client timeout can hide a call that succeeded and was billed. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does StockX price tracking cost? StockX price tracking costs 1 credit per successful call, so the bill is the number of searches you run. A watchlist costs one call per sneaker, per market, per day. A market scan costs one call per page: the recorded "jordan 4" search reports 25 pages of 40, so reading all 1,000 products is 25 credits, or 0.025 credits per product. | Plan | Arithmetic | Credits | | --- | --- | --- | | 20 sneakers, US, daily for 30 days | 20 × 1 × 30 × 1 credit | 600 | | 50 sneakers, US, daily for 30 days | 50 × 1 × 30 × 1 credit | 1,500 | | 50 sneakers, US, DE and GB, daily for 30 days | 50 × 3 × 30 × 1 credit | 4,500 | | Full "jordan 4" scan (25 pages), daily for 30 days | 25 × 30 × 1 credit | 750 | The 100 free credits on signup cover the first plan for 5 days, or four full 25-page scans. After that, the first three plans each fit the Starter pack's 10,000 credits, the second for six months. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To try it, run `search` in the playground on the [StockX API page](https://perceptlayer.com/apis/stockx) with a sneaker from your list, check that its `slug` comes back, then [get a free API key](https://perceptlayer.com/signup) and schedule the script. The [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists other resale sources, and [Vinted Scraper or API](https://perceptlayer.com/blog/vinted-scraper-vs-api) covers second-hand fashion. ## APIs in this post - [StockX **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/stockx) ## Frequently asked questions ### How much does a StockX API call cost? Each successful call to `search`, `product` or `sales` costs 1 credit, and a failed call costs nothing and returns `X-Credits-Used: 0`. One search call returns a page of products with their market figures; the recorded "jordan 4" search reports 40 per page. Tracking 50 sneakers once a day is 50 × 30 = 1,500 credits a month. ### Can I get StockX prices in euros or pounds? Yes. Every StockX endpoint requires `country`, one of `US`, `DE` or `GB`, and `currency`, one of `USD`, `EUR` or `GBP`. The recorded response echoes both back in `data`, and each price object carries its own `currency` field. Each country and currency combination is a separate call at 1 credit, so store the pair with every price. ### Can I get prices for one size? The `sales` endpoint takes an optional `size` parameter of up to 30 characters next to `product`, `country` and `currency`. This guide has no recorded `sales` response, so check its fields in the playground on the sales endpoint page before you build on them. Search results report a product-level `lowest_ask` and a `sizes_count`, not a price per size. ### How fast can I run StockX checks? Request rates are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second, 60 a minute. Paying accounts run at least 5 a second, 300 a minute, depending on the pack. Every response carries `RateLimit-Remaining` and `RateLimit-Reset`, and a 429 carries `Retry-After`. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the details. ### Can an AI agent look up sneaker prices? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the StockX endpoints with `search_endpoints`, reads their parameters with `get_endpoint` (both free) and runs a search with `call_endpoint`, which spends credits only on success and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup for Claude Code and other clients. stockx sneakers resale prices price tracking marketplaces ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Etsy API: Product Data as JSON](https://perceptlayer.com/blog/etsy-api-listings-json) One GET to /v1/etsy/product returns an Etsy listing's price, discount, stock, variations and images as JSON, at 10 credits per successful call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Vinted Scraper or API: What You Get](https://perceptlayer.com/blog/vinted-scraper-vs-api) A Vinted scraper vs 10 endpoints: one recorded search returned 24 items with price, service\_fee and total\_item\_price for 1 credit, about 0.04 credits per item. --- title: "Costco API: Product Data and Prices as JSON | Perceptlayer" description: "A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs." url: https://perceptlayer.com/blog/costco-api-product-prices --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Costco API: Product Data and Prices as JSON 15 Nov 2026 Perceptlayer 7 min read To get Costco product data and prices as JSON, call Perceptlayer's `GET /v1/costco/search` with a `query`, or look up single items with the `product` and `product-price` endpoints. In the recorded search for "laptop", one call returned 24 products, each with `id`, `brand`, `model`, a `price` object, stock status, rating and position. Every Costco endpoint costs 1 credit per successful call, so tracking prices from search pages costs far less per product than one call per item. This guide covers the endpoints, a recorded response, a tracking script and the cost per product. ## Key takeaways - The Costco API has 8 endpoints at 1 credit each: `search`, `product`, `product-price`, `autocomplete`, `reviews`, `reviews-summary`, `warehouse` and `warehouses`. - The recorded `search` for "laptop" reports `total_results` 164 and `per_page` 24, so a full snapshot of that search is 7 calls, 7 credits. - Each search item carries `price.delivery_min`, `price.delivery_max`, `price.original` and `price.currency`, plus `availability.delivery` and `member_only`. - `country` takes `us` or `ca` on most endpoints, and `locale` takes `en-US`, `en-CA` or `fr-CA`. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What can you get from the Costco API? The Costco API covers products, prices, reviews and warehouses across 8 endpoints, each at 1 credit per successful call. `search` finds products by keyword with filters; `product` and `product-price` look up one item; `reviews` and `reviews-summary` read a product's reviews; `warehouses` lists locations and `warehouse` returns one; `autocomplete` suggests search terms. Most take `country` ( `us` or `ca`) and `locale`. | Endpoint | Required | Optional | Credits | | --- | --- | --- | --- | | `GET /v1/costco/search` | `query` | 12 filters (see below) | 1 | | `GET /v1/costco/product` | `id` | `country`, `locale`, `warehouse` | 1 | | `GET /v1/costco/product-price` | `item` | `country`, `locale`, `warehouses[]` | 1 | | `GET /v1/costco/reviews` | `product_id` | `country`, `page`, `per_page`, `sort`, `rating`, `max_rating`, `locale` | 1 | | `GET /v1/costco/reviews-summary` | `product_id` | `country` | 1 | | `GET /v1/costco/autocomplete` | `query` | `country`, `locale` | 1 | | `GET /v1/costco/warehouses` | none | `locale`, `latitude`, `longitude`, `postal_code`, `page`, `per_page` | 1 | | `GET /v1/costco/warehouse` | `id` | `locale`, `include_gas` | 1 | Only the search call is recorded for this guide, so its fields are the ones shown below. Run the other endpoints in the playground on the [Costco API page](https://perceptlayer.com/apis/costco) before you build on their responses. Data comes from publicly available sources and is returned as found at the time of the call. ## How do you search Costco products? Send a `GET` request to `https://api.perceptlayer.com/v1/costco/search` with your keyword in `query` and your key in the `X-API-Key` header. This is the request behind the recorded response: ```bash curl "https://api.perceptlayer.com/v1/costco/search?query=laptop" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`, and the `api_key` query parameter works where a header can't be set; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. A successful response carries `X-Credits-Used` and `X-Credits-Remaining` headers, and the body's `meta.credits_charged` reports the same cost. ## Which parameters does the search endpoint take? `search` takes one required parameter, `query`, of up to 120 characters, and 12 optional ones for market, paging, sort order and filters. The recorded call sent only `query`. No defaults are documented, so for a tracking job, set `country`, `sort` and `per_page` explicitly to keep each day's call the same. | Parameter | Type | Allowed values or constraint | | --- | --- | --- | | `query` (required) | string | Up to 120 characters | | `country` | string | `us`, `ca` | | `locale` | string | `en-US`, `en-CA`, `fr-CA` | | `page`, `per_page` | integer | None documented | | `sort` | string | `relevance`, `price_asc`, `price_desc`, `rating_desc` | | `brand[]` | list of string | Up to 80 characters | | `min_rating` | integer | None documented | | `min_price`, `max_price` | number | None documented | | `category` | string | Up to 200 characters | | `in_stock` | boolean | None documented | | `warehouse` | string | None documented | The recorded response reports `warehouse` "243" although the request didn't send one, and the endpoint takes a `warehouse` parameter; the names match. If store-level results matter to you, pass `warehouse` yourself and log it with each snapshot. The full list is on the [search endpoint page](https://perceptlayer.com/apis/costco/search). ## What does a search response look like? The response holds paging fields, the `items` array and `facets` with counts per price and rating band. This is the recorded response for "laptop", trimmed to one item and the fields a price tracker reads. The `promotional_statement` and `promotions` fields, which carry promotion text, are cut here. ```json { "success": true, "data": { "query": "laptop", "country": "us", "page": 1, "per_page": 24, "total_results": 164, "has_next_page": true, "warehouse": "243", "items": [ { "id": "4201046364", "title": "Acer Aspire 16\" AI Copilot+ PC Touchscreen Laptop - Intel Core Ultra 7 processor 256V - …", "brand": "Acer", "categories": [ "Computers", "Computers > Laptops" ], "model": "A16-52MT-78LQ", "rating": { "average": 5, "count": 2 }, "price": { "currency": "USD", "delivery_min": 599.99, "delivery_max": 599.99, "original": 899.99 }, "member_only": false, "availability": { "delivery": "IN_STOCK" }, "delivery_type": "Warehouse Pick-up", … "position": 1 }, … ], "facets": [ { "key": "price", "values": [ { "min": 25, "max": 50, "count": 10 }, … ] }, … ] }, "meta": { "request_id": "req_3dc723442fcd44328042768096b44a43", "credits_charged": 1, … } } ``` | Field | What a price tracker does with it | | --- | --- | | `id` | Key for your product table; the `product` endpoint takes an `id` parameter | | `brand`, `model`, `title` | Match the item to your own catalogue | | `price.delivery_min`, `price.delivery_max` | Store both; they are equal for both recorded items | | `price.original` | Store next to the current figures to see markdowns | | `price.currency` | Store with every price | | `availability.delivery`, `member_only` | Stock status and member-only flag | | `rating.average`, `rating.count` | Track alongside price | | `position` | Where the item sat in the search | | `total_results`, `has_next_page` | How many pages a full snapshot needs | ### Which fields need care? `title` and `url` can be cut short: in the recording, the first item's title and both URLs end in `…`, so match products on `id`, `brand` and `model` rather than on titles. Prices arrive as numbers next to a `currency` string, so store the currency with each figure, particularly if you track both `us` and `ca`. The second recorded item shows the same shape, with `original` at 1199.99 against `delivery_min` and `delivery_max` of 699.99. ## How do you track prices for a product list? There are two ways to track prices, and they differ in cost per product. One `product-price` call per item costs 1 credit per product per check. A search snapshot costs 1 credit per page and, in the recording, a page held 24 products. If the products you watch fall under a few searches, snapshots are much cheaper; for scattered items, per-item calls are simpler. The script below takes the snapshot route with `requests` and `csv`. For each query, it pages through results while `has_next_page` is true, up to a fixed limit, and writes one row per item. It reads only fields from the recorded response and waits on 429 and 503 using `Retry-After`. ```python import csv import datetime import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/costco/search" QUERIES = ["laptop"] MAX_PAGES = 7 def search(query, page, attempts=3): params = {"query": query, "country": "us", "sort": "relevance", "page": page} for _ in range(attempts): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"] raise RuntimeError(f"gave up on {query} page {page}") today = datetime.date.today().isoformat() with open("costco_prices.csv", "a", newline="") as f: out = csv.writer(f) for query in QUERIES: for page in range(1, MAX_PAGES + 1): data = search(query, page) for item in data.get("items", []): price = item.get("price", {}) rating = item.get("rating", {}) out.writerow([ today, query, data.get("warehouse", ""), item.get("id"), item.get("brand", ""), item.get("model", ""), price.get("delivery_min", ""), price.get("delivery_max", ""), price.get("original", ""), price.get("currency", ""), item.get("availability", {}).get("delivery", ""), item.get("member_only", ""), rating.get("average", ""), rating.get("count", ""), item.get("position", ""), ]) if not data.get("has_next_page"): break time.sleep(1) ``` The one-second pause keeps the script within the free tier's 1 request a second; paying accounts run at least 5 a second. The response reports `page` and `has_next_page`, and the endpoint takes a `page` parameter; the names match. Filter the CSV down to the `id` values you care about, or keep every row for a category-wide price history. ### When should you call product-price instead? Call `product-price` when you watch a short list of specific items that don't share a search, or when you need prices for particular warehouses through `warehouses[]`. It takes a required `item` string; its response isn't recorded here, so check in the playground on the [product price endpoint page](https://perceptlayer.com/apis/costco/product-price) which identifier it expects and which fields come back before you switch a job over. ### What should the job do with errors? Errors come back with an HTTP status and a JSON body with `code`, `message` and `request_id`. The script retries `rate_limited` (429) and `temporarily_unavailable` (503) after `Retry-After`. Treat `invalid_parameters` (422) as a bad query and `source_error` (502) as one to retry on the next run. Requests have no idempotency key, so a client timeout may hide a billed call; keep the timeout generous. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking Costco prices cost? Tracking costs 1 credit per call, so the cost per product depends on the route. A search snapshot of the recorded "laptop" query is 164 results at 24 per page, 7 calls, which works out to under 0.05 credits per product. A `product-price` call is 1 credit per product per check. Only successful calls are billed. | Job | Arithmetic | Credits a month | | --- | --- | --- | | 1 search (164 results), daily | 7 pages × 30 days × 1 credit | 210 | | 10 searches of 7 pages, daily | 10 × 7 × 30 days × 1 credit | 2,100 | | 500 items via `product-price`, daily | 500 × 30 days × 1 credit | 15,000 | | 2,000 items via `product-price`, daily | 2,000 × 30 days × 1 credit | 60,000 | The 100 free credits on signup cover the first job for 14 days. The second fits the Starter pack's 10,000 credits for four months, the third fits the Build pack's 50,000 for three months, and the last fits the Growth pack's 200,000 for three months. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. Costco sits with the other [marketplace APIs](https://perceptlayer.com/verticals/marketplaces) on the same key, and [Google Shopping Scraper or API](https://perceptlayer.com/blog/google-shopping-scraper-vs-api) covers comparing a product across stores. To start, run the "laptop" search in the playground on the [Costco API page](https://perceptlayer.com/apis/costco), swap in your own query, then [get a free API key](https://perceptlayer.com/signup) and schedule the script. ## APIs in this post - [Costco **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/costco) ## Frequently asked questions ### How much does a Costco API call cost? Each successful call to any of the 8 Costco endpoints costs 1 credit. A failed call costs nothing and returns `X-Credits-Used: 0`. In the recorded search, one call returned 24 products, so a daily snapshot of a 164-result search is 7 calls, 210 credits a month. The pricing page lists what credit packs cost. ### Does the Costco API cover Canada? Yes, where an endpoint takes `country`: `search`, `product`, `product-price`, `autocomplete`, `reviews` and `reviews-summary` accept `us` or `ca`. Most also take `locale`, with `en-US`, `en-CA` or `fr-CA`; the `reviews` endpoint spells its locales `en_US`, `en_CA` and `fr_CA`. The recorded search sent no `country` and reports `us`. ### Can I get Costco reviews and warehouse locations? Yes. `reviews` takes a `product_id` with paging, a `sort` such as `newest` or `helpful`, and `rating` or `max_rating` filters; `reviews-summary` takes a `product_id`. `warehouses` searches by `latitude` and `longitude` or `postal_code`, and `warehouse` takes an `id` with an optional `include_gas` flag. Each call costs 1 credit. ### How fast can I call the Costco endpoints? Rates are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second, 60 a minute. Paying accounts run at least 5 a second, 300 a minute, depending on the pack. Responses carry `RateLimit-Remaining` and `RateLimit-Reset`, and a 429 carries `Retry-After`. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the details. ### Can an AI agent look up Costco prices? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Costco endpoints with `search_endpoints`, reads their parameters with `get_endpoint` (both free) and runs a search with `call_endpoint`, which spends credits on success only and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup. costco product data price tracking retail python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Etsy API: Product Data as JSON](https://perceptlayer.com/blog/etsy-api-listings-json) One GET to /v1/etsy/product returns an Etsy listing's price, discount, stock, variations and images as JSON, at 10 credits per successful call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 7 min read ## [Kroger API: Grocery Products and Prices as JSON](https://perceptlayer.com/blog/kroger-api-grocery-prices) Search Kroger products as JSON: price, regular\_price, sale\_ends, unit\_price and stock\_level per item. The recorded milk search returned 24 items for 1 credit. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Amazon Product API: Search, Offers and Reviews as JSON](https://perceptlayer.com/blog/amazon-product-api-json) Search Amazon by keyword, then look each asin up with product, offers, rating-summary and customers-say. Domain values per endpoint, 1 credit a call. --- title: "Etsy API: Product Data as JSON | Perceptlayer" description: "One GET to /v1/etsy/product returns an Etsy listing's price, discount, stock, variations and images as JSON, at 10 credits per successful call." url: https://perceptlayer.com/blog/etsy-api-listings-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Etsy API: Product Data as JSON 15 Nov 2026 Perceptlayer 7 min read To get Etsy product data as JSON, send one request to Perceptlayer's `GET /v1/etsy/product` with a `listing_id` or a `url`. The response holds the listing's title, price with discount, availability, stock count, variations, materials, images, shop ID and favourites count. The Etsy API has this one endpoint, and it costs 10 credits per successful call, so budget per product you track. This guide shows the request, the parameters, a recorded response, a tracking script and the cost. ## Key takeaways - The Etsy API has one endpoint, `GET /v1/etsy/product`, with two optional parameters, `url` and `listing_id`, at 10 credits per successful call. - The recorded response carries `price.current`, `price.original`, `price.discount_percent`, `price.currency`, `availability`, `quantity_available` and `favorites_count` for the listing. - Tracking 200 listings once a day is 200 × 30 × 10 = 60,000 credits a month; the 100 signup credits cover 10 calls. - Failed calls cost nothing and return `X-Credits-Used: 0`, and each successful response also reports `meta.credits_charged`. - `variations` lists each option group by `name`, with an `id` and a `label` per option, so you can store what a buyer can choose. ## What does the Etsy product endpoint return? The endpoint returns one Etsy listing as a JSON object: the listing ID and URL, title, description, category, a `price` object, availability and stock, images, materials, variations, shipping origin, the shop's ID, the favourites count and the date in `listed_on`. Everything sits under `data`, and a `meta` object reports the request ID and the credits charged. There is no search or shop endpoint, so you start from listings you already know. That shape fits jobs that watch a known set of products: price and discount tracking, stock monitoring, catalogue enrichment or checking how a listing's favourites count moves over time. If you need to discover listings by keyword, you need a list of listing IDs or URLs from somewhere else first; this endpoint reads them one at a time. The data comes from publicly available sources and is returned as found at the time of the call. Each call is a fresh read of one listing, so a daily job gives you a daily snapshot. ## How is this different from a seller-account integration? A seller-account integration is built around your own shop: you connect an account and work with that shop's data. This endpoint reads a public listing by its ID or URL, with one Perceptlayer key and no shop connection, so it works the same for your listings, a supplier's or a competitor's. It returns what the listing shows, not account data such as orders. That makes the trade-off simple. If you manage a shop and need to change listings or read orders, look at Etsy's own developer documentation and compare it yourself; this endpoint doesn't do that. If you need read-only product data across shops you don't own, in the same JSON shape as other marketplaces, the product endpoint fits. The [Marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) use the same key, headers and error format, so an Etsy job can sit next to, say, an AliExpress or Vinted job without a second integration. [AliExpress Scraper or API](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) and [Vinted Scraper or API](https://perceptlayer.com/blog/vinted-scraper-vs-api) cover those two. ## How do you call the Etsy product endpoint? Send a `GET` request to `https://api.perceptlayer.com/v1/etsy/product` with the listing in the query string and your key in the `X-API-Key` header. This is the request behind the recorded response used in this guide: ```bash curl "https://api.perceptlayer.com/v1/etsy/product?listing_id=1241528786" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, the key can go in the `api_key` query parameter instead; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. A successful response carries `X-Credits-Used` and `X-Credits-Remaining` headers, so a job can log each call's cost and the balance left. ## Which parameters does the endpoint take? The endpoint takes two parameters, and neither is marked required. `listing_id` is a string, and `url` is a string of up to 500 characters. The recorded call passes `listing_id` alone, and the response echoes both the `listing_id` and the listing's `url`. Nothing else about the parameters is documented, so don't assume defaults. | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `listing_id` | string | no | None documented | | `url` | string | no | Up to 500 characters | If you hold listing URLs rather than IDs, try a `url` call in the playground on the [Etsy product endpoint page](https://perceptlayer.com/apis/etsy/product) before you build a job around it, and compare the `listing_id` that comes back with your own records. The recording returns `listing_id` as a string, so store it as text. ## What does a recorded response look like? A successful response has `success`, a `data` object with the listing and a `meta` object with the request details. This is the recorded response for listing `1241528786`, trimmed to the fields a tracking job reads: ```json { "success": true, "data": { "listing_id": "1241528786", "url": "https://www.etsy.com/listing/1241528786/personalized-leather-rfid-wallet", "title": "Personalized Leather RFID Wallet, Engraved Genuine Leather Custom Wallet, …", "category": [ "Wallets" ], "price": { "current": 28, "original": 70, "discount_percent": 60, "currency": "USD" }, "availability": "InStock", "quantity_available": 1333, "rating": {}, "images": [ { "url": "https://i.etsystatic.com/35016605/r/il/a5f633/4007318605/il_fullxfull.4007318605_mj36.jpg", "thumbnail": "https://i.etsystatic.com/35016605/r/il/a5f633/4007318605/il_340x270.4007318605_mj36.jpg" }, … ], "materials": [ "Leather", "Nylon" ], "variations": [ { "name": "Engraving Side", … }, { "name": "Color", "options": [ { "id": "2682504516", "label": "Light Brown" }, … ] } ], "shipping": { "origin_country": "US" }, "shop": { "id": "35016605", … }, "favorites_count": 19378, "listed_on": "2026-11-12" }, "meta": { "request_id": "req_cef5a95241574a968fd0fb23440aff7d", "credits_charged": 10, … } } ``` | Field | What it holds in the recording | | --- | --- | | `price.current` / `price.original` | 28 and 70 | | `price.discount_percent` | 60 | | `price.currency` | `USD` | | `availability` | `InStock` | | `quantity_available` | 1333 | | `variations[].name` | `Engraving Side`, `Color` | | `shop.id` | `35016605` | | `favorites_count` | 19378 | | `meta.credits_charged` | 10 | ### Which fields need care? `rating` is an empty object in the recording, so your code shouldn't assume it holds anything. Read it defensively and store nothing when it's empty. `description` is cut short in the recording and ends in `…`, so treat it as a summary rather than the full text. The `price` figures arrive as numbers next to a `currency` string; store the currency with every price so a later change doesn't mix units. ## How do you track a set of listings in Python? A tracking job is a loop over listing IDs: one call each, a few fields from `data`, and one row appended to a CSV file. The script below does that with `requests`. It waits on a 429 or 503 using the `Retry-After` header, reads only fields that appear in the recorded response, and records the credits each call used. ```python import csv import datetime import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/etsy/product" LISTING_IDS = ["1241528786"] def fetch(listing_id, attempts=3): for _ in range(attempts): r = requests.get( URL, params={"listing_id": listing_id}, headers={"X-API-Key": API_KEY}, timeout=60, ) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json(), r.headers.get("X-Credits-Used") raise RuntimeError(f"gave up on {listing_id}") today = datetime.date.today().isoformat() with open("etsy_prices.csv", "a", newline="") as f: out = csv.writer(f) for listing_id in LISTING_IDS: body, credits = fetch(listing_id) data = body.get("data", {}) price = data.get("price", {}) out.writerow([ today, data.get("listing_id", listing_id), price.get("current", ""), price.get("original", ""), price.get("discount_percent", ""), price.get("currency", ""), data.get("availability", ""), data.get("quantity_available", ""), data.get("favorites_count", ""), credits, ]) time.sleep(1) ``` Each row holds the date, listing ID, current and original price, discount, currency, availability, stock, favourites and the credits used. The one-second pause keeps the job within the free tier's 1 request a second; paying accounts run at least 5 a second. Run it from cron at the cadence your budget allows. ### What should the job do with errors? Every error returns an HTTP status and a JSON body with `code`, `message` and `request_id`. The script retries `rate_limited` (429) and `temporarily_unavailable` (503) after `Retry-After`. Treat `invalid_parameters` (422) as a bad entry in your list and `source_error` (502) as one to retry on the next run. Requests have no idempotency key, so a client timeout may hide a call that succeeded and was billed; keep the timeout generous. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking Etsy listings cost? Tracking costs 10 credits per listing per check, and only successful calls are billed. Multiply the number of listings by the checks per month and by 10. Because Etsy calls cost ten times a 1-credit endpoint, the check cadence matters more than usual: four weekly checks a month cost 40 credits per listing, against 300 for daily checks. | Plan | Arithmetic | Credits a month | | --- | --- | --- | | 50 listings, weekly | 50 × 4 checks × 10 credits | 2,000 | | 50 listings, daily | 50 × 30 days × 10 credits | 15,000 | | 200 listings, daily | 200 × 30 days × 10 credits | 60,000 | | 1,000 listings, weekly | 1,000 × 4 checks × 10 credits | 40,000 | The 100 free credits on signup cover 10 calls, enough to test a handful of listings. The first plan fits the Starter pack's 10,000 credits for five months. The second fits the Build pack's 50,000 for three months, the third fits the Growth pack's 200,000 for three months, and the last fits the Build pack for one month. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To start, run listing `1241528786` or one of your own in the playground on the [Etsy API page](https://perceptlayer.com/apis/etsy), check that the fields you need are filled, then [get a free API key](https://perceptlayer.com/signup) and schedule the script. ## APIs in this post - [Etsy **from 10 credits per call** · 1 endpoint](https://perceptlayer.com/apis/etsy) ## Frequently asked questions ### How much does an Etsy API call cost? Each successful call to `GET /v1/etsy/product` costs 10 credits and returns one listing. A failed call costs nothing and returns `X-Credits-Used: 0`. The response's `meta.credits_charged` and the `X-Credits-Used` header both report the cost. Tracking 200 listings daily is 200 × 30 × 10 = 60,000 credits a month. The pricing page lists what credit packs cost. ### Can I search Etsy or list a whole shop? No. The Etsy API has one endpoint, `product`, which reads one listing per call by `listing_id` or `url`. It has no search or shop listing endpoint. The response includes `shop.id`, which you can store to group the listings you track by shop, but you need the listing IDs or URLs themselves from your own records. ### How fast can I call the Etsy endpoint? Request rates are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second, 60 a minute. Paying accounts run at least 5 a second, 300 a minute, depending on the pack. Responses carry `RateLimit-Remaining` and `RateLimit-Reset`, and a 429 carries `Retry-After`. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the details. ### What happens when a listing can't be fetched? The call returns an HTTP status and a JSON error body with `code`, `message` and `request_id`, such as `not_found` (404) or `source_error` (502), and no credits are debited. Log the `request_id` with the listing ID, skip it for this run and try again on the next one rather than retrying in a tight loop. ### Can an AI agent look up Etsy listings? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Etsy endpoint with `search_endpoints`, reads its parameters with `get_endpoint` (both free) and fetches a listing with `call_endpoint`, which spends 10 credits on success only and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup. etsy marketplaces product data price tracking python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Costco API: Product Data and Prices as JSON](https://perceptlayer.com/blog/costco-api-product-prices) A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 7 min read ## [Kroger API: Grocery Products and Prices as JSON](https://perceptlayer.com/blog/kroger-api-grocery-prices) Search Kroger products as JSON: price, regular\_price, sale\_ends, unit\_price and stock\_level per item. The recorded milk search returned 24 items for 1 credit. --- title: "Realtor.com API: Property Listings as JSON | Perceptlayer" description: "Watch new Realtor.com listings with the search endpoint: list_price, beds, sqft, list_date and coordinates as JSON, at 1 credit per call." url: https://perceptlayer.com/blog/realtor-com-api-listings-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Realtor.com API: Property Listings as JSON 15 Nov 2026 Perceptlayer 7 min read To get Realtor.com listings as JSON, call Perceptlayer's `GET /v1/realtor-com/search` with a `status` such as `for_sale` and a `location`. Each listing comes back with `property_id`, `list_price`, `list_date`, beds, baths, square footage, address and coordinates, plus a `total_matching_count` for the whole search. Every Realtor.com endpoint costs 1 credit per successful call, and in the recorded call one search page held 10 listings. This guide uses that to build a new-listings watcher: the request, the parameters, the response and the cost per listing tracked. ## Key takeaways - The Realtor.com API has 5 endpoints at 1 credit each: `search`, `listing`, `schools`, `agent` and `autocomplete`. - `search` requires `status` ( `for_sale`, `for_rent` or `sold`) and takes filters for location, price, beds, baths, square footage, property type, sort order and paging. - In the recorded response for 3+ bed homes for sale in Austin, `total_matching_count` is 4,497 and the page holds 10 listings, each with a `property_id`. - Watching 5 markets with 3 search pages a day costs 5 × 3 × 30 = 450 credits a month. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What can you get from the Realtor.com API? The Realtor.com API returns listing data from five endpoints, each at 1 credit per successful call. `search` finds listings for sale, for rent or sold, with filters. `listing` takes a `property_id` and returns one listing. `schools` takes a `property_id` with optional `radius_mi` and `limit_per_level`. `agent` takes a `property_id`. `autocomplete` takes a `query` and returns location suggestions. | Endpoint | Required | Optional | Credits | | --- | --- | --- | --- | | `GET /v1/realtor-com/search` | `status` | 18 filters (next section) | 1 | | `GET /v1/realtor-com/listing` | `property_id` | none | 1 | | `GET /v1/realtor-com/schools` | `property_id` | `radius_mi`, `limit_per_level` | 1 | | `GET /v1/realtor-com/agent` | `property_id` | none | 1 | | `GET /v1/realtor-com/autocomplete` | `query` | `limit`, `area_types[]` | 1 | Search results carry a `property_id` on every listing, and `listing`, `schools` and `agent` take a parameter of that name. Only the search call is recorded here, so try the other endpoints in the playground on the [Realtor.com API page](https://perceptlayer.com/apis/realtor-com) before you depend on their fields. Data comes from publicly available sources and is returned as found at the time of the call. ## How do you search Realtor.com listings? Send a `GET` request to `https://api.perceptlayer.com/v1/realtor-com/search` with `status` and your filters in the query string and your key in the `X-API-Key` header. This is the request behind the recorded response in this guide, for homes for sale in Austin with at least 3 bedrooms: ```bash curl "https://api.perceptlayer.com/v1/realtor-com/search?status=for_sale&location=Austin%2C+TX&per_page=10&min_beds=3" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`, and the `api_key` query parameter works where a header can't be set; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. Each successful response carries `X-Credits-Used` and `X-Credits-Remaining` headers, and the body's `meta.credits_charged` reports the same cost. ## Which parameters does the search endpoint take? `search` takes one required parameter, `status`, and 18 optional ones. They fall into four groups: where ( `location`, or `latitude`, `longitude` and `radius_mi`), what ( `type[]`, price, beds, baths and square footage bounds), order ( `sort`, `order`) and paging ( `page`, `per_page`). `sold_within_days` applies to sold searches. No defaults or page sizes are documented, so set what you rely on. | Parameter | Type | Allowed values or constraint | | --- | --- | --- | | `status` (required) | string | `for_sale`, `for_rent`, `sold` | | `location` | string | Up to 120 characters | | `latitude`, `longitude` | number | None documented | | `radius_mi` | number | None documented | | `type[]` | list of string | `single_family`, `condos`, `mobile`, `land`, `duplex_triplex`, `apartment` | | `sort` | string | `list_date`, `list_price`, `sold_date` | | `order` | string | `asc`, `desc` | | `sold_within_days` | integer | None documented | | `page`, `per_page` | integer | None documented | | `min_price`, `max_price` | integer | None documented | | `min_beds`, `max_beds` | integer | None documented | | `min_baths`, `max_baths` | integer | None documented | | `min_sqft`, `max_sqft` | integer | None documented | The recorded request set neither `sort` nor `order`, yet its `filters_applied` reports `list_date` and `desc`. For a new-listings watcher, send `sort=list_date&order=desc` explicitly so the order doesn't depend on behaviour that isn't documented. The full parameter list is on the [search endpoint page](https://perceptlayer.com/apis/realtor-com/search). ### How do you find the right location string? `autocomplete` takes a `query` of up to 100 characters, an optional `limit`, and `area_types[]` with `address`, `city`, `neighborhood` or `postal_code`. Use it to check how a place is spelled before you fix it in a job. Its response isn't recorded here, so run it in the playground on the [autocomplete endpoint page](https://perceptlayer.com/apis/realtor-com/autocomplete) and test the suggestion as a `location` value in `search`. ## What does a search response look like? The response holds a `listings` array, counts for the page and the whole search, paging fields and the filters the API applied. This is the recorded response, trimmed to one listing and the fields a tracker reads. The `advertisers` array, which names the agents and offices on each listing, is cut here. ```json { "success": true, "data": { "listings": [ { "property_id": "7009647360", "listing_id": "3003557193", "status": "for_sale", "list_price": 505000, "list_date": "2026-11-12T12:55:11.000000Z", "last_sold_date": "2018-10-24", "url": "https://www.realtor.com/realestateandhomes-detail/5308-Sendero-Hills-Pkwy_Austin_TX_78724_M70096-47360", "beds": 3, "baths": 3, "sqft": 2158, "lot_sqft": 11064, "year_built": 2007, "type": "single_family", "address": { "line": "5308 Sendero Hills Pkwy", "city": "Austin", "state_code": "TX", "postal_code": "78724" }, "coordinates": { "lat": 30.28292, "lon": -97.647545 }, … "flags": { "new_listing": true }, … }, … ], "count": 10, "total_matching_count": 4497, "page": 1, "per_page": 10, "has_more": true, "status": "for_sale", "filters_applied": { "location": "Austin, TX", "sort": "list_date", "order": "desc", "min_beds": 3 } }, "meta": { "request_id": "req_49d489ae7d2148248c3e2ace3ffffbb1", "credits_charged": 1, … } } ``` | Field | What a tracker or model does with it | | --- | --- | | `property_id` | Key for your table; the `listing`, `schools` and `agent` endpoints take a parameter of this name | | `list_price`, `list_date` | Asking price and when it was listed; store both on every check | | `beds`, `baths`, `sqft`, `lot_sqft`, `year_built`, `type` | Features for comparison or a valuation model | | `address`, `coordinates` | Location for joins, maps and distance filters | | `last_sold_date` | Prior sale date; present on the first recorded listing, absent on the second | | `flags.new_listing` | Marks new listings in the recording | | `total_matching_count`, `has_more` | Size of the search and whether more pages exist | ### Which fields need care? Not every listing has every field. In the recording, the second listing has no `last_sold_date`, so read optional fields with a fallback. `list_date` is a timestamp with a time zone marker, while `last_sold_date` is a plain date; parse them separately. `total_matching_count` is a useful market figure on its own: 4,497 homes for sale with 3 or more bedrooms in Austin at the time of the call. ## How do you watch for new listings in Python? A new-listings watcher runs the same search each day, sorted by `list_date` descending, and stores each `property_id` it hasn't seen. When a known listing comes back with a different `list_price`, it records the change. The script below does this with `requests` and `sqlite3`, reads only fields from the recorded response, and pages on while `has_more` is true, up to a fixed limit. ```python import datetime import os import sqlite3 import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/realtor-com/search" MARKETS = ["Austin, TX"] MAX_PAGES = 3 db = sqlite3.connect("realtor.db") db.execute("""CREATE TABLE IF NOT EXISTS listings ( property_id TEXT PRIMARY KEY, first_seen TEXT, list_date TEXT, list_price INTEGER, beds INTEGER, baths INTEGER, sqft INTEGER, postal_code TEXT, lat REAL, lon REAL, url TEXT)""") db.execute("""CREATE TABLE IF NOT EXISTS price_changes ( property_id TEXT, seen TEXT, old_price INTEGER, new_price INTEGER)""") def search(location, page, attempts=3): params = {"status": "for_sale", "location": location, "sort": "list_date", "order": "desc", "per_page": 10, "page": page, "min_beds": 3} for _ in range(attempts): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"] raise RuntimeError(f"gave up on {location} page {page}") today = datetime.date.today().isoformat() for market in MARKETS: for page in range(1, MAX_PAGES + 1): data = search(market, page) for item in data.get("listings", []): pid = item["property_id"] price = item.get("list_price") row = db.execute("SELECT list_price FROM listings WHERE property_id = ?", (pid,)).fetchone() if row is None: addr = item.get("address", {}) coords = item.get("coordinates", {}) db.execute("INSERT INTO listings VALUES (?,?,?,?,?,?,?,?,?,?,?)", ( pid, today, item.get("list_date"), price, item.get("beds"), item.get("baths"), item.get("sqft"), addr.get("postal_code"), coords.get("lat"), coords.get("lon"), item.get("url"))) elif row[0] != price: db.execute("INSERT INTO price_changes VALUES (?,?,?,?)", (pid, today, row[0], price)) db.execute("UPDATE listings SET list_price = ? WHERE property_id = ?", (price, pid)) db.commit() if not data.get("has_more"): break time.sleep(1) ``` The one-second pause keeps the script within the free tier's 1 request a second; paying accounts run at least 5 a second. Set `MAX_PAGES` to cover a normal day's new listings in each market, and raise it if a day's newest page still holds only listings you haven't seen. The recorded response reports `page` and `has_more`, and the endpoint takes a `page` parameter; the names match. ### What should the job do with errors? Errors come back with an HTTP status and a JSON body with `code`, `message` and `request_id`. The script retries `rate_limited` (429) and `temporarily_unavailable` (503) after `Retry-After`. Treat `invalid_parameters` (422) as a bad filter and `source_error` (502) as a call to retry on the next run. Requests have no idempotency key, so a client timeout may hide a billed call; keep the timeout generous. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking Realtor.com listings cost? Every Realtor.com call costs 1 credit, so the cost of tracking is the number of calls, not the number of listings. One recorded search page held 10 listings for 1 credit, which makes search pages the cheap way to watch prices across a market. A `listing` call per property costs 1 credit per listing, so keep it for properties you need in detail. | Job | Arithmetic | Credits a month | | --- | --- | --- | | 5 markets, 3 search pages a day | 5 × 3 × 30 days × 1 credit | 450 | | 20 markets, 5 search pages a day | 20 × 5 × 30 days × 1 credit | 3,000 | | 300 watched homes, one `listing` call each a day | 300 × 30 days × 1 credit | 9,000 | | 300 homes, plus one `schools` call each, once | 300 × 1 credit | 300 | The 100 free credits on signup cover the first job for about 6 days. The first three jobs together come to 12,450 credits a month, within the Build pack's 50,000 for four months. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. If you need valuations rather than a listing feed, [Redfin Scraper or API](https://perceptlayer.com/blog/redfin-scraper-vs-api) covers that source, and the [real estate APIs](https://perceptlayer.com/verticals/real-estate) list the other portals on the same key. To start, run the Austin search above in the playground on the [Realtor.com API page](https://perceptlayer.com/apis/realtor-com), swap in your own market, then [get a free API key](https://perceptlayer.com/signup) and schedule the watcher. ## APIs in this post - [Realtor.com **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/realtor-com) ## Frequently asked questions ### How much does a Realtor.com API call cost? Each successful call to any of the 5 Realtor.com endpoints costs 1 credit: `search`, `listing`, `schools`, `agent` or `autocomplete`. A failed call costs nothing and returns `X-Credits-Used: 0`. In the recorded search, one call returned 10 listings, so watching 5 markets with 3 pages a day costs 450 credits a month. The pricing page lists what credit packs cost. ### Can I get sold homes and rentals too? Yes. The `search` endpoint's required `status` parameter takes `for_sale`, `for_rent` or `sold`, and `sort` accepts `sold_date` as well as `list_date` and `list_price`. For sold searches, `sold_within_days` limits the window. Each search page is one call at 1 credit. Only the `for_sale` search is recorded here, so check the sold and rental responses in the playground. ### What do the agent and schools endpoints take? `GET /v1/realtor-com/agent` takes a required `property_id` and nothing else. `GET /v1/realtor-com/schools` takes a required `property_id` with optional `radius_mi` and `limit_per_level`. Both cost 1 credit per successful call. Search results include a `property_id` for each listing, and both endpoints take a parameter of that name. ### How fast can I call the Realtor.com endpoints? Rates are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second, 60 a minute. Paying accounts run at least 5 a second, 300 a minute, depending on the pack. Responses carry `RateLimit-Remaining` and `RateLimit-Reset`, and a 429 carries `Retry-After`. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the details. ### Can an AI agent search Realtor.com listings? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Realtor.com endpoints with `search_endpoints`, reads their parameters with `get_endpoint` (both free) and runs a search with `call_endpoint`, which spends credits on success only and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup. realtor.com real estate listings property data python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Sept 2026 Perceptlayer 6 min read ## [Realestate.com.au API: Australian Listings as JSON](https://perceptlayer.com/blog/realestate-com-au-api-listings) Search realestate.com.au by location and channel (buy, rent, sold), then open each listing by URL. Parameters, a recorded Sydney response and the cost. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 9 min read ## [Zillow Listings API: Get Property Data as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) One GET to /v1/zillow/search returns listings near a point as JSON with price, beds, baths and address. Parameters, a real response, 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. --- title: "Amazon Product API: Search, Offers and Reviews as JSON" description: "Search Amazon by keyword, then look each asin up with product, offers, rating-summary and customers-say. Domain values per endpoint, 1 credit a call." url: https://perceptlayer.com/blog/amazon-product-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Amazon Product API: Search, Offers and Reviews as JSON 14 Nov 2026 Perceptlayer 7 min read An Amazon product API returns products as JSON, so you can search the catalogue and track individual items without parsing pages. With Perceptlayer, `GET /v1/amazon/search` takes a keyword and returns results with an `asin`, `title`, `price`, `rating` and `reviews_count` each. Four more endpoints take an `asin`: `product`, `offers`, `rating-summary` and `customers-say`. Every one costs 1 credit per successful call, and each takes a `domain` from a fixed list of marketplaces. This guide covers the flow, the domain values and the cost per product. ## Key takeaways - `GET /v1/amazon/search` takes a required `query` (up to 500 characters) and returns `results` with `asin`, `price.amount`, `price.currency`, `rating`, `reviews_count`, `is_prime`, `is_sponsored` and `badges`. - `product`, `offers`, `rating-summary` and `customers-say` each take an `asin` and cost 1 credit per successful call; `product` is the only one where `domain` is optional. - Search, product, offers, rating-summary and customers-say all accept `domain` values `US` and `DE` only. `featured-reviews` and `media-reviews` take nine other marketplaces and not `US`. - One search plus four lookups for each of its 16 recorded results is 1 + 16 × 4 = 65 credits, inside the 100 free signup credits. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## Which Amazon endpoints does a product lookup use? A product lookup uses five of the 18 endpoints in the [Amazon API](https://perceptlayer.com/apis/amazon): `search` to find products by keyword, then four endpoints keyed on the product's ASIN. `product` returns the product, `offers` returns its offers, `rating-summary` its rating summary, and `customers-say` the product's Customers Say data. All five are `GET` requests on the standard tier and cost 1 credit per successful call. The other endpoints cover lists (best sellers, new releases, deals, categories), sellers, promotions, influencers and autocomplete. | Endpoint | Required parameters | Optional parameters | Credits | | --- | --- | --- | --- | | `GET /v1/amazon/search` | `query` | `domain`, `page`, `sort`, `category`, `min_price`, `max_price`, `language`, `rh`, `dc`, `node` | 1 | | `GET /v1/amazon/product` | `asin` | `domain` | 1 | | `GET /v1/amazon/offers` | `asin`, `domain` | `page`, `condition` | 1 | | `GET /v1/amazon/rating-summary` | `asin`, `domain` | none | 1 | | `GET /v1/amazon/customers-say` | `asin`, `domain` | none | 1 | Each lookup is a separate call. If you only need price and rating for a list of known ASINs, call the endpoints you need and skip the rest: you pay per call, not per product. ## How do you search Amazon by keyword? Send a `GET` request to `https://api.perceptlayer.com/v1/amazon/search` with your keyword in `query` and your key in the `X-API-Key` header. This is the request behind the recorded response in the next section: ```bash curl "https://api.perceptlayer.com/v1/amazon/search?query=laptop+stand" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, put the key in the `api_key` query parameter instead; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. The search endpoint takes these parameters: | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `query` | string | yes | Up to 500 characters | | `domain` | string | no | One of `US`, `DE` | | `page` | integer | no | None documented | | `sort` | string | no | One of `relevance`, `price-asc`, `price-desc`, `rating`, `newest`, `bestseller`, `relevanceblender`, `price-asc-rank`, `price-desc-rank`, `review-rank`, `date-desc-rank`, `exact-aware-popularity-rank` | | `category` | string | no | Up to 100 characters | | `min_price` | number | no | None documented | | `max_price` | number | no | None documented | | `language` | string | no | None documented | | `rh` | string | no | None documented | | `dc` | boolean | no | None documented | | `node` | integer | no | None documented | The recorded request sent no `domain`, and the response reports `"domain": "US"`. Send `domain` explicitly in your own jobs so the marketplace never depends on what a request leaves out. ## What does the search response contain? The search response wraps everything in `success`, `data` and `meta`. Under `data`, `results` holds one object per product, and `pagination` says whether more pages exist. This is the recorded response for `laptop stand`, trimmed: ```json { "success": true, "data": { "query": "laptop stand", "domain": "US", "page": 1, "results": [ { "asin": "B08BRCT4JH", "title": "BESIGN LS03 Aluminum Laptop Stand, Ergonomic Detachable Computer Stand, …", "url": "/dp/B08BRCT4JH", "price": { "amount": 15.29, "currency": "USD", "formatted": "$15.29" }, "rating": 4.8, "reviews_count": 24525, … "is_prime": false, "is_sponsored": false, "badges": [ "Overall Pick" ] }, … ], "results_count": 16, "pagination": { "current_page": 1, "total_pages": 20, "has_next": true, "has_previous": false } }, "meta": { "domain": "US", "currency": "USD", … "credits_charged": 1, "credits_remaining": 1992 } } ``` | Field | What it holds in the recording | | --- | --- | | `results[].asin` | The product's ASIN, `B08BRCT4JH` | | `results[].url` | A relative path, `/dp/B08BRCT4JH`, with the same ASIN in it | | `results[].price.amount` / `price.currency` | `15.29` and `USD`, with `formatted` as display text | | `results[].rating` / `reviews_count` | `4.8` and `24525` | | `results[].is_sponsored` | `false`; filter on it if you want organic results only | | `results[].badges` | Labels such as `Overall Pick` and `Best Seller` | | `results_count` | `16` results on this page | | `pagination.has_next` | `true`, with `total_pages` of `20` | | `meta.credits_charged` | `1` | Read prices from `price.amount` and `price.currency`, not from `formatted`, which is a display string. ## How do you look a product up by ASIN? Each search result carries an `asin` field, and `product`, `offers`, `rating-summary` and `customers-say` each take an `asin` parameter: the names match. Pass the ASIN with the same `domain` you searched, one call per endpoint. We don't have recorded responses for these four in this guide, so run each once in the playground on the [Amazon API page](https://perceptlayer.com/apis/amazon) with an ASIN from your own search, and check the response before you build on its fields. ```bash curl "https://api.perceptlayer.com/v1/amazon/product?asin=B08BRCT4JH&domain=US" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/amazon/offers?asin=B08BRCT4JH&domain=US&condition=new" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/amazon/rating-summary?asin=B08BRCT4JH&domain=US" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/amazon/customers-say?asin=B08BRCT4JH&domain=US" \ -H "X-API-Key: $API_KEY" ``` ### What do the lookup parameters accept? `product` requires only `asin`; its `domain` is optional and takes `US` or `DE`. `offers` requires `asin` and `domain`, and takes an optional `page` and a `condition` of `new` or `usedGood`, so new and used offers are separate calls. `rating-summary` and the [customers-say endpoint](https://perceptlayer.com/apis/amazon/customers-say) take exactly `asin` and `domain`, with nothing optional. No defaults or page sizes are documented beyond these, so set the parameters you depend on. ## Which domain values does each Amazon endpoint take? Each endpoint takes `domain` from its own list, and the lists differ. Search, product, offers, rating-summary and customers-say take `US` and `DE` only. Best sellers, new releases and categories add `UK`. The review endpoints `featured-reviews` and `media-reviews` take nine marketplaces and leave out `US`. Check the list before you plan a cross-marketplace job. | Endpoint | `domain` values | Required | | --- | --- | --- | | `search` | `US`, `DE` | no | | `product` | `US`, `DE` | no | | `offers`, `rating-summary`, `customers-say` | `US`, `DE` | yes | | `autocomplete`, `category-products`, `deals` | `US`, `DE` | yes | | `seller`, `seller-products`, `seller-reviews` | `US`, `DE` | yes | | `best-sellers`, `new-releases`, `categories` | `US`, `DE`, `UK` | yes | | [`featured-reviews`](https://perceptlayer.com/apis/amazon/featured-reviews), `media-reviews` | `DE`, `UK`, `CA`, `FR`, `IT`, `ES`, `JP`, `AU`, `IN` | yes | | `promotion` | `US`, `CA`, `IN`, `DE`, `IT`, `JP`, `AU` | yes | | `influencer` | `US` | yes | So the full search-to-lookup flow in this guide runs on `US` and `DE`. For a UK product you can still pull best sellers, new releases and categories, and the featured and media reviews, but not search, product or offers. ## How do you run the whole flow in Python? The script below searches once, keeps the non-sponsored results, and calls the four lookup endpoints for each ASIN, saving every response as a JSON file. It reads only fields the recorded search response shows ( `data.results[].asin` and `is_sponsored`), and stores the lookup responses whole, since their shape isn't recorded here. It waits on 429 and 503 using `Retry-After`, and logs the credits each call used. ```python import json import os import time import requests API_KEY = os.environ["API_KEY"] BASE = "https://api.perceptlayer.com/v1/amazon" DOMAIN = "US" LOOKUPS = ["product", "offers", "rating-summary", "customers-say"] def get(endpoint, params, attempts=3): for _ in range(attempts): r = requests.get(f"{BASE}/{endpoint}", params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() print(endpoint, params.get("asin", ""), "credits:", r.headers.get("X-Credits-Used")) return r.json() raise RuntimeError(f"gave up on {endpoint} {params}") search = get("search", {"query": "laptop stand", "domain": DOMAIN}) asins = [p["asin"] for p in search["data"]["results"] if not p.get("is_sponsored")] os.makedirs("amazon", exist_ok=True) for asin in asins[:5]: for endpoint in LOOKUPS: data = get(endpoint, {"asin": asin, "domain": DOMAIN}) with open(f"amazon/{asin}-{endpoint}.json", "w") as f: json.dump(data, f, indent=2) time.sleep(1) ``` The `asins[:5]` slice keeps a first run to 1 + 5 × 4 = 21 credits. The one-second pause keeps it within a free account's 1 request a second; paying accounts run at least 5 a second. Once you've read the saved files, replace the raw dump with the fields you need. ### What should the script do with errors? Every error returns an HTTP status and a JSON body with `code`, `message` and `request_id`. Retry `rate_limited` (429) and `temporarily_unavailable` (503) after `Retry-After`. On a `not_found` (404) or `invalid_parameters` (422), log the ASIN and `domain` you sent, check both against the endpoint's parameters, and move on. Treat `source_error` (502) as a retry for later. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking Amazon products cost? Tracking costs 1 credit per endpoint per product per check, plus 1 credit per search page. Decide which lookups you need and how often: you might check offers daily and the review endpoints weekly. Only successful calls are billed, so a failed call followed by a successful retry costs 1 credit. | Plan | Arithmetic | Credits | | --- | --- | --- | | One search, all four lookups for 16 results | 1 + 16 × 4 × 1 credit | 65 | | 100 ASINs, `offers` daily | 100 × 30 days × 1 credit | 3,000 a month | | 100 ASINs, `offers` and `rating-summary` daily | 100 × 2 × 30 × 1 credit | 6,000 a month | | 300 ASINs, `offers` daily, all four lookups weekly | 300 × 30 + 300 × 4 × 4 | 13,800 a month | The first fits the 100 free credits you get once on signup. The second and third fit the Starter pack's 10,000 credits, and the last fits the Build pack's 50,000 for three months. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To start, run `search` in the playground on the [Amazon API page](https://perceptlayer.com/apis/amazon), pick an ASIN and run the four lookups on it, then [get a free API key](https://perceptlayer.com/signup) and schedule the script. More guides like this one are in [API guides](https://perceptlayer.com/blog/category/api-guides). ## APIs in this post - [Amazon **1 credit per call** · 18 endpoints](https://perceptlayer.com/apis/amazon) ## Frequently asked questions ### How much does an Amazon product API call cost? Each successful call to the Amazon endpoints in this guide costs 1 credit: `search`, `product`, `offers`, `rating-summary` and `customers-say`. Failed calls cost nothing and return `X-Credits-Used: 0`. Looking up one product with all four ASIN endpoints is 4 credits, so checking 100 products that way once is 400 credits. The pricing page lists what credit packs cost. ### Which Amazon marketplaces are supported? It depends on the endpoint. Search, product, offers, rating-summary and customers-say take `domain` values `US` and `DE`. Best sellers, new releases and categories also take `UK`. Featured and media reviews take `DE`, `UK`, `CA`, `FR`, `IT`, `ES`, `JP`, `AU` and `IN`, but not `US`. Promotion takes seven values and influencer only `US`. ### Where do I get an ASIN? Every result from `GET /v1/amazon/search` has an `asin` field, such as `B08BRCT4JH` in the recorded response, and its `url` field is a `/dp/` path containing the same value. The ASIN endpoints take an `asin` parameter with the same name. If you already have product URLs or a list of ASINs, you can skip search and call the lookup endpoints directly. ### Can I get used offers as well as new ones? Yes. `GET /v1/amazon/offers` takes an optional `condition` parameter with the values `new` and `usedGood`. Each condition is a separate call at 1 credit, and the endpoint also takes an optional `page`. It requires both `asin` and `domain`, with `domain` set to `US` or `DE`. ### Can an AI agent look up Amazon products? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Amazon endpoints with `search_endpoints` and reads their parameters with `get_endpoint`, both free. It then calls `search` and the ASIN endpoints with `call_endpoint`, which spends credits only on success and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup. amazon product data ecommerce asin python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Target API: Product Search and Prices as JSON](https://perceptlayer.com/blog/target-api-product-data) Search Target products as JSON with tcin, price.current, price.regular, is\_on\_sale and rating per result: 1 credit a page of 24, product lookups 1–2 credits. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 8 min read ## [Amazon Scraper or API: Search, Offers and Reviews](https://perceptlayer.com/blog/amazon-scraper-vs-api) An Amazon scraper vs 18 endpoints at 1 credit a call: a recorded laptop stand search with asin, price.amount and rating, and the domains each call takes. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. --- title: "Target API: Product Search and Prices as JSON | Perceptlayer" description: "Search Target products as JSON with tcin, price.current, price.regular, is_on_sale and rating per result: 1 credit a page of 24, product lookups 1–2 credits." url: https://perceptlayer.com/blog/target-api-product-data --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Target API: Product Search and Prices as JSON 14 Nov 2026 Perceptlayer 7 min read The Perceptlayer Target API returns Target product data as JSON from four endpoints: search, product, reviews and stores. `GET /v1/target/search` takes a keyword and returns products with a `tcin`, `title`, `brand`, `price` and `rating` each, plus pagination and filter facets, for 1 credit per successful call. `GET /v1/target/product` looks one item up by `tcin` for 1–2 credits. This guide covers the search request, the price fields in a recorded response, what the recording shows about availability, and what tracking a product costs. ## Key takeaways - `GET /v1/target/search` requires `query` (up to 200 characters) and costs 1 credit; the recorded response has 24 products a page ( `per_page`), 293 results and 13 pages. - Each result's `price` object carries `current`, `regular`, `is_on_sale` and `comparison_type`; on-sale items in the recording add `formatted_regular`, `save_amount` and `save_percent`. - `GET /v1/target/product` requires `tcin` and costs 1–2 credits per successful call; `reviews` and `stores` cost 1 credit each. - The recorded search results carry no per-item availability field. The endpoints take `store_id`, `zip` and `include_fulfillment`; check what those return in the playground. - Tracking 100 products daily with `product` costs 100 × 30 × 1–2 = 3,000 to 6,000 credits a month, inside the Starter pack's 10,000. ## Which endpoints does the Target API have? The [Target API](https://perceptlayer.com/apis/target) has four endpoints, all `GET` requests on the standard tier. `search` finds products by keyword, `product` returns one product by its `tcin`, `reviews` returns a product's reviews, and `stores` takes a ZIP code. Search, reviews and stores cost 1 credit per successful call. Product costs 1–2 credits. Failed calls cost nothing. | Endpoint | Required parameters | Optional parameters | Credits | | --- | --- | --- | --- | | `GET /v1/target/search` | `query` | `page`, `sort`, `min_price`, `max_price`, `store_id`, `zip`, `category`, `include_fulfillment` | 1 | | `GET /v1/target/product` | `tcin` | `url`, `store_id`, `zip`, `include_fulfillment` | 1–2 | | `GET /v1/target/reviews` | `tcin` | `sort`, `page`, `size`, `verified_only`, `photos_only` | 1 | | `GET /v1/target/stores` | `zip` | none | 1 | The data is collected from publicly available sources and returned as found at the time of the call. It is product and price data, not an integration with a Target account or order. ## How do you search Target products? Send a `GET` request to `https://api.perceptlayer.com/v1/target/search` with a keyword in `query` and your key in the `X-API-Key` header. Each successful call returns one page of results for 1 credit. This is the request behind the recorded response in the next section: ```bash curl "https://api.perceptlayer.com/v1/target/search?query=coffee+maker" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`; where you can't set a header, put the key in the `api_key` query parameter. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both. The search endpoint takes these parameters: | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `query` | string | yes | Up to 200 characters | | `page` | integer | no | None documented | | `sort` | string | no | One of `relevance`, `featured`, `price_low`, `price_high`, `rating_high`, `bestselling`, `newest` | | `min_price` | number | no | None documented | | `max_price` | number | no | None documented | | `store_id` | string | no | None documented | | `zip` | string | no | None documented | | `category` | string | no | None documented | | `include_fulfillment` | boolean | no | None documented | For a price watch, `sort=price_low` with `min_price` and `max_price` narrows a broad query to the band you care about. The [search endpoint page](https://perceptlayer.com/apis/target/search) has the same list and a playground. ## What does the search response contain? The response wraps the data in `success`, `data` and `meta`. `data.results` holds one object per product, `data.pagination` says how many pages exist, and `data.facets` lists the filters shown on the results page. This is the recorded response for `coffee maker`, trimmed: ```json { "success": true, "data": { "query": "coffee maker", "results": [ { "tcin": "91863920", "title": "Mr. Coffee 12-Cup Programmable Coffee Maker Black", "brand": "Mr. Coffee", "url": "https://www.target.com/p/mr-coffee-12c-programmable-drip-coffee-maker-stainless-steel-finish/-/A-91863920", "dpci": "072-08-0313", … "item_type": "Coffee Makers", … "price": { "current": 19.99, "regular": 34.99, "formatted_current": "$19.99", "formatted_regular": "$34.99", "comparison_type": "reg", "save_amount": 15, "save_percent": 43, "is_on_sale": true }, "rating": { "average": 4.27, "count": 1037 }, … "badges": ["Bestseller"] }, { "tcin": "91863923", … "price": { "current": 26.99, "regular": 26.99, "formatted_current": "$26.99", "is_on_sale": false }, … } ], "pagination": { "current_page": 1, "total_pages": 13, "total_results": 293, "per_page": 24, "has_next_page": true }, "sort_by": "relevance", … "store_id": "3991", "facets": [ … { "id": "d_channel", "name": "Shipping & Pickup", "type": "checkbox", "options": [ { "name": "buy online & pick up", "value": "buy online & pick up" }, { "name": "get it today", "value": "get it today" } ] } ] }, "meta": { "endpoint_family": "search", … "credits_charged": 1, "credits_remaining": 1945 } } ``` | Field | What it holds in the recording | | --- | --- | | `results[].tcin` | The item identifier, `91863920`; also at the end of `url` as `A-91863920` | | `results[].dpci` | `072-08-0313` | | `results[].brand`, `item_type` | `Mr. Coffee`, `Coffee Makers` | | `results[].price` | Price object; see the next section | | `results[].rating.average`, `rating.count` | `4.27` and `1037` | | `results[].bullets[]` | `label` and `value` pairs, such as dimensions and weight | | `results[].badges` | Labels such as `Bestseller` | | `pagination` | `total_results` 293, `per_page` 24, `total_pages` 13, `has_next_page` true | | `store_id` | `3991`, though the request sent none | | `facets[]` | Filters with `id`, `name`, `type` and `options` | ### How should you read the bullets? Treat `bullets` as display text. In the recording, the second product's dimensions read `13.5 Inches (H) x 8.7 Meter (W) x 13 Inches (D)`: data is returned as found on the page, so validate units before you compare products on size or weight. ## How do you read prices from a search result? Read `price.current` as the price now and `price.regular` as the regular price, both numbers. `is_on_sale` is a boolean, so you can filter on it without comparing the two. In the recording, the on-sale item also carries `formatted_regular`, `comparison_type` ( `reg`), `save_amount` (15) and `save_percent` (43), while the item that isn't on sale has only `current`, `regular`, `formatted_current` and `is_on_sale`. That difference matters in code. Read the optional fields with a default instead of indexing them directly, or the first full-price item will raise an error. | Field | On-sale item | Full-price item | | --- | --- | --- | | `current` | `19.99` | `26.99` | | `regular` | `34.99` | `26.99` | | `is_on_sale` | `true` | `false` | | `save_amount` | `15` | absent | | `save_percent` | `43` | absent | | `formatted_regular` | `$34.99` | absent | | `comparison_type` | `reg` | absent | The `formatted_*` fields are display strings with a currency symbol. Store the numbers and format them yourself. ## What does the recording show about availability? The recorded search results have no per-item stock or availability field. Availability appears in two places only. The response reports `store_id` `3991`, though the request sent none, and the `facets` list has a `Shipping & Pickup` filter with options such as `buy online & pick up` and `get it today`. The `search` and `product` endpoints take optional `store_id`, `zip` and `include_fulfillment` parameters, and `stores` requires a `zip`. Their effect on the response isn't documented beyond their names and types, so we won't describe it. Run a search with `include_fulfillment=true` and a `zip` in the playground on the [Target API page](https://perceptlayer.com/apis/target), and check which fields appear before you build availability tracking on them. The [stores endpoint page](https://perceptlayer.com/apis/target/stores) and [product endpoint page](https://perceptlayer.com/apis/target/product) list their parameters too. ## How do you track Target prices in Python? The cheapest way to track prices is to re-run a search and record every product it returns: one call covers a page of up to 24 products in the recording. The script below runs a few queries, walks their pages while `has_next_page` is true, and appends one row per product. It reads only fields from the recorded response, and uses `.get` for the price fields that full-price items lack. ```python import csv import datetime import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/target/search" QUERIES = ["coffee maker", "espresso machine"] MAX_PAGES = 3 def fetch(params, attempts=3): for _ in range(attempts): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"] raise RuntimeError(f"gave up on {params}") today = datetime.date.today().isoformat() with open("target_prices.csv", "a", newline="") as f: out = csv.writer(f) for query in QUERIES: for page in range(1, MAX_PAGES + 1): data = fetch({"query": query, "page": page}) for item in data["results"]: price = item["price"] out.writerow([ today, query, item["tcin"], item["title"], price["current"], price["regular"], price["is_on_sale"], price.get("save_percent", ""), item.get("rating", {}).get("average", ""), ]) time.sleep(1) if not data["pagination"]["has_next_page"]: break ``` Each run costs one credit per page fetched: two queries × three pages is 6 credits. The one-second pause keeps the script within a free account's 1 request a second; paying accounts run at least 5 a second. ### When should you use the product endpoint instead? Use `GET /v1/target/product` when you track a fixed list of items and don't want to depend on where they rank in a search. It takes the `tcin` from each search result, the same name as the field, and costs 1–2 credits per successful call. We don't have a recorded product response for this guide, so run one in the playground first and read `X-Credits-Used` to see what each call costs you. ### What should the script do with errors? Every error returns an HTTP status and a JSON body with `code`, `message` and `request_id`, and costs nothing. Retry `rate_limited` (429) and `temporarily_unavailable` (503) after `Retry-After`, log `invalid_parameters` (422) with the parameters you sent, and retry `source_error` (502) later. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking a Target product cost? Tracking by search costs 1 credit per page, and a page held 24 products in the recording, so the cost per product is a fraction of a credit. Tracking by `product` costs 1–2 credits per item per check. Only successful calls are billed, so a failed call and a successful retry cost the same as one success. | Plan | Arithmetic | Credits | | --- | --- | --- | | First test: 5 search pages, 40 product lookups | 5 × 1 + 40 × 1–2 | 45 to 85 | | 10 queries × 3 pages, daily | 10 × 3 × 30 × 1 | 900 a month | | 100 products by `tcin`, daily | 100 × 30 × 1–2 | 3,000 to 6,000 a month | | 500 products by `tcin`, daily | 500 × 30 × 1–2 | 15,000 to 30,000 a month | The first plan fits the 100 free credits you get once on signup. The second and third fit the Starter pack's 10,000 credits, and the last fits the Build pack's 50,000. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To try it, run `search` in the playground on the [Target API page](https://perceptlayer.com/apis/target) with your own query, then [get a free API key](https://perceptlayer.com/signup) and schedule the script. More single-source guides are in [API guides](https://perceptlayer.com/blog/category/api-guides). ## APIs in this post - [Target **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/target) ## Frequently asked questions ### Is this Target's own API? No. It is Perceptlayer's API for Target data, and this guide doesn't cover any developer program Target runs itself. Perceptlayer's Target API returns product data collected from publicly available sources through four endpoints: search, product, reviews and stores. One API key works for all of them, and each successful call costs 1 credit, except `product` at 1–2 credits. ### How much does a Target API call cost? `GET /v1/target/search`, `reviews` and `stores` cost 1 credit per successful call. `GET /v1/target/product` costs 1–2 credits. Failed calls cost nothing and return `X-Credits-Used: 0`. In the recorded search, one page held 24 products, so tracking a whole results page is 1 credit; tracking 100 items by `tcin` daily is 3,000 to 6,000 credits a month. ### Does the Target API show whether a product is in stock? The recorded search response has no per-item stock field. It reports a `store_id` and a `Shipping & Pickup` facet, and the `search` and `product` endpoints take `store_id`, `zip` and `include_fulfillment`. Their effect isn't documented beyond names and types, so run a call with them in the playground and check the response before you rely on availability data. ### What is a tcin? `tcin` is the item identifier in each search result, such as `91863920` in the recorded response, and the same number appears at the end of the result's `url` as `A-91863920`. The `product` and `reviews` endpoints both require a `tcin` parameter. Each result also carries a `dpci`, such as `072-08-0313`. ### Can an AI agent search Target products? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Target endpoints with `search_endpoints` and reads their parameters with `get_endpoint`, both free. It runs a search with `call_endpoint`, which spends credits only on success and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup. target product data prices ecommerce python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Amazon Product API: Search, Offers and Reviews as JSON](https://perceptlayer.com/blog/amazon-product-api-json) Search Amazon by keyword, then look each asin up with product, offers, rating-summary and customers-say. Domain values per endpoint, 1 credit a call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Costco API: Product Data and Prices as JSON](https://perceptlayer.com/blog/costco-api-product-prices) A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs. --- title: "Uber Eats API: Store Data as JSON | Perceptlayer" description: "Get an Uber Eats store's rating, hours, delivery fee, ETA and popular items as JSON from one call to /v1/uber-eats/store, at 1 to 11 credits for each call." url: https://perceptlayer.com/blog/uber-eats-api-restaurant-data --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Uber Eats API: Store Data as JSON 14 Nov 2026 Perceptlayer 7 min read The Perceptlayer Uber Eats API returns public store data as JSON: a store's name, address, cuisines, rating, opening hours, delivery fee, ETA and popular menu items. It has two endpoints. `GET /v1/uber-eats/stores` searches stores by keyword near a latitude and longitude for 1 credit, and `GET /v1/uber-eats/store` returns one store for 1 to 11 credits. It reads public store data only: it is not an ordering or merchant integration, so it can't place orders or manage a restaurant's listing. This guide shows the requests, a recorded response and how to budget. ## Key takeaways - `GET /v1/uber-eats/store` requires `store`, `lat` and `lng`, takes optional `include_options` and `market`, and costs 1 to 11 credits for each successful call. - `GET /v1/uber-eats/stores` requires `query`, `lat` and `lng`, takes `sort` ( `rating` or `delivery_time`), `min_rating`, `offset`, `page_size` and `market`, and costs 1 credit. - The recorded store response carries `rating`, `review_count_approx`, `is_open`, `eta`, `delivery_fee`, `hours`, `popular_items`, `categories` and `item_count`. - Budget the store endpoint at 11 credits for every call and read `X-Credits-Used` for the real figure: the recorded call cost 1. - This is public store data. It does not place orders, read a merchant's own account or change a listing. ## What can you get from Uber Eats through this API? You get what a store's public page shows, as named JSON fields: identity and location, rating and review count, whether it's open and orderable, the delivery fee and ETA, opening hours, images, popular items with prices, and menu categories. That suits market research, restaurant directories, competitive menu tracking and agents that answer "what's open near here" questions. It is a read-only view of public data, collected from publicly available sources and returned as found at the time of the call. It is not an ordering or merchant integration. You can't place or track orders, update a menu, or read a restaurant's sales through these endpoints. If you run a restaurant and need any of that, this API isn't the tool for it. | Endpoint | Required parameters | Optional parameters | Credits | | --- | --- | --- | --- | | `GET /v1/uber-eats/stores` | `query`, `lat`, `lng` | `sort`, `min_rating`, `offset`, `page_size`, `market` | 1 | | `GET /v1/uber-eats/store` | `store`, `lat`, `lng` | `include_options`, `market` | 1–11 | Both endpoints are on the standard tier. The [Uber Eats API page](https://perceptlayer.com/apis/uber-eats) has a playground for each. ## How do you search for stores near a location? Call `GET /v1/uber-eats/stores` with a keyword in `query` and a point in `lat` and `lng`. Each successful call costs 1 credit. You can sort by `rating` or `delivery_time`, drop low-rated stores with `min_rating`, and page through results with `offset` and `page_size`. `market` picks the country from a fixed list. ```bash curl "https://api.perceptlayer.com/v1/uber-eats/stores?query=pizza&lat=40.758&lng=-73.9855&sort=rating" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `query` | string | yes | Up to 100 characters | | `lat` | number | yes | None documented | | `lng` | number | yes | None documented | | `sort` | string | no | One of `rating`, `delivery_time` | | `min_rating` | number | no | None documented | | `offset` | integer | no | None documented | | `page_size` | integer | no | None documented | | `market` | string | no | One of `us`, `ca`, `mx`, `gb`, `fr`, `de`, `jp`, `au` | We don't have a recorded `stores` response for this guide, so we won't describe its fields. Run it in the playground on the [stores endpoint page](https://perceptlayer.com/apis/uber-eats/stores) and check which identifier each result carries before you pass one to the `store` endpoint, whose `store` parameter shares the name. ## How do you request one store? Call `GET /v1/uber-eats/store` with the store's identifier in `store` and a point in `lat` and `lng`. In the recorded call below, `store` is the value that comes back as `data.store.id`. Add `market` with one of `us`, `ca`, `mx`, `gb`, `fr`, `de`, `jp` or `au` to fix the country; the recorded request sent none and the response reports `"market": "us"`. ```bash curl "https://api.perceptlayer.com/v1/uber-eats/store?store=17d03e07-66ca-460f-a290-077407cbb382&lat=40.758&lng=-73.9855" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `store` | string | yes | Up to 500 characters | | `lat` | number | yes | None documented | | `lng` | number | yes | None documented | | `include_options` | boolean | no | None documented | | `market` | string | no | One of `us`, `ca`, `mx`, `gb`, `fr`, `de`, `jp`, `au` | Keys start with `sk_live_` and go in the `X-API-Key` header, or in the `api_key` query parameter where headers aren't possible. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both, and the [store endpoint page](https://perceptlayer.com/apis/uber-eats/store) lists the parameters with a playground. ## What does the store response contain? The response is one JSON object with `success`, `data` and `meta`. `data.store` holds the store: identity, address and coordinates, status, delivery terms, rating, hours, images, reviews, popular items and menu categories. This is the recorded response, trimmed, with reviews left out: ```json { "success": true, "data": { "store": { "id": "17d03e07-66ca-460f-a290-077407cbb382", "slug": "joes-pizza-times-square-1435-broadway", "name": "Joe's Pizza - Time's Square (1435 Broadway)", "currency": "USD", … "price_bucket": "$$", "cuisines": ["Pizza", "American"], "address": { "full": "1435 Broadway, New York, NY 10018", … "country": "US" }, "latitude": 40.7546509, "longitude": -73.9868254, "is_open": true, "is_orderable": true, "eta": { "min": 30, "max": 30, "text": "30–30 Min" }, "delivery_fee": { "amount": 3.99, "currency": "USD", "text": "$3.99 Delivery Fee" }, "rating": 4.6, "review_count_text": "15000+", "review_count_approx": 15000, "distance": "0.2 mi", "hours": [ { "days": "Sunday - Wednesday", "opens": "10:00", "closes": "03:00", "closes_next_day": true }, … ], … "popular_items": [ { "id": "ea3c025f-b35d-497b-ad17-4aaf7974d5e0", "name": "Plain Cheese Pie with One Topping", … "price": 33, "currency": "USD", "is_sold_out": false, "has_options": true, … }, … ], "categories": [ { "id": "53035974-0f12-4ac2-a8c2-586370d24ec8", "name": "Salads", "items": […] }, { "id": "d04dd111-e058-4c47-9977-30f7e690d49c", "name": "Pies", "items": […] } ], "item_count": 24, "menu_complete": true }, "market": "us" }, "meta": { "endpoint_family": "store", … "credits_charged": 1, "credits_remaining": 1905 } } ``` | Field | Value in the recording | | --- | --- | | `name`, `cuisines`, `price_bucket` | The store's name, `["Pizza", "American"]`, `$$` | | `address.full`, `latitude`, `longitude` | Street address and coordinates | | `is_open`, `is_orderable` | `true`, `true` | | `eta.min`, `eta.max` | `30`, `30` (minutes, per `eta.text`) | | `delivery_fee.amount`, `delivery_fee.currency` | `3.99`, `USD` | | `rating`, `review_count_approx` | `4.6`, `15000`, with `review_count_text` of `15000+` | | `hours[]` | `days`, `opens`, `closes` and `closes_next_day` | | `popular_items[]` | `id`, `name`, `description`, `price`, `currency`, `is_sold_out`, `has_options` | | `categories[]` | `id`, `name` and `items` per menu section | | `item_count`, `menu_complete` | `24`, `true` | ### What should you watch for in these fields? Use `review_count_approx` for numbers: `review_count_text` is a display string such as `15000+`. Read `closes_next_day` with `closes`, since a `closes` of `03:00` on a row where it is `true` reads as closing after midnight. The `reviews` array carries review text and the reviewer's name; leave the names out of anything you store or publish unless you have a lawful basis for keeping them. In this guide's recording the `items` inside `categories` are trimmed, so check them in the playground before you parse them. ## How do you track a list of stores in Python? A store tracker is a loop over the stores you care about: one `store` call each, a handful of fields written to a CSV row, and the credits the call used logged next to them. The script below reads only fields from the recorded response. It waits on 429 and 503 using `Retry-After`, and pauses a second between calls to stay within a free account's 1 request a second. ```python import csv import datetime import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/uber-eats/store" STORES = [ {"store": "17d03e07-66ca-460f-a290-077407cbb382", "lat": 40.758, "lng": -73.9855, "market": "us"}, ] def fetch(params, attempts=3): for _ in range(attempts): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"]["store"], r.headers.get("X-Credits-Used") raise RuntimeError(f"gave up on {params['store']}") today = datetime.date.today().isoformat() with open("stores.csv", "a", newline="") as f: out = csv.writer(f) for params in STORES: s, credits = fetch(params) out.writerow([ today, s["id"], s["name"], s["rating"], s["review_count_approx"], s["is_open"], s["eta"]["min"], s["eta"]["max"], s["delivery_fee"]["amount"], s["delivery_fee"]["currency"], s["item_count"], credits, ]) time.sleep(1) ``` Each row is one store on one day. Over weeks, the file shows rating drift, fee changes and menu growth per store. Add the `popular_items` prices as a second table keyed on item `id` if you track menu prices. ### What should the script do with errors? Every error comes back with an HTTP status and a JSON body with `code`, `message` and `request_id`, and costs nothing. Retry `rate_limited` (429) and `temporarily_unavailable` (503) after `Retry-After`. Log `not_found` (404) and `invalid_parameters` (422) with the parameters you sent, and retry `source_error` (502) later. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## How do you budget for the store endpoint? Budget the store endpoint at its upper bound of 11 credits for each call, and measure what your calls really cost. The endpoint costs 1 to 11 credits for each successful call; the recorded call cost 1 credit ( `meta.credits_charged`). Every successful response reports the charge in `X-Credits-Used`, so log it per store and replace the upper bound with your own figures after a few runs. The `stores` search is a flat 1 credit. | Plan | Arithmetic | Credits | | --- | --- | --- | | First test: 1 search, 9 stores | 1 + 9 × 1 to 11 | 10 to 100 | | 50 stores, weekly | 50 × 4 weeks × 1 to 11 | 200 to 2,200 a month | | 200 stores, daily | 200 × 30 × 1 to 11 | 6,000 to 66,000 a month | The first plan fits the 100 free credits you get once on signup even at the upper bound. The second fits the Starter pack's 10,000 credits for at least four months. The daily plan fits the Starter pack's 10,000 at the low end; at the high end it needs the Growth pack's 200,000, which covers three months. Failed calls cost nothing, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To try it, run `store` in the playground on the [Uber Eats API page](https://perceptlayer.com/apis/uber-eats) with the recorded store ID, then [get a free API key](https://perceptlayer.com/signup) and add your own stores. Other single-source guides are in [API guides](https://perceptlayer.com/blog/category/api-guides). ## APIs in this post - [Uber Eats **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/uber-eats) ## Frequently asked questions ### Is there an Uber Eats API for ordering? Not here. Perceptlayer's Uber Eats endpoints return public store data, such as rating, hours, delivery fee, ETA and popular items. They don't place or track orders, update menus or read a merchant's account. If you need ordering or merchant integration, this API isn't the tool for it. ### How much does an Uber Eats store call cost? `GET /v1/uber-eats/store` costs 1 to 11 credits for each successful call, and `GET /v1/uber-eats/stores` costs 1 credit. The recorded store call cost 1 credit. Read `X-Credits-Used` on each response for the real figure, and budget at 11 credits for every call until you have your own numbers. Failed calls cost nothing and return `X-Credits-Used: 0`. ### Which countries does the Uber Eats API cover? Both endpoints take an optional `market` parameter with one of eight values: `us`, `ca`, `mx`, `gb`, `fr`, `de`, `jp` and `au`. Both also require `lat` and `lng`. The recorded store call sent no `market`, and its response reported `"market": "us"`; set it explicitly in your own jobs so every row records which market it came from. ### Does the store response include the full menu? The recorded response has `popular_items` with name, description, price, currency and sold-out status, and `categories` with a `name` and `items` for each menu section. It also reports `item_count` of 24 and `menu_complete` as `true`. The category items are trimmed in this guide's recording, so check their shape in the playground before you parse them. ### Can an AI agent look up Uber Eats stores? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Uber Eats endpoints with `search_endpoints` and reads their parameters with `get_endpoint`, both free. It calls `stores` or `store` with `call_endpoint`, which spends credits only on success and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup. uber eats food delivery restaurant data menus python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 6 min read ## [DoorDash API: Store and Menu Data as JSON](https://perceptlayer.com/blog/doordash-api-restaurant-menu-data) Get public DoorDash store data as JSON: rating, review\_count, eta\_minutes, popular\_items with prices and item\_count from one store call at 1–11 credits. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Costco API: Product Data and Prices as JSON](https://perceptlayer.com/blog/costco-api-product-prices) A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs. --- title: "Amazon Scraper or API: Search, Offers and Reviews" description: "An Amazon scraper vs 18 endpoints at 1 credit a call: a recorded laptop stand search with asin, price.amount and rating, and the domains each call takes." url: https://perceptlayer.com/blog/amazon-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Amazon Scraper or API: Search, Offers and Reviews 13 Nov 2026 Perceptlayer 8 min read An Amazon scraper loads search result and product pages, then pulls the ASIN, title, price, rating and review count out of each one, and you keep that extraction working for every marketplace you collect. The other route is the Amazon endpoints on Perceptlayer: 18 `GET` calls, 1 credit each, that return those values as named JSON fields. This post compares the two on a recorded "laptop stand" search, shows which `domain` values each endpoint accepts, prices tracking per item in credits and gives a verdict per use case. ## Key takeaways - `GET /v1/amazon/search` needs only `query` and returns `results[]` with `asin`, `title`, `price.amount`, `price.currency`, `rating`, `reviews_count`, `is_prime`, `is_sponsored` and `badges`, at 1 credit per successful call. - The recorded "laptop stand" search returned `results_count: 16` on page 1 with `total_pages: 20` and `has_next: true` in `pagination`. - The `domain` parameter differs by endpoint: search, product and offers take `US` or `DE`, while `featured-reviews` and `media-reviews` take nine marketplaces that don't include `US`. - Checking 500 known ASINs once a day with `/v1/amazon/product` is 500 calls × 1 credit = 500 credits a day, or 15,000 over 30 days, within the Build pack's 50,000. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a retry after a 429 or 503 is billed only once it succeeds. ## What would an Amazon scraper have to do? An Amazon scraper has three jobs: fetch pages, extract values from them and notice when either step stops working. Fetching means requesting search pages for each keyword and page number, then product and offer pages for each ASIN, for every marketplace you cover. Extraction means turning each page into a row: an ID, a title, a price as a number with its currency, a rating, a review count and flags such as sponsored placement. Monitoring means comparing each run with the last, because a broken extractor usually returns empty fields rather than an error. Each job carries upkeep that is ordinary engineering, not a one-off build. Page layouts change over time on any large retail site, so selectors you wrote last quarter can quietly return nothing. Price text has to be parsed per marketplace, with its own currency symbol and decimal separator. Sponsored and organic results sit side by side, and your parser has to tell them apart if your analysis depends on it. Traffic that looks automated tends to be slowed or refused on large sites, so a scraper that runs every day needs retries, pacing and a plan for when requests fail. Before you build a collector, read Amazon's terms of use and get advice for commercial use. Don't work around blocks, challenges or other protections. ## What do the Amazon endpoints return? The Amazon API on Perceptlayer has 18 endpoints, all `GET` and all 1 credit per successful call. For a scraper replacement, four groups matter: search, product, offers and reviews. Search turns a keyword into a list of ASINs with prices; product and offers take an `asin`; the review endpoints take an `asin` and return review and rating data for it. The table lists the ones covered here with their required parameters. | Endpoint | What it's for | Required | Optional | | --- | --- | --- | --- | | `GET /v1/amazon/search` | Products for a keyword | `query` | `domain`, `page`, `sort`, `category`, `min_price`, `max_price`, `language`, `rh`, `dc`, `node` | | `GET /v1/amazon/product` | One product | `asin` | `domain` | | `GET /v1/amazon/offers` | Offers on one product | `asin`, `domain` | `page`, `condition` ( `new`, `usedGood`) | | `GET /v1/amazon/rating-summary` | Rating summary | `asin`, `domain` | none | | `GET /v1/amazon/customers-say` | Customers Say | `asin`, `domain` | none | | `GET /v1/amazon/featured-reviews` | Featured reviews | `asin`, `domain` | none | | `GET /v1/amazon/media-reviews` | Media reviews | `asin`, `domain` | none | | `GET /v1/amazon/seller-reviews` | Reviews of a seller | `sellerId`, `seller_id`, `domain` | `page`, `rating`, `period` | The rest cover discovery: [best sellers](https://perceptlayer.com/apis/amazon/best-sellers), new releases, [categories](https://perceptlayer.com/apis/amazon/categories), [category products](https://perceptlayer.com/apis/amazon/category-products), [deals](https://perceptlayer.com/apis/amazon/deals), [autocomplete](https://perceptlayer.com/apis/amazon/autocomplete), sellers and promotions. The [Amazon API page](https://perceptlayer.com/apis/amazon) lists every parameter. ### A real search: "laptop stand" This request searches for "laptop stand" with no other parameters: ```bash curl "https://api.perceptlayer.com/v1/amazon/search?query=laptop+stand" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the fields a tracker reads: ```json { "success": true, "data": { "query": "laptop stand", "domain": "US", "page": 1, "results": [ { "asin": "B08BRCT4JH", "title": "BESIGN LS03 Aluminum Laptop Stand, Ergonomic Detachable Computer Stand, …", "url": "/dp/B08BRCT4JH", "price": { "amount": 15.29, "currency": "USD", "formatted": "$15.29" }, "rating": 4.8, "reviews_count": 24525, … "is_prime": false, "is_sponsored": false, "badges": [ "Overall Pick" ] }, { "asin": "B0C7BKZ883", "title": "Adjustable Laptop Stand for Desk, Metal Laptop Riser Holder", … "rating": 4.5, "reviews_count": 4568, … "badges": [ "Best Seller" ] } ], "results_count": 16, "pagination": { "current_page": 1, "total_pages": 20, "has_next": true, "has_previous": false } }, "meta": { "domain": "US", "currency": "USD", … "credits_charged": 1, "credits_remaining": 1992 } } ``` Three details matter for a tracker. The price arrives twice: `price.amount` as a number for arithmetic and `price.formatted` as display text, so there's no currency string to parse. `is_sponsored` marks paid placement, so you can drop or keep those rows on purpose. And `url` is a relative path that contains the ASIN, while `asin` is a field of its own, so you never extract the ID from a link. ### From a search result to product, offers and reviews Each search result carries an `asin`, and the product, offers and review endpoints all take an `asin` parameter, so the names match. We don't have a recorded product or offers response to show here, so run one of the recorded ASINs, such as `B08BRCT4JH`, through `/v1/amazon/product` in the playground and check the fields before you build on them. The same applies to [Customers Say](https://perceptlayer.com/apis/amazon/customers-say) and [featured reviews](https://perceptlayer.com/apis/amazon/featured-reviews). ## Which marketplaces does each endpoint cover? The `domain` parameter picks the Amazon marketplace, and the accepted values differ by endpoint, so check this before you plan a multi-country job. Search and product take `domain` as optional, and the recorded search without it came back with `domain: "US"`. Every other endpoint in the table requires it. A scraper would need its own code path per marketplace; here it's one parameter, within the values each endpoint lists. | Endpoint | Accepted `domain` values | | --- | --- | | `search`, `product` | `US`, `DE` (optional) | | `offers`, `rating-summary`, `customers-say` | `US`, `DE` | | `category-products`, `deals`, `autocomplete` | `US`, `DE` | | `best-sellers`, `new-releases`, `categories` | `US`, `DE`, `UK` | | `featured-reviews`, `media-reviews` | `DE`, `UK`, `CA`, `FR`, `IT`, `ES`, `JP`, `AU`, `IN` | | `promotion` | `US`, `CA`, `IN`, `DE`, `IT`, `JP`, `AU` | The gap to plan around is reviews. For a US product, the review data on offer is `rating-summary` and `customers-say`; `featured-reviews` and `media-reviews` don't accept `US`. If you track German products, all four review endpoints are available. Store the `domain` and `meta.currency` next to every price, so a later join never mixes `USD` and another currency. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries terms and blocking risk; the endpoints cost credits per call and remove the extraction and its upkeep. Neither is free, and the right choice depends on volume and how many marketplaces you need. The table compares them for a recurring job, such as watching prices and ratings for a product category every day. | | DIY Amazon scraper | Amazon endpoints | | --- | --- | --- | | Setup | Fetcher, extractors per page type, storage, monitoring | API key in the `X-API-Key` header | | Product ID | Extracted from links or page markup | `asin` field | | Price | Parsed from text per marketplace | `price.amount` and `price.currency` | | Sponsored results | Detected from page markup | `is_sponsored` | | Marketplaces | One code path per site you support | `domain`, within each endpoint's values | | When pages change | Your extractor breaks and you fix it | You read named JSON fields | | Blocks and failures | Yours to handle | A failed call returns an error code and costs 0 | | Paging | Follow the site's next links | `page`, with `pagination.has_next` | | Speed | As fast as you can fetch without being refused | 1 request a second free, at least 5 a second paid | | Cost | Hosting, proxies if you use them, your time | 1 credit per successful call | ### A search sweep in Python This script pages through one search while `pagination.has_next` is true and writes one CSV row per result. It reads only fields in the recorded response and waits on 429 and 503 using `Retry-After`. ```python import csv import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/amazon/search" def get(params): for _ in range(3): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"] raise RuntimeError("gave up") with open("laptop-stand.csv", "w", newline="") as f: out = csv.writer(f) out.writerow(["page", "asin", "amount", "currency", "rating", "reviews_count", "is_sponsored"]) page = 1 while True: data = get({"query": "laptop stand", "domain": "US", "page": page}) for item in data.get("results", []): price = item.get("price") or {} out.writerow([page, item.get("asin"), price.get("amount"), price.get("currency"), item.get("rating"), item.get("reviews_count"), item.get("is_sponsored")]) if not data.get("pagination", {}).get("has_next"): break page += 1 time.sleep(1) ``` The one-second pause keeps a free account within its 1 request a second. Errors come back as an HTTP status with a JSON `code`, `message` and `request_id`; the [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking an Amazon item cost? Cost follows calls, not rows: every successful call is 1 credit, whatever it returns. So the price of tracking an item depends on whether you follow a fixed list of ASINs or sweep search results. A fixed list costs 1 credit per ASIN per check; a sweep costs 1 credit per page and spreads that over every result on it. | Plan | Arithmetic | Credits | | --- | --- | --- | | 500 ASINs, product call daily | 500 × 30 days × 1 credit | 15,000 a month | | 500 ASINs, product and offers daily | 500 × 2 × 30 days × 1 credit | 30,000 a month | | One full "laptop stand" sweep | 20 pages × 1 credit | 20 | | 10 keywords, 20 pages each, daily | 10 × 20 × 30 days × 1 credit | 6,000 a month | The first two fit the Build pack's 50,000 credits; the last fits the Starter pack's 10,000. The recorded page 1 held 16 results for 1 credit, about 0.06 credits per result, but later pages may hold a different number, so budget per page. The 100 free credits on signup cover five full sweeps of the recorded search, or one product check on 100 ASINs. Purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how calls are debited. ## Which route should you choose? Choose by volume, marketplaces and how much upkeep you can absorb. For a one-off look at a handful of products, a browser is enough and neither route is worth building. For anything recurring, the verdicts below apply. - **Price and rank watch on a category**: sweep `search` daily per keyword, store `asin`, `price.amount`, `rating`, `reviews_count` and `is_sponsored` with the page number. About 20 credits per keyword per day at the recorded depth. - **Monitoring a known list of ASINs**: call `product`, and add `offers` when you need more than one seller's offer. 1 or 2 credits per ASIN per check. - **Review and rating tracking**: use `rating-summary` and `customers-say` for `US` and `DE`, and `featured-reviews` or `media-reviews` for the other marketplaces they list. Leave reviewers' names out of anything you store. - **Your own seller account's orders and inventory**: neither route fits. These endpoints return public catalogue data, not account data. - **Learning how scraping works**: build a scraper against a practice site, not a large retailer. - **An agent answering shopping questions**: connect the MCP server as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `search` instead of browsing pages. The same comparison for other retail sources is in [AliExpress Scraper or API](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) and [Google Shopping Scraper or API](https://perceptlayer.com/blog/google-shopping-scraper-vs-api), and the [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists the rest. To check the fields for your own category, run `search` in the playground on the [Amazon API page](https://perceptlayer.com/apis/amazon), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Amazon **1 credit per call** · 18 endpoints](https://perceptlayer.com/apis/amazon) ## Frequently asked questions ### Is scraping Amazon allowed? That depends on Amazon's terms of use and the law where you operate, so read the terms and get legal advice before collecting data commercially. Don't get around blocks, challenges or other protections. Product facts such as price, rating and review count carry less risk than personal data; leave reviewers' and sellers' personal details out of anything you keep. ### Can I get Amazon data for countries other than the US? Yes, within each endpoint's listed values. Search, product, offers, `rating-summary` and `customers-say` take `domain` as `US` or `DE`. Best sellers, new releases and categories add `UK`. Featured and media reviews take `DE`, `UK`, `CA`, `FR`, `IT`, `ES`, `JP`, `AU` and `IN`, but not `US`. Each call costs 1 credit whatever the domain. ### How do I page through Amazon search results? Send the same `query` with `page` set to 2, 3 and so on, and stop when `pagination.has_next` is false. The recorded "laptop stand" search reported `total_pages: 20` and `results_count: 16` on page 1. Every page is a separate call at 1 credit, so a full sweep of that search costs 20 credits. ### Does a failed Amazon call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait before you send it again. ### How fast can I run an Amazon price check? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second, 60 a minute, so a 100-ASIN check takes under two minutes. Paying accounts run at least 5 requests a second, 300 a minute, depending on the pack. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. amazon ecommerce scraping product data price tracking ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Amazon Product API: Search, Offers and Reviews as JSON](https://perceptlayer.com/blog/amazon-product-api-json) Search Amazon by keyword, then look each asin up with product, offers, rating-summary and customers-say. Domain values per endpoint, 1 credit a call. --- title: "DoorDash API: Store and Menu Data as JSON | Perceptlayer" description: "Get public DoorDash store data as JSON: rating, review_count, eta_minutes, popular_items with prices and item_count from one store call at 1–11 credits." url: https://perceptlayer.com/blog/doordash-api-restaurant-menu-data --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # DoorDash API: Store and Menu Data as JSON 13 Nov 2026 Perceptlayer 6 min read If you want DoorDash store data as JSON, Perceptlayer has two endpoints: `GET /v1/doordash/stores` finds stores for a query near a latitude and longitude, and `GET /v1/doordash/store` returns one store's public page as named fields. The recorded store call returned name, address, `rating`, `review_count`, `eta_minutes`, opening hours, popular items with prices and menu categories, for 1 credit. This is public store data, not an ordering or merchant integration. This guide shows the requests, the parameters, a real response and what tracking a store costs. ## Key takeaways - `GET /v1/doordash/store` takes a required `store` and an optional `include_options`, and costs 1–11 credits, depending on the call; the recorded call without `include_options` cost 1 credit. - `GET /v1/doordash/stores` takes `query`, `lat` and `lng`, plus optional `cursor`, `sort` ( `rating`, `delivery_time`, `distance`), `min_rating`, `price_range[]` and `open_now`, at 1 credit a call. - The recorded store response for `store=500965` includes `rating` 4.4, `review_count` 4831, `eta_minutes` 37, `hours_text`, `popular_items[]` with `price`, and `item_count` 51. - Tracking 200 stores daily without `include_options` is 200 × 30 days × 1 credit = 6,000 credits a month, inside the Starter pack's 10,000. - These endpoints read public store data. They don't place orders, change a merchant's menu or connect to a merchant account. ## What can you get from DoorDash, and what can't you? You can get what a DoorDash store page shows the public: the store's name and cuisine, address and coordinates, rating and review count, delivery estimate, fees text, hours, popular items with prices and the menu's categories. You can also search for stores by keyword around a point. That suits menu price research, restaurant market analysis, competitor watching and agents that answer "what's open nearby". You can't use these endpoints to place or track orders, request deliveries, update a restaurant's menu or read a merchant's sales. They aren't an ordering API or a merchant integration, and they don't act on anyone's account. If you run a restaurant and need to connect your own point-of-sale or menu system, that's a different kind of integration that these endpoints don't cover; read DoorDash's terms before you plan it. Data comes from publicly available sources and is returned as found at the time of the call. Fees text, delivery estimates and availability can differ from one call to the next, so store the time of every call next to the values. ## How do you request one DoorDash store? Send a `GET` request to `https://api.perceptlayer.com/v1/doordash/store` with the store in `store` and your key in the `X-API-Key` header. This is the request behind the recorded response in this guide: ```bash curl "https://api.perceptlayer.com/v1/doordash/store?store=500965" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, the key can go in the `api_key` query parameter; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a job can log what each call cost. The recorded call also reports `credits_charged: 1` in its `meta` block. ## Which parameters do the two endpoints take? The store endpoint takes one required parameter and one switch; the stores search takes a query and a location, plus filters. The tables list every parameter with the constraints the API documents. Nothing else about them is documented, so treat defaults and page sizes as unknown and check them in the playground for your own queries. ### Store | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `store` | string | yes | Up to 500 characters | | `include_options` | boolean | no | None documented | ### Stores | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `query` | string | yes | Up to 100 characters | | `lat` | number | yes | None documented | | `lng` | number | yes | None documented | | `cursor` | string | no | Up to 2,000 characters | | `sort` | string | no | One of `rating`, `delivery_time`, `distance` | | `min_rating` | number | no | None documented | | `price_range[]` | list of integers | no | None documented | | `open_now` | boolean | no | None documented | A stores search near downtown Los Angeles, sorted by rating, looks like this: ```bash curl "https://api.perceptlayer.com/v1/doordash/stores?query=pizza&lat=34.0539&lng=-118.2707&sort=rating&open_now=true" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded stores response to quote, so we can't show its fields here. Run that call in the playground on the [stores endpoint page](https://perceptlayer.com/apis/doordash/stores) and check whether each result carries an ID you can pass to `store` before you chain the two. ## What does the store response contain? The store response is one `store` object inside `data`, with identity, location, ratings, delivery details, hours, popular items and menu categories, plus a `meta` block with the credits charged. This is the recorded response for `store=500965`, trimmed: ```json { "success": true, "data": { "store": { "id": "500965", "url": "https://www.doordash.com/store/500965/", "name": "Little Caesars", "description": "Pizzeria", "currency": "USD", "timezone": "US/Pacific", … "address": { "full": "1551 W 7th St, Los Angeles, CA 90017, USA", "city": "Los Angeles", "region": "CA", "country": "US" … }, "latitude": 34.053884, "longitude": -118.270709, "rating": 4.4, "review_count": 4831, "price_range": 2, "is_dashpass_partner": true, "delivery_available": false, "pickup_available": false, "eta_minutes": 37, "delivery_fee": { "currency": "USD", "text": "$0 delivery fee, first order" }, "hours_text": "10:00 AM - 11:29 PM", … "popular_items": [ { "id": "11706970367", "name": "ExtraMostBestest® Pepperoni", "description": "Large round pizza with more Pepperoni and Cheese than our Classic Pizza", "price": 11.09, "currency": "USD", … "popular": true }, { "id": "11706952817", "name": "Crazy Bread®", "price": 5.54, … } ], "categories": [ { "id": "275078092", "name": "CREATE YOUR OWN PIZZA", "items": […] }, … ], "item_count": 51, "menu_available": true } }, "meta": { "endpoint_family": "store", … "credits_charged": 1, "credits_remaining": 1906 } } ``` | Field | What it's useful for | | --- | --- | | `id`, `url`, `name`, `description` | Identifying the store and its cuisine | | `address`, `latitude`, `longitude`, `timezone` | Mapping, and reading `hours_text` in local time | | `rating`, `review_count` | Reputation tracking over time | | `price_range` | Price tier, the same name as the stores filter `price_range[]` | | `eta_minutes`, `delivery_fee.text`, `delivery_available`, `pickup_available` | Delivery conditions at the time of the call | | `popular_items[].name`, `price`, `currency` | Menu price tracking for the items shown as popular | | `categories[].name`, `item_count`, `menu_available` | Menu structure and size | Two notes on reading it. `delivery_fee.text` is display text, not a number, so store it as text. And the recording trims each category's `items`, so this guide can't show their fields; run the call in the playground to see them before your code reads them. ## How do you track menu prices and ratings over time? Tracking a store is one `store` call per store per check, with the values you care about appended to a file or table. The script below reads a list of store values, calls the endpoint for each, and writes one row per popular item with the store's rating, review count and delivery estimate. It reads only fields in the recorded response and logs the `X-Credits-Used` header. ```python import csv import datetime import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/doordash/store" STORES = ["500965"] def fetch(store, attempts=3): for _ in range(attempts): r = requests.get(URL, params={"store": store}, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"]["store"], r.headers.get("X-Credits-Used") raise RuntimeError(f"gave up on store {store}") now = datetime.datetime.now(datetime.timezone.utc).isoformat() with open("doordash-stores.csv", "a", newline="") as f: out = csv.writer(f) for store in STORES: s, credits = fetch(store) for item in s.get("popular_items", []): out.writerow([ now, s.get("id"), s.get("name"), s.get("rating"), s.get("review_count"), s.get("eta_minutes"), item.get("id"), item.get("name"), item.get("price"), item.get("currency"), credits, ]) time.sleep(1) ``` The one-second pause keeps a free account within 1 request a second. Key rows on the store `id` and the item `id` rather than the item name, so a renamed item can still be matched as long as its `id` stays the same. ### What should the job do with errors? Every error returns an HTTP status and a JSON body with `code`, `message` and `request_id`, and costs nothing. Wait and retry on `rate_limited` (429) and `temporarily_unavailable` (503), which carry `Retry-After`. Treat `invalid_parameters` (422) as a bad input in your list, and `not_found` (404) as a store to review. Requests have no idempotency key, so a client timeout may hide a call that succeeded and was billed; keep the timeout generous. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking a DoorDash store cost? A successful store call costs 1–11 credits, so budget per store tracked rather than per call. The recorded call without `include_options` cost 1 credit; calls with `include_options` can cost more, up to 11. A stores search costs 1 credit per call. Multiply stores by checks per month by the credits per call, and budget at the top of the range for any call that sets `include_options`. | Plan | Arithmetic | Credits a month | | --- | --- | --- | | 200 stores daily, no `include_options` | 200 × 30 days × 1 credit | 6,000 | | 200 stores daily, budgeted with `include_options` | 200 × 30 days × 11 credits | 66,000 | | 200 stores weekly, budgeted with `include_options` | 200 × 4 weeks × 11 credits | 8,800 | | 50 area searches daily | 50 × 30 days × 1 credit | 1,500 | The first, third and fourth fit the Starter pack's 10,000 credits; the second needs the Growth pack's 200,000, since it's more than the Build pack's 50,000. The 100 free credits on signup cover 100 store calls without `include_options`, or at least 9 with it. Failed calls cost nothing and return `X-Credits-Used: 0`. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how calls are debited. To try it, run `store=500965` in the playground on the [DoorDash API page](https://perceptlayer.com/apis/doordash), then [get a free API key](https://perceptlayer.com/signup) and swap in the stores you want to follow. The [store endpoint page](https://perceptlayer.com/apis/doordash/store) lists its parameters, and the [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists other sources in the same area. ## APIs in this post - [DoorDash **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/doordash) ## Frequently asked questions ### Is this the official DoorDash API? No. These are Perceptlayer endpoints that return public DoorDash store data, collected from publicly available sources and returned as found at the time of the call. They don't place orders, request deliveries, edit menus or connect to a merchant account. For any of those, read DoorDash's terms and look beyond these endpoints. ### How much does a DoorDash store call cost? A successful `GET /v1/doordash/store` call costs 1–11 credits. The recorded call without `include_options` cost 1 credit, shown as `credits_charged: 1`; calls with `include_options` can cost up to 11. `GET /v1/doordash/stores` costs 1 credit. Check `X-Credits-Used` on each response to see what a call cost. ### Can I get the full menu, not only popular items? The recorded store response has `popular_items` with `name`, `price` and `currency`, a `categories` array with each category's `id` and `name`, plus `item_count: 51` and `menu_available: true`. The recording trims each category's `items`, so run the call in the playground to see their fields before relying on them. ### Can I search for stores near a location? Yes. `GET /v1/doordash/stores` takes a `query` up to 100 characters with `lat` and `lng`, and you can narrow it with `sort` ( `rating`, `delivery_time` or `distance`), `min_rating`, `price_range[]` and `open_now`. Use `cursor` for later results. Each successful search costs 1 credit. ### Can an AI agent look up DoorDash stores? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the DoorDash endpoints with `search_endpoints`, reads their parameters with `get_endpoint`, both free, and calls them with `call_endpoint`, which spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup in Claude Code and other clients. doordash food delivery restaurant data menu data python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Uber Eats API: Store Data as JSON](https://perceptlayer.com/blog/uber-eats-api-restaurant-data) Get an Uber Eats store's rating, hours, delivery fee, ETA and popular items as JSON from one call to /v1/uber-eats/store, at 1 to 11 credits for each call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Costco API: Product Data and Prices as JSON](https://perceptlayer.com/blog/costco-api-product-prices) A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs. --- title: "Kroger API: Grocery Products and Prices as JSON" description: "Search Kroger products as JSON: price, regular_price, sale_ends, unit_price and stock_level per item. The recorded milk search returned 24 items for 1 credit." url: https://perceptlayer.com/blog/kroger-api-grocery-prices --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Kroger API: Grocery Products and Prices as JSON 13 Nov 2026 Perceptlayer 7 min read To get Kroger product and price data as JSON, call `GET /v1/kroger/search` with a `query`: the recorded search for "milk" returned 24 items, each with `upc`, `name`, `brand`, `size`, `price`, `regular_price`, `sale_price`, `sale_ends`, `unit_price` and `stock_level`, for 1 credit. A second endpoint, `GET /v1/kroger/product`, takes a `upc` or a `url` for one product at 1 credit. This guide shows the requests, the parameters, a real response, a price tracker in Python and the cost per product tracked. ## Key takeaways - `GET /v1/kroger/search` takes a required `query` (up to 120 characters) and an optional `page` whose only documented value is `1`; it costs 1 credit per successful call. - `GET /v1/kroger/product` takes an optional `upc` or `url` (up to 300 characters) and costs 1 credit per successful call. - The recorded "milk" search returned `count: 24` and `has_next_page: false`, and its first item had `price` 3.99, `regular_price` 4.99 and `sale_ends` set. - Neither endpoint documents a store or location parameter, so a tracker can't choose which store's price it gets; record prices with the call time and keep queries fixed. - Checking 300 products by UPC once a day is 300 × 30 days × 1 credit = 9,000 credits a month, inside the Starter pack's 10,000. ## What does the Kroger API on Perceptlayer cover? The Kroger API on Perceptlayer has two endpoints: a product search by keyword and a product lookup by UPC or URL. Both are `GET` requests that return JSON, and both cost 1 credit per successful call. Search is where most jobs start, because one call returns a list of products with prices, sizes, categories, ratings, stock level and aisle, all as named fields. | Method | Path | Returns | Credits | Required | Optional | | --- | --- | --- | --- | --- | --- | | `GET` | `/v1/kroger/search` | Products for a keyword | 1 | `query` | `page` | | `GET` | `/v1/kroger/product` | One product | 1 | none | `upc`, `url` | These endpoints return public product data, collected from publicly available sources and returned as found at the time of the call. They aren't Kroger's own developer API, and they don't place orders, build carts or connect to a shopper's account. The [Kroger API page](https://perceptlayer.com/apis/kroger) has both endpoints and a playground to run them. ## How do you search Kroger products? Send a `GET` request to `https://api.perceptlayer.com/v1/kroger/search` with your keyword in `query` and your key in the `X-API-Key` header. This is the request behind the recorded response in this guide: ```bash curl "https://api.perceptlayer.com/v1/kroger/search?query=milk" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, the key can go in the `api_key` query parameter; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, and the recorded body also reports `credits_charged: 1` in `meta`. ### Which parameters do the endpoints take? The two endpoints take three parameters between them. The table lists each with the constraints the API documents; nothing else about them is documented, so check behaviour in the playground before you depend on it. | Endpoint | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | --- | | `search` | `query` | string | yes | Up to 120 characters | | `search` | `page` | integer | no | One of `1` | | `product` | `upc` | string | no | None documented | | `product` | `url` | string | no | Up to 300 characters | `page` accepts only `1`, so one search call is the whole result for that query. The recorded call confirms it from the other side: `has_next_page` is `false`. If you need more products, make your queries narrower and more numerous, such as "whole milk", "oat milk" and "lactose free milk", rather than looking for a second page. ## What does a Kroger search response contain? The response is a `data` object with the query, the page, a `count`, a `has_next_page` flag and an `items` array, plus a `meta` block with the credits charged. Each item carries identity, pricing, unit pricing, stock and aisle fields. This is the recorded "milk" response, trimmed to the first item and parts of the second: ```json { "success": true, "data": { "query": "milk", "page": 1, "count": 24, "has_next_page": false, "items": [ { "position": 1, "id": "0001111050434", "upc": "0001111050434", "name": "Simple Truth Organic® Lactose Free Vitamin D Whole Milk Half Gallon", "brand": "Simple Truth", "url": "https://www.kroger.com/p/simple-truth-organic-lactose-free-vitamin-d-whole-milk-half-gallon/0001111050434", … "size": "1/2 gal", "currency": "USD", "categories": [ "Dairy & Eggs > Milk & Dairy Free Milk > Whole Milk", … ], "diets": [ "Kosher", "Lactose Free" ], "organic": false, "non_gmo": true, "snap_eligible": true, … "rating": { "average": 4, "count": 14 }, "stock_level": "high", "fulfillment": [ "pickup" ], "aisle": { "number": "100", "description": "DAIRY", "side": "R" }, "price": 3.99, "regular_price": 4.99, "sale_price": 3.99, "sale_ends": "2026-12-02T04:59:59.999Z", "unit_price": 0.0623, "unit": "fl oz", "unit_price_text": "$0.06/fl oz" }, { "position": 2, "upc": "0001111042861", "name": "Simple Truth Organic® 2% Reduced Fat Milk with DHA Omega-3 Half Gallon", … "stock_level": "temporarily_out_of_stock", … "price": 3.99, "regular_price": 4.99, … } ] }, "meta": { "endpoint_family": "search", … "credits_charged": 1, "credits_remaining": 1910 } } ``` | Field | What a price tracker does with it | | --- | --- | | `upc` | The product key you store and pass to the product endpoint | | `name`, `brand`, `size` | Labels, and `size` to compare pack sizes | | `price`, `regular_price`, `sale_price` | The price shown, the regular price and the sale price | | `sale_ends` | When the sale price ends, as an ISO timestamp | | `unit_price`, `unit` | Price per unit as a number, for comparing sizes | | `stock_level` | Values in the recording: `high`, `temporarily_out_of_stock` | | `categories`, `diets`, `rating` | Grouping and filtering | Three things to notice. `price` and `sale_price` are both 3.99 while `regular_price` is 4.99, so `regular_price - price` gives the discount at the time of the call. `fulfillment` appears on the first item but not the second, so treat any field as optional. And the first item's name contains "Organic" while its `organic` flag is `false`; store the flags as returned and don't infer them from the name. ### Where do store and location fit? They don't, in the catalogue as it stands. Neither endpoint lists a store, ZIP code or location parameter, and the recorded response doesn't say which store its prices and `aisle` refer to. A tracker therefore can't pick a store, and you shouldn't label prices with one. Keep each query fixed, store the call time with every row and compare like with like. ## How do you look up one product by UPC? `GET /v1/kroger/product` takes a `upc` or a `url`, and both parameters are optional, so pass the one you have. Search items carry `upc` and `url` fields, so the names match the product endpoint's parameters. In the recording, `id` and `upc` hold the same value, `0001111050434`. ```bash curl "https://api.perceptlayer.com/v1/kroger/product?upc=0001111050434" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded product response, so we can't show its fields here. Run that call in the playground on the [product endpoint page](https://perceptlayer.com/apis/kroger/product) and compare its fields with the search item before you build a tracker on it. ## How do you build a grocery price tracker? A price tracker runs a fixed set of searches on a schedule and appends one row per item: the time, the query, the `upc`, the prices, the unit price and the stock level. Running the same queries every day gives you a price history per UPC that you can chart or alert on. The script below does that with Python, `requests` and `csv`, reading only fields in the recorded response. ```python import csv import datetime import os import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/kroger/search" QUERIES = ["milk", "eggs", "bread"] def search(query, attempts=3): for _ in range(attempts): r = requests.get(URL, params={"query": query}, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"] raise RuntimeError(f"gave up on {query}") now = datetime.datetime.now(datetime.timezone.utc).isoformat() with open("kroger-prices.csv", "a", newline="") as f: out = csv.writer(f) for query in QUERIES: data = search(query) for item in data.get("items", []): out.writerow([ now, query, item.get("upc"), item.get("name"), item.get("size"), item.get("price"), item.get("regular_price"), item.get("sale_price"), item.get("sale_ends"), item.get("unit_price"), item.get("unit"), item.get("stock_level"), ]) time.sleep(1) ``` The one-second pause keeps a free account within its 1 request a second. To flag sales, compare `price` with `regular_price` per row; to compare sizes, use `unit_price` with `unit` rather than `price`. ### What should the job do with errors? Every error returns an HTTP status and a JSON body with `code`, `message` and `request_id`, and costs nothing. Retry `rate_limited` (429) and `temporarily_unavailable` (503) after the `Retry-After` seconds. Treat `invalid_parameters` (422) as a bug in your query list. Requests have no idempotency key, so a client timeout may hide a call that succeeded and was billed; keep the timeout generous. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does tracking Kroger prices cost? Every successful call to either endpoint costs 1 credit, so the cost of a tracker depends on how you collect. Search spreads one credit across every item it returns: the recorded "milk" call returned 24 items for 1 credit. A UPC list costs 1 credit per product per check, which suits a fixed basket of items you know. | Plan | Arithmetic | Credits a month | | --- | --- | --- | | 20 queries daily | 20 × 30 days × 1 credit | 600 | | 100 queries daily | 100 × 30 days × 1 credit | 3,000 | | 300 UPCs daily | 300 × 30 days × 1 credit | 9,000 | | 1,000 UPCs daily | 1,000 × 30 days × 1 credit | 30,000 | The first three fit the Starter pack's 10,000 credits, and the last fits the Build pack's 50,000. The 100 free credits on signup cover 100 searches or 100 UPC checks, enough to run the 20-query plan for five days. Failed calls cost nothing and return `X-Credits-Used: 0`. Purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how calls are debited. To try it, run `query=milk` in the playground on the [search endpoint page](https://perceptlayer.com/apis/kroger/search), then [get a free API key](https://perceptlayer.com/signup) and set your own queries. Other retail sources are on the [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page, and more guides like this one are in [API guides](https://perceptlayer.com/blog/category/api-guides). ## APIs in this post - [Kroger **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/kroger) ## Frequently asked questions ### Is this Kroger's official API? No. These are Perceptlayer endpoints that return public Kroger product data, collected from publicly available sources and returned as found at the time of the call. They search products and look up one product by UPC or URL. They don't place orders, build carts or connect to a shopper's account. Read Kroger's terms before you use the data commercially. ### Can I get prices for a specific Kroger store? Not with these endpoints. Neither `search` nor `product` documents a store, ZIP code or location parameter, and the recorded response doesn't name a store. Keep your queries fixed and record the call time with each price, so your history compares like with like. Check the Kroger API page for any parameters added later. ### How many products does one Kroger search return? The recorded "milk" search returned `count: 24` with `has_next_page: false`. The `page` parameter's only documented value is `1`, so one call is the whole result for a query. To cover more products, run more specific queries. Each successful search costs 1 credit, whatever the count. ### How do I tell if a Kroger product is on sale? Compare `price` with `regular_price`. In the recorded response, the first item has `price` 3.99, `regular_price` 4.99, `sale_price` 3.99 and `sale_ends` set to an ISO timestamp, so the sale and its end date are fields you read. Both recorded items had a sale, so read `sale_price` and `sale_ends` as optional fields. ### How fast can I run a Kroger price check? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second, 60 a minute, so a 20-query daily check finishes in under a minute. Paying accounts run at least 5 requests a second, 300 a minute, depending on the pack. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. kroger grocery prices price tracking product data python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Costco API: Product Data and Prices as JSON](https://perceptlayer.com/blog/costco-api-product-prices) A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Etsy API: Product Data as JSON](https://perceptlayer.com/blog/etsy-api-listings-json) One GET to /v1/etsy/product returns an Etsy listing's price, discount, stock, variations and images as JSON, at 10 credits per successful call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Amazon Product API: Search, Offers and Reviews as JSON](https://perceptlayer.com/blog/amazon-product-api-json) Search Amazon by keyword, then look each asin up with product, offers, rating-summary and customers-say. Domain values per endpoint, 1 credit a call. --- title: "Pinterest Scraper or API: What You Get | Perceptlayer" description: "A DIY Pinterest scraper versus 6 Pinterest endpoints at 1 credit a call: pin search, board pins, upkeep, terms and the credits per search term tracked." url: https://perceptlayer.com/blog/pinterest-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Pinterest Scraper or API: What You Get 12 Nov 2026 Perceptlayer 8 min read A Pinterest scraper is a program that loads Pinterest search results, boards and pins, reads them out of the page, and keeps loading more as the results continue. You own the browser or requests, the parsing, the paging and the fixes when any of it changes. The alternative is six Pinterest endpoints that return search results, boards, board pins and single pins as JSON, at 1 credit per successful call. All six are restricted, so this post compares the two for aggregate work on topics, trends and brand boards. ## Key takeaways - A Pinterest scraper has four parts you maintain: a fetcher (often a headless browser), a pin parser, paging state that remembers where it stopped, and a monitor that notices when output quietly shrinks. - The Pinterest API has 6 `GET` endpoints, each 1 credit per successful call: `search`, `pin`, `board`, `board-pins`, `user-boards` and `user-profile`. - `GET /v1/pinterest/search` takes a `query` of up to 200 characters, with optional `limit` and `bookmark`, which suits tracking topics and product categories. - All 6 Pinterest endpoints are restricted: they work after you accept the restricted-endpoint terms, which don't permit collecting personal data without a lawful basis or using it to contact people. - Tracking 40 search terms once a day is 40 × 30 = 1,200 credits a month. The 100 free credits on signup cover 2 days; the Starter pack's 10,000 covers 8 months. ## What does building a Pinterest scraper involve? Building a Pinterest scraper means writing code that loads search results or a board, waits for the pins to appear, reads each pin's details, and then asks for the next batch until it has enough. It has to do that for every search term and board on your list, every day, and store the results without duplicates. That is four pieces of code, and each needs upkeep as long as the scraper runs. ### The fetcher If pages load more content as you scroll, the fetcher usually means running a headless browser, or watching the requests the page makes and replaying them. A browser is slow and heavy per job. Replaying requests is faster but ties your code to formats you don't control. Either way, any large platform has to separate people from automated traffic, so expect slow responses, login prompts and blocks at volume. When that happens, stop: getting around a site's protections with proxies, fake accounts or CAPTCHA solvers is not a fix we'd recommend. ### The parser and the paging The parser turns each pin into a row: title, description, image link, outbound link, board, and whatever counts you keep. Page structure changes as a platform ships features, and a parser that broke usually returns blank fields rather than an error. Paging adds state: your scraper has to remember where it stopped in a result set, resume after a crash, and skip pins it already stored. ### The monitor and the rules Add checks on rows per search term per run and on empty fields, because a scraper's usual failure is silent. Before you build, read Pinterest's terms and the law where you operate, and get legal advice for commercial use. For when a scraper is worth writing at all, [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) is a practical starting point. ## What do the Pinterest endpoints return? The [Pinterest API](https://perceptlayer.com/apis/pinterest) returns public Pinterest data as JSON, one call per lookup. It has 6 endpoints, all `GET`, all 1 credit per successful call. They cover search across pins, one pin by ID, a board and its pins, and an account's boards and profile. Data is collected from publicly available sources and returned as found at the time of the call. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | [`/v1/pinterest/search`](https://perceptlayer.com/apis/pinterest/search) | Search results | `query` | `limit`, `bookmark` | | [`/v1/pinterest/pin`](https://perceptlayer.com/apis/pinterest/pin) | One pin | `pin_id` | none | | [`/v1/pinterest/board`](https://perceptlayer.com/apis/pinterest/board) | One board | none | `board_id`, `username`, `slug` | | [`/v1/pinterest/board-pins`](https://perceptlayer.com/apis/pinterest/board-pins) | A board's pins | none | `board_id`, `username`, `slug`, `limit`, `bookmark` | | [`/v1/pinterest/user-boards`](https://perceptlayer.com/apis/pinterest/user-boards) | An account's boards | `username` | `limit`, `bookmark` | | [`/v1/pinterest/user-profile`](https://perceptlayer.com/apis/pinterest/user-profile) | An account's profile | `username` | none | A topic search is one request with your key in the `X-API-Key` header: ```bash curl "https://api.perceptlayer.com/v1/pinterest/search?query=home+decor&limit=25" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for this API, so this post doesn't show one or name response fields. Run the call in the playground on the [Pinterest API page](https://perceptlayer.com/apis/pinterest) to see the exact JSON before you write code that reads it. ### Which parameters do the endpoints take? `query` on `search` is a string of up to 200 characters. `pin_id` is a string of up to 64 characters, and so are `board_id` and `username`. `slug` takes up to 255 characters. Three endpoints take an optional integer `limit` and an optional string `bookmark`, up to 512 characters on `board-pins` and `user-boards`. The reference documents types and lengths only, not defaults, maximum page sizes or where a `bookmark` value comes from, so check paging in the playground before you build on it. `board` and `board-pins` have no required parameter: they accept `board_id`, `username` and `slug`, and the reference doesn't say which combination identifies a board. Try both forms in the playground with a board you know. Here is the same search in Python, printing the credit headers every successful response carries: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/pinterest/search", params={"query": "home decor", "limit": 25}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) print(resp.status_code) print(resp.headers.get("X-Credits-Used"), resp.headers.get("X-Credits-Remaining")) ``` ## Which terms apply to the restricted endpoints? All 6 Pinterest endpoints are restricted. They work once you accept the restricted-endpoint terms in the dashboard; the terms are at [/legal/restricted-endpoints](https://perceptlayer.com/legal/restricted-endpoints). Those terms don't permit collecting personal data without a lawful basis, and they don't permit using data from these endpoints to contact people. That rules out building lists of pinners, outreach, and following what individuals save or post. What fits is aggregate work on topics, trends, markets and brands. Count which styles or product types show up for a search term month by month. Track what a brand's own boards publish. Compare how two product categories are presented across search results. Use `user-profile` and `user-boards` for brand and business accounts, not private individuals. If a response carries names or handles you don't need, drop them before you store anything. A call made before accepting the terms returns `restricted_endpoint` (403); the [errors docs](https://docs.perceptlayer.com/errors) cover it with the other codes. ## How do a scraper and the endpoints compare? A scraper gives you full control and no per-call bill, and costs you a browser or request replay, upkeep and block risk. The endpoints give you JSON from six documented paths at 1 credit a call, and the restricted-endpoint terms decide what you may do with the data. The table compares them for a recurring job, such as tracking a list of search terms and brand boards every day. | | DIY Pinterest scraper | Pinterest endpoints | | --- | --- | --- | | Setup | Headless browser or request replay, parser, paging state, storage, monitoring | API key in the `X-API-Key` header | | What you get | Whatever you can parse from each page | JSON from 6 documented endpoints | | Topic search | Scroll and parse search pages | `search` with `query` up to 200 characters | | Board contents | Scroll and parse each board | `board-pins` with `board_id`, or `username` and `slug` | | Paging | Your own scroll and resume logic | `limit` and `bookmark` parameters | | When pages change | Your parser breaks and you fix it | No parser of yours to fix | | Blocks and errors | Yours to handle at volume | A failed call returns an error code and costs 0 | | Speed | One browser or session per job | 1 request a second free, at least 5 a second paid | | Terms | The platform's terms and local law | Restricted-endpoint terms; no personal data without a lawful basis | | Cost | Hosting and engineering time | 1 credit per successful call | ### What does tracking a search term cost? On the endpoints, cost follows calls, not pins. One `search` call per term per day costs 1 credit, so a term costs 1 credit a day for each page you fetch. Tracking 40 product-category and style terms with one page each per day is 40 calls × 1 credit = 40 credits a day, or 40 × 30 = 1,200 credits a month. The 100 free credits you get after verifying an email address, with no credit card, cover 2 full days of that plan. Add a weekly `board-pins` call for 10 brand boards and you add 10 × 4 = 40 calls, for 1,240 credits a month. The Starter pack's 10,000 covers 8 months of that, at 9,920 credits; purchased credits last 12 months, with no subscription. Fetching a second page per term doubles the search share. Failed calls cost nothing and return `X-Credits-Used: 0`. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how each call is billed. ## Which route should you choose? Choose by what you'll do with the data and how often, because that decides whether upkeep or per-call cost dominates. The verdicts below assume aggregate work on topics, trends, markets and brand accounts, the uses the restricted-endpoint terms allow. If your plan involves profiling, tracking or contacting individuals, neither route is the answer. - **Trend research for a product category or style**: run `search` with your terms on a schedule and store the results with the run date. One credit per term per page. - **Watching a brand's own boards, or competitor brands' public boards**: call `board-pins` on a schedule and keep what changed since the last run. - **Mapping a brand account's boards**: call `user-boards` with the brand's `username`, then pick the boards to watch with `board-pins`. - **Checking one pin you already know**: call `pin` with its `pin_id`. - **An AI agent answering design or product-trend questions**: connect the MCP server at `https://perceptlayer.com/mcp`, where `search_endpoints` and `get_endpoint` cost nothing and `call_endpoint` spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. - **A one-off look at a few boards**: open them in a browser and skip both routes. - **Learning how scraping works**: practise on a test site first. For the same trade-off on image-heavy sources, [Google Images Scraper or API](https://perceptlayer.com/blog/google-images-scraper-vs-api) and [Instagram Scraper or API](https://perceptlayer.com/blog/instagram-scraper-vs-api) cover those, and the [social media APIs](https://perceptlayer.com/verticals/social) list the rest. To check the fields first, run `search` with your own term in the playground on the [Pinterest API page](https://perceptlayer.com/apis/pinterest), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Pinterest **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/pinterest) ## Frequently asked questions ### Is scraping Pinterest legal? It depends on where you operate, what you collect and how you use it, and Pinterest's own terms set out what the platform allows. Public pins about products, styles and brands are lower risk than data about individuals, which is personal data in many places. Read the terms, get legal advice for commercial use, and don't get around blocks, logins or challenges. ### Can I collect data about individual Pinterest users? No. All 6 Pinterest endpoints are restricted, and the restricted-endpoint terms don't permit collecting personal data without a lawful basis or using data from these endpoints to contact people. Use them for topics, trends and brand accounts in aggregate, and drop names and handles you don't need before you store results. ### How many credits does a Pinterest call cost? Each of the 6 Pinterest endpoints costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`. Every account gets 100 free credits once, after verifying an email address, and prepaid packs start at 10,000 credits. ### How do I get more than one page of search results? `search`, `board-pins` and `user-boards` take optional `limit` and `bookmark` parameters. The reference doesn't document defaults, maximum values or where a `bookmark` comes from, so run a search in the playground on the [Pinterest API page](https://perceptlayer.com/apis/pinterest) and read the JSON before you write paging code. Each call is billed separately, at 1 credit when it succeeds. ### What happens when I hit the rate limit? You get a 429 `rate_limited` error with a `Retry-After` header giving the seconds to wait, and the call costs nothing. Free accounts get 1 request a second, paying accounts at least 5 a second, and the limit is shared by all of an account's keys. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the `RateLimit-Remaining` and `RateLimit-Reset` headers. pinterest scraping social media data trend research boards ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Telegram Scraper or API: What You Get](https://perceptlayer.com/blog/telegram-scraper-vs-api) A DIY Telegram scraper versus 4 Telegram channel endpoints at 1 credit a call: channel posts, in-channel search, upkeep, terms and cost per channel. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Threads Scraper or API: What You Get](https://perceptlayer.com/blog/threads-scraper-vs-api) A DIY Threads scraper versus 8 Threads endpoints at 1 credit a call: keyword search, topic tags, brand posts, upkeep, terms and the cost per tag tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Nov 2026 Perceptlayer 8 min read ## [Facebook Scraper or API: What You Get](https://perceptlayer.com/blog/facebook-scraper-vs-api) A Facebook scraper vs 21 restricted Facebook endpoints at 1 credit a call: pages, events and Marketplace for brand and market work, and the cost per page. --- title: "Telegram Scraper or API: What You Get | Perceptlayer" description: "A DIY Telegram scraper versus 4 Telegram channel endpoints at 1 credit a call: channel posts, in-channel search, upkeep, terms and cost per channel." url: https://perceptlayer.com/blog/telegram-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Telegram Scraper or API: What You Get 12 Nov 2026 Perceptlayer 8 min read A Telegram scraper is a program that fetches public channel pages, pulls each post out of what comes back, and pages back through older posts on a schedule. You build and maintain the fetching, the parsing and the history walk yourself. The alternative is four Telegram endpoints that return channel details, a channel's posts, search inside a channel and single posts as JSON, at 1 credit per successful call. All four are restricted, so this post compares the two routes for aggregate work on public channels and topics. ## Key takeaways - A Telegram scraper has four parts you maintain: a fetcher, a post parser, a history walker that pages back through a channel, and a monitor that notices when output quietly shrinks. - The Telegram API has 4 `GET` endpoints, each 1 credit per successful call: `channels`, `channels-posts`, `channels-search` and `posts`. Every one takes a channel `username`. - `GET /v1/telegram/channels-search` takes a `q` of up to 256 characters, so you can look for a topic inside one public channel with one call. - All 4 Telegram endpoints are restricted: they work after you accept the restricted-endpoint terms, which don't permit collecting personal data without a lawful basis or using it to contact people. - Polling 25 public channels once a day is 25 × 30 = 750 credits a month. The 100 free credits on signup cover the first 4 days; the Starter pack's 10,000 covers 12 months with 1,000 left. ## What does building a Telegram scraper involve? Building a Telegram scraper means writing code that fetches a public channel's content, finds each post in the response, and walks backwards through older posts until it reaches the last one you stored. Then it has to run again tomorrow, pick up only what's new, and store everything without duplicates. That is four pieces of code, and each one needs upkeep for as long as the scraper runs. ### The fetcher The fetcher requests a channel's content, waits for a response, and retries when something goes wrong. At low volume that's a loop with `requests` and a sleep. At higher volume, with dozens of channels on a schedule, you need queueing, back-off and a way to spread requests over time. Any large platform has to separate people from automated traffic, so a scraper should expect slow responses, errors and blocks. When that happens, stop: getting around a site's protections with proxy rotation or fake accounts is not a fix we'd recommend. ### The parser and the history walk The parser turns markup into rows: post text, time, media links, view or reaction counts if you keep them. Markup changes as a platform ships features, so a parser that worked last month can return empty fields today without raising an error. The history walk adds its own logic: how to ask for older posts, when to stop, and how to resume after a crash without skipping or repeating posts. ### The monitor and the rules A scraper rarely fails loudly. It returns fewer posts, or posts with blank text, and nobody notices for a week. So you add checks on row counts and empty fields per channel per run. Before you build any of it, read Telegram's terms and the law where you operate, and get legal advice if the project is commercial. For the general case of when writing a scraper pays off, [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) is a practical starting point. ## What do the Telegram endpoints return? The [Telegram API](https://perceptlayer.com/apis/telegram) returns public channel data as JSON, one call per lookup. It has 4 endpoints, all `GET`, all 1 credit per successful call, and every one is keyed on a channel `username`. Between them they cover the four jobs a channel scraper does: look up a channel, list its posts, search inside it, and fetch one post. Data is collected from publicly available sources and returned as found at the time of the call. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | [`/v1/telegram/channels`](https://perceptlayer.com/apis/telegram/channels) | Channel details | `username` | none | | [`/v1/telegram/channels-posts`](https://perceptlayer.com/apis/telegram/channels-posts) | A channel's posts | `username` | `before` | | [`/v1/telegram/channels-search`](https://perceptlayer.com/apis/telegram/channels-search) | Search results inside a channel | `username`, `q` | none | | [`/v1/telegram/posts`](https://perceptlayer.com/apis/telegram/posts) | One post | `username`, `post_id` | `context` | A channel lookup is one request with your key in the `X-API-Key` header: ```bash curl "https://api.perceptlayer.com/v1/telegram/channels?username=telegram" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for this API, so this post doesn't show one or name response fields. Run the call in the playground on the [Telegram API page](https://perceptlayer.com/apis/telegram) to see the exact JSON before you write code that reads it. ### Which parameters do the endpoints take? Every endpoint takes `username`, a string naming the public channel. `channels-search` adds `q`, a string of up to 256 characters. `posts` adds `post_id`, a string, and an optional boolean `context`. `channels-posts` takes an optional integer `before`. The reference documents types and limits only, not defaults, page sizes or what `before` counts from, so test `before` and `context` in the playground before you build paging or a thread view on them. Here is the same pattern in Python, searching one channel for a topic and printing the credit headers every successful response carries: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/telegram/channels-search", params={"username": "telegram", "q": "update"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) print(resp.status_code) print(resp.headers.get("X-Credits-Used"), resp.headers.get("X-Credits-Remaining")) ``` ## Which terms apply to the restricted endpoints? All 4 Telegram endpoints are restricted. They work once you accept the restricted-endpoint terms in the dashboard; the terms are at [/legal/restricted-endpoints](https://perceptlayer.com/legal/restricted-endpoints). Those terms don't permit collecting personal data without a lawful basis, and they don't permit using data from these endpoints to contact people. That rules out building lists of channel members or commenters, outreach, and following what individuals post. What fits is aggregate work on public channels and topics. Count how often a product, a market term or an incident comes up across a set of news and industry channels. Archive what a brand's own channel publishes. Compare how much coverage a topic gets week by week. If a response carries names or handles of people you don't need, drop them before you store anything. A call made before accepting the terms returns `restricted_endpoint` (403); the [errors docs](https://docs.perceptlayer.com/errors) cover it with the other codes. ## How do a scraper and the endpoints compare? A scraper gives you full control and no per-call bill, and costs you upkeep, block risk and the work of reading the platform's rules. The endpoints give you JSON from four documented paths at 1 credit a call, and the restricted-endpoint terms decide what you may do with the data. The table compares them for a recurring job, such as polling a set of public channels every day. | | DIY Telegram scraper | Telegram endpoints | | --- | --- | --- | | Setup | Fetcher, parser, history walker, storage, monitoring | API key in the `X-API-Key` header | | What you get | Whatever you can parse from each response | JSON from 4 documented endpoints | | Channel posts | Parsed and paged by your own code | `channels-posts` with `username`, optional `before` | | Search inside a channel | Parse everything, then filter locally | `channels-search` with `q` up to 256 characters | | When markup changes | Your parser breaks and you fix it | No parser of yours to fix | | Blocks and errors | Yours to handle at volume | A failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Terms | The platform's terms and local law | Restricted-endpoint terms; no personal data without a lawful basis | | Cost | Hosting and engineering time | 1 credit per successful call | ### What does tracking a channel cost per day? On the endpoints, cost follows calls, not posts. One `channels-posts` call per channel per day costs 1 credit, so a channel costs 1 credit a day however many posts it published. Polling 25 public news and industry channels once a day is 25 calls × 1 credit = 25 credits a day, or 25 × 30 = 750 credits a month. The 100 free credits you get after verifying an email address, with no credit card, cover that plan for 100 ÷ 25 = 4 days. Add a weekly `channels-search` for 4 topic terms in each of the 25 channels, and you add 25 × 4 × 4 = 400 calls a month, for 1,150 credits. The Starter pack's 10,000 covers 8 months of that; purchased credits last 12 months, with no subscription. Failed calls cost nothing and return `X-Credits-Used: 0`. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how each call is billed. ## Which route should you choose? Choose by what you'll do with the data and how often you need it, because that decides whether upkeep or per-call cost dominates. The verdicts below assume aggregate work on public channels and topics, the uses the restricted-endpoint terms allow. If your plan involves profiling, tracking or contacting individuals, neither route is the answer. - **Topic and market tracking across public channels**: poll `channels-posts` once a day per channel and count your terms in what you store. One credit per channel per day. - **Finding past coverage of a topic in a known channel**: call `channels-search` with the channel's `username` and your `q`, instead of paging through its whole history. - **Archiving a brand's own channel**: call `channels-posts` on a schedule and store the posts with the run date; test `before` in the playground to see how it pages back. - **Citing or checking one specific post**: call `posts` with `username` and `post_id`. - **An AI agent answering questions about public channels**: connect the MCP server at `https://perceptlayer.com/mcp`, where `search_endpoints` and `get_endpoint` cost nothing and `call_endpoint` spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. - **A one-off look at three channels**: open them in Telegram and skip both routes. - **Learning how scraping works**: practise on a test site, not a messaging platform. For the same trade-off on other social sources, [Twitter Scraper or X API](https://perceptlayer.com/blog/twitter-scraper-vs-api) and [Instagram Scraper or API](https://perceptlayer.com/blog/instagram-scraper-vs-api) cover those, and the [social media APIs](https://perceptlayer.com/verticals/social) list the rest. To check the fields first, run `channels-posts` on a public channel in the playground on the [Telegram API page](https://perceptlayer.com/apis/telegram), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Telegram **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/telegram) ## Frequently asked questions ### Is scraping Telegram legal? It depends on where you operate, what you collect and how you use it, and Telegram's own terms set out what the platform allows. Public channel posts about brands, markets and topics are lower risk than data about individuals, which is personal data in many places. Read the terms, get legal advice for commercial use, and don't get around blocks or protections. ### Can I collect data about channel members or individual users? No. All 4 Telegram endpoints are restricted, and the restricted-endpoint terms don't permit collecting personal data without a lawful basis or using data from these endpoints to contact people. Use them for public channels and topics in aggregate, and drop names and handles you don't need before you store results. ### How many credits does a Telegram call cost? Each of the 4 Telegram endpoints costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`. Every account gets 100 free credits once, after verifying an email address, and prepaid packs start at 10,000 credits. ### How fast can I poll a list of channels? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 25-channel daily poll finishes in under a minute. Paying accounts run at least 5 a second. A 429 `rate_limited` reply carries a `Retry-After` header. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the headers. ### Can I see a Telegram response before writing code? Yes. The [Telegram API page](https://perceptlayer.com/apis/telegram) has a playground: pick an endpoint, fill in its parameters and run a real call with your key to see the JSON it returns. Do this before you write a parser, since this post doesn't include a recorded response and the fields are best read from a real call. telegram scraping social media data public channels topic tracking ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Threads Scraper or API: What You Get](https://perceptlayer.com/blog/threads-scraper-vs-api) A DIY Threads scraper versus 8 Threads endpoints at 1 credit a call: keyword search, topic tags, brand posts, upkeep, terms and the cost per tag tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Pinterest Scraper or API: What You Get](https://perceptlayer.com/blog/pinterest-scraper-vs-api) A DIY Pinterest scraper versus 6 Pinterest endpoints at 1 credit a call: pin search, board pins, upkeep, terms and the credits per search term tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Nov 2026 Perceptlayer 8 min read ## [Facebook Scraper or API: What You Get](https://perceptlayer.com/blog/facebook-scraper-vs-api) A Facebook scraper vs 21 restricted Facebook endpoints at 1 credit a call: pages, events and Marketplace for brand and market work, and the cost per page. --- title: "Threads Scraper or API: What You Get | Perceptlayer" description: "A DIY Threads scraper versus 8 Threads endpoints at 1 credit a call: keyword search, topic tags, brand posts, upkeep, terms and the cost per tag tracked." url: https://perceptlayer.com/blog/threads-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Threads Scraper or API: What You Get 12 Nov 2026 Perceptlayer 8 min read A Threads scraper is a program that loads Threads search results, topic tags and account pages, pulls the posts out of what comes back, and repeats on a schedule. You maintain the fetching, the parsing and the fixes every time the pages change. The alternative is eight Threads endpoints that return keyword search, tag results, posts and account posts as JSON, at 1 credit per successful call. All eight are restricted, so this post compares the two for aggregate work on topics, markets and brand accounts. ## Key takeaways - A Threads scraper has four parts you maintain: a fetcher (often a headless browser), a post parser, de-duplication across runs, and a monitor that notices when output quietly shrinks. - The Threads API has 8 `GET` endpoints, each 1 credit per successful call: `search`, `tag`, `post`, `oembed`, `user-posts`, `user-replies`, `profile` and `search-users`. - `GET /v1/threads/search` takes a `query` of up to 120 characters and `GET /v1/threads/tag` takes a `name` of up to 100, the two that suit topic tracking. - All 8 Threads endpoints are restricted: they work after you accept the restricted-endpoint terms, which don't permit collecting personal data without a lawful basis or using it to contact people. - Tracking 30 topic tags once a day is 30 × 30 = 900 credits a month. The 100 free credits on signup cover 3 days; the Starter pack's 10,000 covers 11 months. ## What does building a Threads scraper involve? Building a Threads scraper means writing code that loads a search, a tag or an account's posts, waits for the content to render, reads each post, and stores it without repeating yesterday's rows. Social platforms change their pages often, so the code that does this needs regular attention. There are four parts, and each one breaks for its own reasons. ### Fetching A page that builds its content with scripts usually needs a headless browser, or replayed copies of the requests the page makes. A browser per job is slow and uses memory; replayed requests are faster but depend on formats you don't control and can't see change. Any large platform has to tell people from automated traffic, so at volume expect login prompts, slow responses and blocks. When you hit them, stop: getting around a site's protections with proxies, fake accounts or CAPTCHA solvers is not a fix we'd recommend. ### Parsing and de-duplication The parser turns each post into a row: text, time, link, media and any counts you keep. When the page structure shifts, a parser tends to return blank fields rather than fail, which is worse. De-duplication keeps a key per post so a daily run stores only what's new, and it needs care when a run crashes halfway. ### Monitoring and the rules Check rows per search or tag per run and the share of empty fields, because the usual scraper failure is silent. Before you build anything, read Threads' terms and the law where you operate, and get legal advice for commercial use. [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) covers when a scraper is worth writing in the first place. ## What do the Threads endpoints return? The [Threads API](https://perceptlayer.com/apis/threads) returns public Threads data as JSON, one call per lookup. It has 8 endpoints, all `GET`, all 1 credit per successful call. Two are for topics ( `search` and `tag`), two for single posts ( `post` and `oembed`), and four for accounts. Data is collected from publicly available sources and returned as found at the time of the call. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | [`/v1/threads/search`](https://perceptlayer.com/apis/threads/search) | Search results | `query` | none | | [`/v1/threads/tag`](https://perceptlayer.com/apis/threads/tag) | Results for a tag | `name` | none | | [`/v1/threads/post`](https://perceptlayer.com/apis/threads/post) | One post | `username`, `code` | none | | [`/v1/threads/oembed`](https://perceptlayer.com/apis/threads/oembed) | Embed data for a post | `url` | none | | [`/v1/threads/user-posts`](https://perceptlayer.com/apis/threads/user-posts) | An account's posts | `username` | `user_id` | | [`/v1/threads/user-replies`](https://perceptlayer.com/apis/threads/user-replies) | An account's replies | `username` | `user_id` | | [`/v1/threads/profile`](https://perceptlayer.com/apis/threads/profile) | An account's profile | `username` | none | | [`/v1/threads/search-users`](https://perceptlayer.com/apis/threads/search-users) | Account search results | `query` | none | A keyword search is one request with your key in the `X-API-Key` header: ```bash curl "https://api.perceptlayer.com/v1/threads/search?query=coffee" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for this API, so this post doesn't show one or name response fields. Run the call in the playground on the [Threads API page](https://perceptlayer.com/apis/threads) to see the exact JSON before you write code that reads it. ### Which parameters do the endpoints take? `query` takes up to 120 characters on both `search` and `search-users`. `name` on `tag` takes up to 100 characters. `username` and `code` take up to 30 characters each, and `url` on `oembed` up to 500. `user-posts` and `user-replies` take an optional integer `user_id` next to the required `username`. None of the endpoints takes a paging parameter, and the reference doesn't document how many results a call returns, so check that in the playground. Here is a tag lookup in Python, printing the credit headers every successful response carries: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/threads/tag", params={"name": "coffee"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) print(resp.status_code) print(resp.headers.get("X-Credits-Used"), resp.headers.get("X-Credits-Remaining")) ``` ## Which terms apply to the restricted endpoints? All 8 Threads endpoints are restricted. They work once you accept the restricted-endpoint terms in the dashboard; the terms are at [/legal/restricted-endpoints](https://perceptlayer.com/legal/restricted-endpoints). Those terms don't permit collecting personal data without a lawful basis, and they don't permit using data from these endpoints to contact people. That rules out lead lists, outreach, and following what individual people post or reply. What fits is aggregate work on topics, markets and brands. Count how often a product or category comes up under a tag each week. Archive what a brand's own account posts. Compare the volume of conversation around two launches. Keep `profile`, `user-posts`, `user-replies` and `search-users` to brand and organization accounts, not private individuals. If a response carries names or handles of people you don't need, drop them before you store anything. A call made before accepting the terms returns `restricted_endpoint` (403); the [errors docs](https://docs.perceptlayer.com/errors) cover it with the other codes. ## How do a scraper and the endpoints compare? A scraper gives you control and no per-call bill, and costs you a browser, upkeep and block risk. The endpoints give you JSON from eight documented paths at 1 credit a call, and the restricted-endpoint terms decide what you may do with the data. The table compares them for a recurring job, such as tracking a set of topic tags and brand accounts every day. | | DIY Threads scraper | Threads endpoints | | --- | --- | --- | | Setup | Headless browser or request replay, parser, de-duplication, monitoring | API key in the `X-API-Key` header | | What you get | Whatever you can parse from each page | JSON from 8 documented endpoints | | Keyword and tag tracking | Load and parse search and tag pages | `search` with `query`, `tag` with `name` | | Brand account posts | Load and parse each account page | `user-posts` with `username` | | Embedding a post | Build it yourself | `oembed` with the post `url` | | When pages change | Your parser breaks and you fix it | No parser of yours to fix | | Blocks and errors | Yours to handle at volume | A failed call returns an error code and costs 0 | | Speed | One browser or session per job | 1 request a second free, at least 5 a second paid | | Terms | The platform's terms and local law | Restricted-endpoint terms; no personal data without a lawful basis | | Cost | Hosting and engineering time | 1 credit per successful call | ### What does tracking a tag cost per day? On the endpoints, cost follows calls, not posts. One `tag` call per tag per day costs 1 credit, whatever the call returns. Tracking 30 topic tags once a day is 30 calls × 1 credit = 30 credits a day, or 30 × 30 = 900 credits a month. The 100 free credits you get after verifying an email address, with no credit card, cover 3 full days of that plan. Add one `user-posts` call a day for 10 brand accounts in the category and you add 10 × 30 = 300 calls, for 1,200 credits a month. The Starter pack's 10,000 covers 8 months of that, at 9,600 credits; purchased credits last 12 months, with no subscription. Failed calls cost nothing and return `X-Credits-Used: 0`. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how each call is billed. ## Which route should you choose? Choose by what you'll do with the data and how often, because that decides whether upkeep or per-call cost dominates. The verdicts below assume aggregate work on topics, markets and brand accounts, the uses the restricted-endpoint terms allow. If your plan involves profiling, tracking or contacting individuals, neither route is the answer. - **Topic and market tracking**: call `tag` and `search` once a day per term and count mentions in what you store. One credit per term per day. - **Archiving a brand's own account, or competitor brands' public accounts**: call `user-posts` with the brand's `username` on a schedule and keep only what's new. - **Seeing how a brand answers in public**: call `user-replies` for the brand's account, and drop the identities of the people it replied to before you store anything. - **Quoting or embedding one post on your site**: call `oembed` with the post's `url`, or `post` with `username` and `code`. - **An AI agent answering questions about public conversation**: connect the MCP server at `https://perceptlayer.com/mcp`, where `search_endpoints` and `get_endpoint` cost nothing and `call_endpoint` spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. - **A one-off look at a few posts**: open them in a browser and skip both routes. For the same trade-off on other social sources, [Twitter Scraper or X API](https://perceptlayer.com/blog/twitter-scraper-vs-api) and [Instagram Scraper or API](https://perceptlayer.com/blog/instagram-scraper-vs-api) cover those, and the [social media APIs](https://perceptlayer.com/verticals/social) list the rest. To check the fields first, run `tag` with a topic you follow in the playground on the [Threads API page](https://perceptlayer.com/apis/threads), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Threads **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/threads) ## Frequently asked questions ### Is scraping Threads legal? It depends on where you operate, what you collect and how you use it, and Threads' own terms set out what the platform allows. Public posts about brands, products and topics are lower risk than data about individuals, which is personal data in many places. Read the terms, get legal advice for commercial use, and don't get around blocks, logins or challenges. ### Can I collect data about individual Threads users? No. All 8 Threads endpoints are restricted, and the restricted-endpoint terms don't permit collecting personal data without a lawful basis or using data from these endpoints to contact people. Use them for topics, markets and brand accounts in aggregate, and drop names and handles you don't need before you store results. ### How many credits does a Threads call cost? Each of the 8 Threads endpoints costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`. Every account gets 100 free credits once, after verifying an email address, and prepaid packs start at 10,000 credits. ### How fast can I run a daily tag sweep? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 30-tag daily sweep finishes in under a minute. Paying accounts run at least 5 a second. A 429 `rate_limited` reply carries a `Retry-After` header. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the headers. ### Can I see a Threads response before writing code? Yes. The [Threads API page](https://perceptlayer.com/apis/threads) has a playground: pick an endpoint, fill in its parameters and run a real call with your key to see the JSON it returns. Do this before you write a parser, since this post doesn't include a recorded response and the fields are best read from a real call. threads scraping social media data topic tracking brand monitoring ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Telegram Scraper or API: What You Get](https://perceptlayer.com/blog/telegram-scraper-vs-api) A DIY Telegram scraper versus 4 Telegram channel endpoints at 1 credit a call: channel posts, in-channel search, upkeep, terms and cost per channel. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Nov 2026 Perceptlayer 8 min read ## [Facebook Scraper or API: What You Get](https://perceptlayer.com/blog/facebook-scraper-vs-api) A Facebook scraper vs 21 restricted Facebook endpoints at 1 credit a call: pages, events and Marketplace for brand and market work, and the cost per page. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Nov 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Instagram Scraper or API: Public Data Compared](https://perceptlayer.com/blog/instagram-scraper-vs-api) A DIY Instagram scraper versus 12 Instagram endpoints at 1 credit a call: hashtags, public posts, reels, upkeep, terms and a verdict per use case. --- title: "Facebook Scraper or API: What You Get | Perceptlayer" description: "A Facebook scraper vs 21 restricted Facebook endpoints at 1 credit a call: pages, events and Marketplace for brand and market work, and the cost per page." url: https://perceptlayer.com/blog/facebook-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Facebook Scraper or API: What You Get 11 Nov 2026 Perceptlayer 8 min read A Facebook scraper is a program that loads Facebook pages, events or Marketplace listings and reads the data out of what the site sends back. You own the fetching, the parsing and every fix when it breaks. The other route is 21 Facebook endpoints that return the same kinds of public data as JSON at 1 credit a successful call. All 21 are restricted, so their terms decide what you may collect. This post compares the two for brand, topic and market work, with the cost per page tracked and a verdict per use case. ## Key takeaways - A Facebook scraper is three pieces of code you maintain: a fetcher that gets pages without being blocked, a parser that finds the data in them, and a monitor that notices when either stops working. - The Facebook API has 21 `GET` endpoints, each 1 credit per successful call, covering pages, events, groups, posts, photos, reels, videos and Marketplace. Failed calls cost nothing. - All 21 endpoints are restricted: they work after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints), which don't permit collecting personal data without a lawful basis or using it to contact people. - Tracking 25 brand pages daily with `page` and `page-events` is 25 × 2 × 30 = 1,500 credits a month, inside the Starter pack's 10,000. The 100 free credits on signup cover the first 2 days. ## What does building a Facebook scraper involve? A Facebook scraper is a fetcher, a parser and a monitor, and each needs upkeep for as long as the job runs. The fetcher requests the pages you care about, such as a brand's page, its events or a Marketplace search. The parser finds names, dates, text and prices inside the HTML or the data embedded in it. The monitor compares each run with the last, because a scraper on a large site rarely fails loudly; it returns fewer rows or empty fields. Each piece breaks for its own reasons. Page markup changes over time, so a selector that worked last month can match nothing today. Content that loads as you scroll means a plain HTTP fetch may not be enough, and a headless browser brings its own memory, speed and crash handling. Any site that size has to tell people from automated traffic, so expect slow responses, challenge pages and blocked requests at volume. If that happens, stop: getting around a site's protections with rotating proxies or CAPTCHA solvers isn't something we'd recommend. Then there's what you're allowed to do. Read Facebook's terms before you build a collector, and get legal advice for commercial use. Social data also carries personal data almost everywhere, so a scraper needs a plan for what to drop before anything is stored. [Facebook Marketplace API: Listings as JSON](https://perceptlayer.com/blog/facebook-marketplace-api) shows the endpoint route for one part of the site. ## Which Facebook endpoints replace a scraper? The Facebook API on Perceptlayer has 21 endpoints, all `GET`, all 1 credit per successful call, with one API key in the `X-API-Key` header. For aggregate work the useful ones are public pages, events and Marketplace: a brand's page and its events, events on a topic in a place, and listings for a product in a city. Each takes one or two string parameters, and nothing else about the parameters is documented, so there are no defaults or page sizes to plan around. | Group | Endpoints | Required parameters | Optional parameters | | --- | --- | --- | --- | | Pages | `page`, `page-about`, `page-events`, `photos`, `videos`, `reels` | `handle` (up to 100 characters) | none | | Single items | `post`, `reel`, `event-post` | `permalink` (up to 500 characters) | none | | Single items | `photo` | `photo` (up to 500 characters) | none | | Events | [`events`](https://perceptlayer.com/apis/facebook/events) | `query` (up to 200 characters) | `location` (up to 120 characters) | | Events | [`event`](https://perceptlayer.com/apis/facebook/event) | `event_id` | none | | Groups | [`group`](https://perceptlayer.com/apis/facebook/group), [`group-posts`](https://perceptlayer.com/apis/facebook/group-posts) | `group_id` | none | | Marketplace | [`marketplace-search`](https://perceptlayer.com/apis/facebook/marketplace-search) | none | `query`, `location` | | Marketplace | [`marketplace-browse`](https://perceptlayer.com/apis/facebook/marketplace-browse) | none | `location` | | Marketplace | [`marketplace-item`](https://perceptlayer.com/apis/facebook/marketplace-item) | `listing_id` | none | | People | `profile`, `profile-about`, `profile-feed`, `search-profiles` | `handle`, or `query` with optional `limit` | see left | The people endpoints are in the catalogue, but this post doesn't use them. Profiling, tracking or contacting individuals is outside what the restricted-endpoint terms permit without a lawful basis, and none of the use cases below need them. A Marketplace search looks like this: ```bash curl "https://api.perceptlayer.com/v1/facebook/marketplace-search?query=bike&location=San+Francisco" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a response from the Facebook endpoints, so this post doesn't show one or list response fields. Run the call in the playground on the [Facebook API page](https://perceptlayer.com/apis/facebook) to see what comes back before you design storage around it. Data is collected from publicly available sources and returned as found at the time of the call. ## What do the restricted-endpoint terms allow? All 21 Facebook endpoints are restricted, and the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) apply to every one. They work once you accept the terms in the dashboard; before that, a call returns `restricted_endpoint` (403) and costs nothing. The terms don't permit collecting personal data without a lawful basis, and they don't permit using data from these endpoints to contact people. That rules out lead lists, outreach and building records of individuals. What fits is work on organisations, topics and markets in aggregate. Track what a brand's public page publishes and which events it lists. Count events on a topic in a city over a season. Measure asking prices for a product category across cities. When a response includes people's names or details you don't need, drop them before you store anything, and keep only what the analysis uses. The same rule holds for a scraper: the terms of use and data protection law follow the data, not the tool that collected it. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries blocking and terms risk; the endpoints cost credits per call and come with restricted-endpoint terms. Neither is free and neither removes your duty to handle personal data lawfully. The table compares them for a recurring job, such as tracking a set of brand pages and their events every day. | | DIY Facebook scraper | Facebook endpoints | | --- | --- | --- | | Setup | Fetcher, often a headless browser, parsers, storage, monitoring | API key in the `X-API-Key` header, terms accepted once | | Input | URLs you build or discover | `handle`, `permalink`, `event_id`, `group_id`, `listing_id`, or `query` and `location` | | When the page changes | Your parser breaks and you fix it | Same path and parameters; no parser of yours to fix | | Blocks and challenges | Yours to handle; expect them at volume | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting, browser time and your time | 1 credit per successful call | | Terms | Facebook's terms and data protection law | Restricted-endpoint terms, plus data protection law | | Personal data | Whatever the page shows; you filter it | Whatever the response holds; you filter it | ### What does tracking a page cost per day? Every Facebook endpoint costs 1 credit per successful call, so a job's cost is targets × calls per target × runs. Tracking one brand page with `page` and `page-events` once a day is 2 credits a day, or 60 credits over 30 days. The table sizes three jobs against the 100 free credits and the packs. | Job | Calls a month | Credits | | --- | --- | --- | | 25 brand pages, `page` and `page-events` daily | 25 × 2 × 30 | 1,500; the 100 free credits cover the first 2 days | | Events on 10 topics in 5 cities, weekly | 10 × 5 × 4 | 200 | | Marketplace search for 15 products in 5 cities, weekly | 15 × 5 × 4 | 300 | | All three together | 2,000 | 2,000 a month, so the Starter pack's 10,000 lasts five months | Each successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a job can log its spend per run. Free accounts run at 1 request a second, so the 50 daily page calls take under a minute. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## Which route should you choose? Choose by what the data is for and how often you need it, because that decides both the terms you work under and whether upkeep or per-call cost dominates. The verdicts below assume brand, topic or market work in aggregate. If the plan involves contacting people or building lists of individuals, neither route is the answer. - **Monitoring your brand's page and competitor brands' public pages**: use `page`, `page-about` and `page-events` with each brand's `handle` on a daily schedule. Add `photos`, `videos` or `reels` if you track what kinds of content a brand publishes. Store page-level data, not commenter details. - **Event market research** (how many events on a topic a city has, and when): use `events` with a `query` and a `location`, then `event` with an `event_id` for the ones you analyse. Count and categorise; don't record attendees. - **Second-hand price research**: use `marketplace-search` with a product `query` and a `location`, and keep prices and categories in aggregate. [Facebook Marketplace API: Listings as JSON](https://perceptlayer.com/blog/facebook-marketplace-api) walks through a weekly collector. - **Topic research in public groups**: `group` and `group-posts` take a `group_id`. Analyse topics and volumes across posts, and drop authors before storage. - **Lead generation, outreach or tracking particular people**: neither route. The restricted-endpoint terms don't permit it, and a scraper doesn't change the law that applies. - **A one-off look at a handful of pages**: open them in a browser. Neither a scraper nor an API is worth setting up for that. - **An agent that answers questions about brands or local events**: give it the endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `events` or `page` instead of browsing. For the same comparison on other social sites, see [Instagram Scraper or API](https://perceptlayer.com/blog/instagram-scraper-vs-api) and [TikTok Scraper or API](https://perceptlayer.com/blog/tiktok-scraper-vs-api); the [social media APIs](https://perceptlayer.com/verticals/social) page lists the rest. To check the data for your own brands, run `page` with a brand's handle in the playground on the [Facebook API page](https://perceptlayer.com/apis/facebook), then [get a free API key](https://perceptlayer.com/signup) when it fits. ## APIs in this post - [Facebook **1 credit per call** · 21 endpoints](https://perceptlayer.com/apis/facebook) ## Frequently asked questions ### Is scraping Facebook allowed? That depends on Facebook's terms, data protection law where you and the people in the data are, and what you do with it, so read the terms and get legal advice for commercial use. Don't get around blocks or other protections. Public data about brands, events and prices in aggregate is a different risk from personal data; leave individuals' details out of what you keep. ### Are all the Facebook endpoints restricted? Yes. All 21 Facebook endpoints are restricted and work after you accept the restricted-endpoint terms in the dashboard. Until then a call returns `restricted_endpoint` (403) and costs nothing. The terms don't permit collecting personal data without a lawful basis or using data from these endpoints to contact people. ### How much does a Facebook call cost? Every Facebook endpoint costs 1 credit per successful call, and a failed call costs nothing and returns `X-Credits-Used: 0`. Tracking 25 brand pages daily with two calls each is 1,500 credits a month. The 100 free credits you get once on signup cover the first 2 days of that; the Starter pack has 10,000 credits. ### Can I use Facebook data to find leads or contact people? No. The restricted-endpoint terms don't permit collecting personal data without a lawful basis or using data from these endpoints to contact people. That rules out lead lists, outreach and tracking individuals. Use the endpoints for brands, events, topics and prices in aggregate, and drop names you don't need before storing results. ### What happens if a Facebook call fails or hits the rate limit? A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, and costs nothing. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. Free accounts run at 1 request a second. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover faster rates. facebook social media data scraping brand monitoring events ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Threads Scraper or API: What You Get](https://perceptlayer.com/blog/threads-scraper-vs-api) A DIY Threads scraper versus 8 Threads endpoints at 1 credit a call: keyword search, topic tags, brand posts, upkeep, terms and the cost per tag tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Nov 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Instagram Scraper or API: Public Data Compared](https://perceptlayer.com/blog/instagram-scraper-vs-api) A DIY Instagram scraper versus 12 Instagram endpoints at 1 credit a call: hashtags, public posts, reels, upkeep, terms and a verdict per use case. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "Spotify Scraper or API: What You Get | Perceptlayer" description: "A Spotify scraper vs 18 Spotify endpoints: playlist-tracks at 1–10 credits, charts at 1–10, top tracks at 1, and how to budget a playlist and chart tracker." url: https://perceptlayer.com/blog/spotify-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Spotify Scraper or API: What You Get 11 Nov 2026 Perceptlayer 7 min read A Spotify scraper is a program that loads Spotify's web pages for artists, albums, playlists and charts and reads names, track lists and figures out of what comes back. You maintain the fetching, the parsing and the fixes when it breaks. The other route is 18 Spotify endpoints that return the same public catalogue data as JSON, with no login. Eleven cost 1 credit a call, and seven are priced by the call, from 1–2 up to 1–100 credits. This post compares the two for playlist, chart and artist tracking, budgets a job against those ranges, and gives a verdict per use case. ## Key takeaways - A Spotify scraper is three pieces of code you maintain: a fetcher, a parser for each page type (artist, album, playlist, chart), and a monitor that catches runs returning fewer tracks than they should. - The Spotify API has 18 `GET` endpoints. Eleven cost 1 credit per call; `album` and `artist` cost 1–2, `playlist-tracks` and `charts` 1–10, `album-tracks` and `show-episodes` 1–20, and `get-many` 1–100. - Budget a priced endpoint at the top of its range, then read `X-Credits-Used` on each response to see what calls really cost. - 200 playlists tracked weekly with `playlist-tracks` is 800 calls a month: between 800 and 8,000 credits, inside the Starter pack's 10,000 even at the top of the range. ## What does building a Spotify scraper involve? A Spotify scraper is a fetcher, a set of parsers and a monitor, and the parsers multiply: an artist page, an album, a playlist and a chart each have their own layout. The fetcher requests those pages for the IDs you track. Each parser finds the track names, positions, durations or follower figures in the HTML or in data embedded in it. The monitor compares runs, because a long playlist that comes back half-parsed looks like a real change unless you check counts. Music pages are often rendered in the browser, so a plain HTTP fetch may return a shell with little data in it, and you end up running a headless browser with its own memory use and crashes. Long lists load in parts, so the scraper has to follow each part to the end. Any large site also has to tell people from automated traffic, so expect slow responses and blocked requests at volume. If that happens, stop; getting around a site's protections isn't something we'd recommend. The upkeep never ends. A layout change on any one page type breaks that parser, and you find out from the monitor or from a gap in your data. Read Spotify's terms before you build a collector, and get legal advice for commercial use. ## Which Spotify endpoints replace a scraper? The Spotify API on Perceptlayer has 18 endpoints, all `GET`, authenticated with one API key in the `X-API-Key` header and no Spotify login. Eleven cost 1 credit per successful call. Seven are priced by the call, which the credits table shows as a range: the cost depends on the call, such as pages fetched or items returned. Every successful response reports what it cost in `X-Credits-Used`, and a failed call costs nothing. | Endpoint | Credits | Required | Optional | | --- | --- | --- | --- | | `playlist` | 1 | `id` | none | | `playlist-tracks` | 1–10 | `id` | `limit`, `all` | | [`charts`](https://perceptlayer.com/apis/spotify/charts) | 1–10 | `key` | `limit`, `all` | | [`artist`](https://perceptlayer.com/apis/spotify/artist) | 1–2 | `id` | none | | [`artist-top-tracks`](https://perceptlayer.com/apis/spotify/artist-top-tracks) | 1 | `id` | none | | [`artist-discography`](https://perceptlayer.com/apis/spotify/artist-discography) | 1 | `id` | `limit`, `offset` | | [`artist-related`](https://perceptlayer.com/apis/spotify/artist-related) | 1 | `id` | none | | [`album`](https://perceptlayer.com/apis/spotify/album) | 1–2 | `id` | none | | [`album-tracks`](https://perceptlayer.com/apis/spotify/album-tracks) | 1–20 | `id` | `limit`, `all` | | `track` | 1 | `id` | none | | `get-many` | 1–100 | none | `ids[]`, `type` | | `search` | 1 | `q` | `limit`, `offset` | | `search-suggestions` | 1 | `q` | none | | `show` | 1 | `id` | none | | `show-episodes` | 1–20 | `id` | `limit`, `all` | | `episode` | 1 | `id` | none | | `track-colors` | 1 | `image_uri` | none | | [`discovery-audio-mix-seed`](https://perceptlayer.com/apis/spotify/discovery-audio-mix-seed) | 1 | `track_id` | none | IDs go up to 200 characters and `q` up to 300. The accepted `key` values for `charts` and `type` values for `get-many` aren't listed in the reference, and no defaults or page sizes are documented, so check them in the playground. A search request looks like this: ```bash curl "https://api.perceptlayer.com/v1/spotify/search?q=daft+punk&limit=5" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a response from the Spotify endpoints, so this post doesn't show one or list response fields. Run the calls you plan to use in the playground on the [Spotify API page](https://perceptlayer.com/apis/spotify) and read the responses there before you design storage. Data is collected from publicly available sources and returned as found at the time of the call. ## How do a scraper and the endpoints compare? A scraper costs engineering time per page type and carries blocking and terms risk; the endpoints cost credits, some at a fixed 1 and some by the call. The table compares them for a recurring job, such as tracking a set of playlists and charts each week. | | DIY Spotify scraper | Spotify endpoints | | --- | --- | --- | | Setup | Fetcher, often a headless browser, one parser per page type, monitoring | API key in the `X-API-Key` header | | Input | Page URLs you build from IDs | `id`, `q`, `key`, `track_id` or `image_uri` | | Long lists | Follow every part of the page yourself | `limit` and `all` on list endpoints; `limit` and `offset` on `search` and `artist-discography` | | When a page changes | That page type's parser breaks | Same path and parameters; no parser of yours to fix | | Blocks and challenges | Yours to handle | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting, browser time and your time | 1 credit for eleven endpoints; a range for seven, reported per call in `X-Credits-Used` | ### How do you budget the priced endpoints? Budget each priced endpoint at the top of its range, then measure. A tracking job's cost is targets × calls per target × runs × credits per call, and for a ranged endpoint the last factor is somewhere in the range. Planning at the upper bound means a run can't surprise you; logging `X-Credits-Used` per call shows the real figure after the first run. | Job | Calls a month | Credits a month | | --- | --- | --- | | 200 playlists, `playlist-tracks` weekly | 200 × 4 = 800 | 800 to 8,000 | | 5 charts, `charts` daily | 5 × 30 = 150 | 150 to 1,500 | | 500 artists, `artist-top-tracks` weekly | 500 × 4 = 2,000 | 2,000 | | All three | 2,950 | 2,950 to 11,500 | At the lower bound the job fits the Starter pack's 10,000 credits three times over; at the upper bound it needs the Build pack's 50,000, which covers four months of it. The 100 free credits you get once on signup cover at least 10 `playlist-tracks` or `charts` calls at the top of their range, enough to measure what yours cost. `X-Credits-Remaining` on every response lets a job stop before the balance runs out, and at zero calls return `insufficient_credits` (402) with nothing more debited. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ### Which calls cost 1 credit no matter what? Eleven endpoints have a flat 1 credit: `playlist`, `artist-top-tracks`, `artist-discography`, `artist-related`, `track`, `search`, `search-suggestions`, `show`, `episode`, `track-colors` and `discovery-audio-mix-seed`. That includes `search` and `artist-discography`, which page with `limit` and `offset`, so each page is 1 credit. A job built only on these costs exactly its call count. If a ranged call's real cost turns out high for your lists, check whether a flat endpoint answers the same question, such as `artist-top-tracks` for an artist's leading tracks. ## Which route should you choose? Choose by how often you need the data and which endpoints the job leans on, because that decides whether upkeep or credits dominate and how predictable the bill is. The verdicts below assume a recurring, read-only job over public catalogue data. For a look at three playlists once, open them in a browser and skip both. - **Playlist monitoring** (track adds, removals and positions over time): use `playlist-tracks` weekly and diff the results. Budget 1–10 credits per playlist per run and measure after the first run. - **Chart tracking**: use `charts` with the `key` for each chart, daily. Confirm the `key` values in the playground first, then budget 1–10 credits per chart per run. - **Artist and catalogue research** (top tracks, releases, related artists): `artist-top-tracks`, `artist-discography` and `artist-related` cost a flat 1 credit, so the bill equals the call count. - **Podcast catalogues**: `show` costs 1, `show-episodes` 1–20. Pull episodes only for the shows you analyse. - **Anything involving a user's library, playback or playlists they own**: neither route. These endpoints don't act on a user's behalf, and a scraper of public pages can't either. - **An agent answering music questions**: give it the endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. `get_endpoint` costs nothing and lets it check an endpoint before `call_endpoint` spends credits. For the same comparison on video, see [YouTube Scraper or API](https://perceptlayer.com/blog/youtube-scraper-vs-api); other media sources are under [Apps and media](https://perceptlayer.com/verticals/apps). To measure your own costs, run `playlist-tracks` on one playlist in the playground on the [Spotify API page](https://perceptlayer.com/apis/spotify) and read `X-Credits-Used`, then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Spotify **1 credit per call** · 18 endpoints](https://perceptlayer.com/apis/spotify) ## Frequently asked questions ### Is scraping Spotify allowed? That depends on Spotify's terms, the law where you operate and what you do with the data, so read the terms and get legal advice for commercial use. Don't get around blocks or other protections. Public catalogue data such as track lists and chart positions is a different risk from personal data; leave listeners' details out of anything you keep. ### How many credits does a Spotify call cost? Eleven of the 18 Spotify endpoints cost 1 credit per successful call. `album` and `artist` cost 1–2, `playlist-tracks` and `charts` 1–10, `album-tracks` and `show-episodes` 1–20, and `get-many` 1–100, depending on the call. Every successful response reports the actual cost in `X-Credits-Used`, and failed calls cost nothing. ### How do I keep the cost of priced endpoints predictable? Plan each priced call at the top of its range, so 200 weekly `playlist-tracks` calls are budgeted at 8,000 credits a month. Log `X-Credits-Used` per call after the first run to see the real cost, and stop the job when `X-Credits-Remaining` drops below one run's budget. At zero the API returns 402 and debits nothing. ### Do the Spotify endpoints need a Spotify account or login? No. You authenticate with one API key in the `X-API-Key` header, and the endpoints read public catalogue data: artists, albums, tracks, playlists, charts and podcasts. They don't act on a user's behalf, so there's no library, playback or playlist editing. Keys start with `sk_live_` and work across the whole catalogue. ### What happens when I hit the rate limit? A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait, and costs nothing. Free accounts run at 1 request a second (60 a minute), and paying accounts at least 5 a second. Limits are per account, shared by all its keys. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate, and the [errors docs](https://docs.perceptlayer.com/errors) every code. spotify music data playlists charts scraping ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Oct 2026 Updated 12 Nov 2026 Perceptlayer 8 min read ## [Spotify API: Official Web API vs Public Music Data](https://perceptlayer.com/blog/spotify-api-public-music-data) The Spotify Web API needs an OAuth app and limits new apps; 18 public-data endpoints cover artists, top tracks, playlists and charts, most at 1 credit a call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "Steam Scraper or API: What You Get | Perceptlayer" description: "A Steam scraper vs 4 Steam endpoints at 1 credit a call: reviews filtered by language, type and day range, regional store data by cc, and the cost per game." url: https://perceptlayer.com/blog/steam-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Steam Scraper or API: What You Get 11 Nov 2026 Perceptlayer 7 min read A Steam scraper is a program that loads Steam store pages and review listings and reads prices, descriptions and review text out of what comes back. You maintain the fetching, the parsing for each region and language, and the fixes when pages change. The other route is 4 Steam endpoints, `app`, `reviews`, `search` and `profile`, that return store and review data as JSON at 1 credit a successful call. This post compares the two for review monitoring and regional price checks, works out the cost per game tracked, and gives a verdict per use case. ## Key takeaways - A Steam scraper is three pieces of code you maintain: a fetcher that requests every region and language you track, a parser for store and review pages, and a monitor that notices when a run returns less than it should. - `GET /v1/steam/reviews` takes an `appid` and filters that a scraper would otherwise rebuild: `language` (31 values), `review_type` (positive or negative), `purchase_type`, `filter` (all, recent or updated), `day_range`, `num_per_page` and a `cursor`. - `GET /v1/steam/app` takes `appids` with an optional two-letter `cc` and a `l` language, so a regional price check is one call per game per country. - Monitoring 20 games daily, with one reviews call and store data in 3 countries each, is 20 × 4 × 30 = 2,400 credits a month, inside the Starter pack's 10,000. ## What does building a Steam scraper involve? A Steam scraper is a fetcher, a parser and a monitor, multiplied by every region and language you care about. The fetcher requests a game's store page once per country you price in, and its review listing once per language and filter you track. The parser finds the price, discount, description and review text in the HTML or in data embedded in it. The monitor compares runs, because a parser that silently misses half the reviews on a page looks like a quiet week. Reviews are the hard part. A popular game has more reviews than one page shows, so the scraper has to follow each page to the end and remember where it stopped, or it re-reads the same reviews every run. Filtering by language, positive or negative, or a recent window means either more page variants to fetch or filtering after the fact. Store pages vary by region, so the same game is several fetches, not one. Then the usual upkeep applies. Pages change as the store ships features, and any large site has to tell people from automated traffic, so expect slow responses or blocked requests at volume. If that happens, stop; getting around a site's protections isn't something we'd recommend. Read Steam's terms before you build a collector, and get legal advice for commercial use. ## Which Steam endpoints replace a scraper? The Steam API on Perceptlayer has 4 endpoints, all `GET`, all 1 credit per successful call, with one API key in the `X-API-Key` header and no Steam account. `search` turns a game's name into results, `app` returns store data for an appid, and `reviews` returns reviews for an appid with the filters a scraper would otherwise build. `profile` returns a Steam profile; this post doesn't use it, because review and price work doesn't need data about individual players. | Endpoint | Required | Optional | | --- | --- | --- | | [`GET /v1/steam/search`](https://perceptlayer.com/apis/steam/search) | `term` (up to 255 characters) | `l`, `cc` | | [`GET /v1/steam/app`](https://perceptlayer.com/apis/steam/app) | `appids` (integer) | `cc` (2 characters), `l` (up to 32) | | [`GET /v1/steam/reviews`](https://perceptlayer.com/apis/steam/reviews) | `appid` (integer) | `language`, `num_per_page`, `purchase_type`, `filter`, `review_type`, `day_range`, `cursor`, `include_histogram` | | [`GET /v1/steam/profile`](https://perceptlayer.com/apis/steam/profile) | `identifier` (up to 64 characters) | `include_html` | The `reviews` filters take fixed values. `review_type` is all, positive or negative; `purchase_type` is all, steam or non\_steam; `filter` is all, recent or updated; and `language` is all or one of 30 languages such as english, schinese, brazilian or latam. `day_range` and `num_per_page` are integers, and `cursor` is a string of up to 512 characters. No defaults or page sizes are documented, so set the ones you rely on. A search for a game looks like this: ```bash curl "https://api.perceptlayer.com/v1/steam/search?term=portal&l=english&cc=US" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a response from the Steam endpoints, so this post doesn't show one or list response fields. Run `search`, then `app` and `reviews` for a game you know, in the playground on the [Steam API page](https://perceptlayer.com/apis/steam), and check there where the appid and the next `cursor` value come from before you build on them. Data is collected from publicly available sources and returned as found at the time of the call. ## How do a scraper and the endpoints compare? A scraper costs engineering time for every region, language and page type, and carries blocking and terms risk. The endpoints cost 1 credit a call and take region, language and review filters as parameters. The table compares them for a recurring job, such as a studio watching reviews and prices for its own games and a few competitors. | | DIY Steam scraper | Steam endpoints | | --- | --- | --- | | Setup | Fetcher, store and review parsers, state for paging, monitoring | API key in the `X-API-Key` header | | Regions | One page fetch per country, parsed each time | `cc` on `app` and `search` | | Review filters | Extra page variants or filtering after the fetch | `language`, `review_type`, `purchase_type`, `filter`, `day_range` | | Paging reviews | Track your place across pages yourself | `cursor` and `num_per_page` parameters | | When a page changes | Your parser breaks and you fix it | Same path and parameters; no parser of yours to fix | | Blocks and challenges | Yours to handle | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### What does a game cost to track? Every Steam endpoint costs 1 credit per successful call, so a job's cost is games × calls per game × runs. Store data is one `app` call per game per country, and reviews are one call per page. The table sizes four jobs against the 100 free credits and the packs. | Job | Calls | Credits | | --- | --- | --- | | Launch week: one game's reviews every hour for 14 days | 24 × 14 = 336 | 336; the 100 free credits cover the first 4 days | | 20 games daily: one `reviews` call and `app` in 3 countries each | 20 × 4 × 30 = 2,400 a month | 2,400, inside the Starter pack's 10,000 | | 500 games, `app` in 10 countries, weekly | 500 × 10 × 4 = 20,000 a month | 20,000, inside the Build pack's 50,000 | | Full review history of one game | One call per page | Pages × 1 credit; depends on the number of reviews | Each successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a job can log its spend as it runs. Free accounts run at 1 request a second, so the 80 daily calls of the 20-game job take under two minutes. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## Which route should you choose? Choose by what you watch and how often, because that decides whether upkeep or credits dominate. The verdicts below assume a recurring job over public store and review data. To check one game's price once, open the store page and skip both. - **Launch and patch monitoring for your own game**: call `reviews` with `review_type=negative` and a short `day_range` every hour or day, per `language` you support. 1 credit a call makes an hourly launch-week watch 336 credits. - **Competitor review tracking**: one `reviews` call per game per day with `filter=recent`, stored with the run date. Analyse tone and volume across reviews; leave reviewers' names out of what you keep. - **Regional price checks**: `app` with each `cc` you sell in. It's one call per game per country, so 10 countries for 500 games weekly is 20,000 credits a month. - **Building a game catalogue from names**: `search` with a `term`, then `app` for the appids you keep. - **Anything about individual players**: neither a scraper nor `profile` for profiling or tracking people. Keep the work on games, prices and reviews in aggregate. - **An agent answering questions about games**: give it the endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `search`, `app` and `reviews` instead of browsing. For review data from other sources, see [Google Reviews Scraper or API](https://perceptlayer.com/blog/google-reviews-scraper-vs-api); other app and game stores are under [Apps and media](https://perceptlayer.com/verticals/apps). To see the data for your own game, run `reviews` with its appid in the playground on the [Steam API page](https://perceptlayer.com/apis/steam), then [get a free API key](https://perceptlayer.com/signup) when it fits. ## APIs in this post - [Steam **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/steam) ## Frequently asked questions ### Is scraping Steam allowed? That depends on Steam's terms, the law where you operate and what you do with the data, so read the terms and get legal advice for commercial use. Don't get around blocks or other protections. Store prices and review text in aggregate are a different risk from personal data; leave reviewers' and players' personal details out of anything you keep. ### How much does a Steam call cost? Every Steam endpoint, `app`, `reviews`, `search` and `profile`, costs 1 credit per successful call, and a failed call costs nothing and returns `X-Credits-Used: 0`. Monitoring 20 games daily with four calls each is 2,400 credits a month. The 100 free credits you get once on signup are enough to test every endpoint on your own games. ### Can I filter Steam reviews by language or rating? Yes. `GET /v1/steam/reviews` takes `language` (all or one of 30 languages), `review_type` (all, positive or negative), `purchase_type` (all, steam or non\_steam), `filter` (all, recent or updated) and an integer `day_range`. Each call costs 1 credit whatever the filters, so a negative-only check per language is one call per language. ### How do I get prices for different countries? Call `GET /v1/steam/app` with the game's `appids` and a two-letter `cc` for each country, plus `l` for the language. That's one call and 1 credit per game per country, so checking 50 games in 4 countries is 200 credits. `search` takes `cc` and `l` too. ### What happens if a Steam call fails or hits the rate limit? A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, and costs nothing. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. Free accounts run at 1 request a second. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover faster rates. steam video games game reviews scraping regional pricing ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Oct 2026 Perceptlayer 7 min read ## [Steam API: Game Details, Prices and Reviews as JSON](https://perceptlayer.com/blog/steam-api-store-data) Steam API guide: how to get a Steam Web API key, what it covers, and app, reviews and search endpoints for store prices and reviews by appid at 1 credit a call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. --- title: "GitHub Scraper or API: What You Get | Perceptlayer" description: "A DIY GitHub scraper versus 32 GitHub endpoints at 1 credit a call: repositories, commits, issues, releases and trending, with costs per repo tracked." url: https://perceptlayer.com/blog/github-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # GitHub Scraper or API: What You Get 10 Nov 2026 Perceptlayer 8 min read A GitHub scraper is code that loads repository, commit, issue and trending pages and reads stars, files, commit lists and release names out of the HTML. You maintain the fetching, the parsing and the paging. The alternative is 32 GitHub endpoints that return the same kinds of data as JSON for 1 credit a successful call, from one repository's metadata to a compare between two refs. This post compares the two routes on endpoints, parameters, cost per repository tracked and upkeep, and gives a verdict per use case. ## Key takeaways - The GitHub API on Perceptlayer has 32 `GET` endpoints, every one 1 credit per successful call. Failed calls cost nothing and return `X-Credits-Used: 0`. - 19 of them take `owner` and `repo` (up to 39 and 100 characters), covering the repository, commits, issues, releases, tags, branches, contributors, languages, files, tree, readme and compares. - Discovery needs no repository name: `/v1/github/search-repositories` takes `q` and sorts by `stars`, `forks`, `help-wanted-issues` or `updated`, and `/v1/github/trending-repositories` takes `since` of `daily`, `weekly` or `monthly`. - Snapshotting 100 repositories daily with 3 calls each is 300 credits a day, 9,000 over 30 days: inside the Starter pack's 10,000. The 100 free credits on signup cover one snapshot of 100 repositories with 1 call each. - A scraper's ongoing cost is upkeep: page parsers, paging, request pacing and monitoring for runs that quietly return nothing. ## What does building a GitHub scraper involve? Building a GitHub scraper means writing a fetcher, a set of parsers and a pager, then keeping them in step with pages you don't control. Each kind of page needs its own parser: a repository's front page, its commit list, its issues, its releases, a file view, a user's page and the trending list all lay out their data differently. A tracker that watches a few hundred repositories touches most of them every run. The parsers are where the upkeep goes. Code hosting sites ship interface changes regularly, and a selector that found the star count last month can find nothing today. Parts of a modern page are often loaded by scripts after the first response, so the data you want may need a headless browser or a replay of the page's own requests. Either way, a broken parser usually returns empty values rather than an error. Volume is the second problem. One script reading ten pages behaves nothing like a scheduled job reading thousands, and large sites have to tell people apart from automated traffic. Expect slow responses, errors and challenge pages as you scale, and when they appear, stop rather than work around them with rotating proxies. Read GitHub's terms of use before you build a collector, and if the site offers its own developer access that fits your job, compare it on your own terms and limits too. ### What else does a recurring scraper need? A scheduled scraper needs paging, storage and monitoring on top of parsing. Paging means walking commit, issue and release lists without missing items when new ones arrive mid-run. Storage means deciding what you keep per run and for how long. Monitoring compares each run with the last and alerts when a repository that had hundreds of commits suddenly reports none. [YouTube Scraper or API](https://perceptlayer.com/blog/youtube-scraper-vs-api) covers the same trade-off for a video source. ## What do the GitHub endpoints cover? The [GitHub API](https://perceptlayer.com/apis/github) has 32 endpoints, all `GET`, all 1 credit per successful call. They fall into four groups: one repository's data, comparisons between two refs, discovery through search and trending, and users. Each returns JSON collected from publicly available sources, as found at the time of the call. There's no recorded response for this API yet, so this post lists endpoints and parameters but not response fields; run a call in the playground on the API page to see the shape. ### Which endpoints read one repository? Nineteen endpoints take `owner` and `repo`. These are the ones a repository tracker uses: | Endpoint | Returns | Other required | Optional | | --- | --- | --- | --- | | [`/v1/github/repository`](https://perceptlayer.com/apis/github/repository) | Repository | none | none | | [`/v1/github/repository-activity`](https://perceptlayer.com/apis/github/repository-activity) | Repository Activity | none | none | | [`/v1/github/repository-commits`](https://perceptlayer.com/apis/github/repository-commits) | Repository Commits | none | `page`, `per_page`, `sha`, `path`, `author`, `since`, `until` | | `/v1/github/repository-issues` | Repository Issues | none | `page`, `per_page`, `state` ( `open`, `closed`, `all`), `sort` ( `created`, `updated`, `comments`), `direction`, `labels`, `since` | | `/v1/github/repository-issues-comments` | Repository Issues Comments | `number` | `page`, `per_page` | | `/v1/github/repository-pulls` | Repository Pulls | `number` | none | | `/v1/github/repository-releases` | Repository Releases | none | `page`, `per_page` | | `/v1/github/repository-tags` | Repository Tags | none | `page`, `per_page` | | [`/v1/github/repository-branches`](https://perceptlayer.com/apis/github/repository-branches) | Repository Branches | none | `page`, `per_page` | | [`/v1/github/repository-contributors`](https://perceptlayer.com/apis/github/repository-contributors) | Repository Contributors | none | `page`, `per_page`, `anon` | | `/v1/github/repository-languages` | Repository Languages | none | none | | `/v1/github/repository-readme` | Repository Readme | none | `ref` | | `/v1/github/repository-tree` | Repository Tree | none | `ref`, `recursive` | | `/v1/github/repository-files` | Repository Files | none | `path`, `ref` | | `/v1/github/repository-files-at-ref` | Repository Files At Ref | `ref` | none | | `/v1/github/repository-raw-file` | Repository Raw File | `path`, `ref` | none | The other three take `base` and `head` as well: [`/v1/github/repository-compare-commits`](https://perceptlayer.com/apis/github/repository-compare-commits), [`/v1/github/repository-compare-files`](https://perceptlayer.com/apis/github/repository-compare-files) and [`/v1/github/repository-compare-patch`](https://perceptlayer.com/apis/github/repository-compare-patch). A scraper would need a separate parser for each of these views; here each is one call. ### Which endpoints find repositories? Two discovery endpoints need no repository name. `/v1/github/search-repositories` takes a required `q` (up to 256 characters) plus `sort` ( `stars`, `forks`, `help-wanted-issues`, `updated`), `order` ( `asc`, `desc`), `page` and `per_page`. `/v1/github/trending-repositories` takes optional `language`, `since` ( `daily`, `weekly`, `monthly`) and `spoken_language_code`. No defaults or page sizes are documented, so set `per_page` yourself where you depend on it. ```bash curl "https://api.perceptlayer.com/v1/github/search-repositories?q=web+scraping&sort=stars&order=desc" \ -H "X-API-Key: $API_KEY" ``` The key goes in the `X-API-Key` header, as the [authentication docs](https://docs.perceptlayer.com/authentication) describe. Whether a search result's fields match the `owner` and `repo` the other endpoints take isn't recorded here, so check that in the playground before you chain them. ### What about user endpoints? Ten endpoints take a `username`: `user`, `user-activity`, `user-contributions`, `user-counts`, `user-events`, `user-followers`, `user-following`, `user-repositories`, `user-starred` and `user-tabs`, plus `trending-developers`. They return data about people, so use them with care. Keep work at the level of projects and organisations, don't build profiles of individuals, and don't use the data to contact anyone. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries blocking and terms risk; the endpoints cost 1 credit per call and leave you no parser to maintain. The table compares them for a recurring job, such as watching a list of repositories for new releases, commits and issues each day. | | DIY GitHub scraper | GitHub endpoints | | --- | --- | --- | | Setup | Fetcher, one parser per page type, pager, storage, monitoring | API key in the `X-API-Key` header | | Inputs | Page URLs you build | `owner`, `repo`, `q`, `username`, `ref`, `base`, `head` and the optional filters above | | Output | Whatever you can parse from each page | JSON per endpoint; check the shape in the playground | | When pages change | Your parsers return empty values until you fix them | You read JSON; there's no parser of yours to fix | | Blocks and challenges | Yours to handle, more likely at volume | Not yours to handle; a failed call returns an error code and costs 0 | | Paging | You find and follow the page links | `page` and `per_page` on list endpoints | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### What does a repository cost to track? Cost follows calls, and every GitHub endpoint is 1 credit. A daily snapshot of one repository with `repository`, `repository-releases` and `repository-issues` (with `state=open` and `sort=updated`) is 3 calls × 1 credit = 3 credits per repository per day. For 100 repositories that's 300 credits a day, or 9,000 credits over 30 days, inside the Starter pack's 10,000. The 100 free credits granted once on signup cover a single `repository` call for each of 100 repositories, which is enough to test the fields against your list. A weekly trending watch, one `trending-repositories` call with `since=weekly` for each of 10 languages, is 10 credits a week, or 520 credits a year. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ### How fast can a daily run go? Limits are per account and counted per minute. A free account gets 1 request a second, so 300 calls take five minutes. Paying accounts run at least 5 requests a second, which brings the same run to one minute. A rate-limited call returns 429 with a `Retry-After` header. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. ## Which route should you choose? Choose by how many repositories you watch, how often, and which views you need, because that decides whether parser upkeep or per-call credits dominate. For a quick look at a handful of repositories, a browser or a `git clone` is enough and you need neither. The verdicts below assume recurring work. - **Tracking releases and activity on a list of dependencies**: call `repository-releases` and `repository` daily per repository and store the run date. 2 credits per repository per day. - **Finding projects in a space**: `search-repositories` with a `q` and `sort=stars`, then the repository endpoints on what you keep. 1 credit per search page. - **Watching what's trending by language**: `trending-repositories` with `language` and `since`. 1 credit per call. - **Reviewing what changed between two versions**: `repository-compare-commits`, `-files` or `-patch` with `base` and `head`, instead of diffing pages. - **Reading code at scale**: if you need whole repositories, cloning is simpler than any page-by-page approach. Use `repository-raw-file` or `repository-tree` for single files and listings. - **An agent answering questions about open-source projects**: give it the GitHub endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. The `call_endpoint` tool spends credits on success only. The [apps and media APIs](https://perceptlayer.com/verticals/apps) page lists related sources. To see the response shape for your own repositories, run `repository` in the playground on the [GitHub API page](https://perceptlayer.com/apis/github), then [get a free API key](https://perceptlayer.com/signup) when it fits. ## APIs in this post - [GitHub **1 credit per call** · 32 endpoints](https://perceptlayer.com/apis/github) ## Frequently asked questions ### Is scraping GitHub allowed? That depends on GitHub's terms of use, how you collect the data and the law where you operate, so read the terms and get legal advice for commercial projects. Don't get around blocks or challenges. Repository metadata is lower risk than data about people; if you use the user endpoints, don't build profiles of individuals and don't use the data to contact anyone. ### How much does a GitHub call cost? Every one of the 32 GitHub endpoints costs 1 credit per successful call, and failed calls cost nothing. Snapshotting 100 repositories with 3 calls each is 300 credits a day. The 100 free credits on signup are granted once; recurring work needs a pack, starting with the Starter pack's 10,000 credits, which last 12 months. ### Can I page through commits and issues? Yes. `repository-commits`, `repository-issues`, `repository-releases`, `repository-tags`, `repository-branches` and `repository-contributors` all take optional `page` and `per_page` integers. No defaults or page sizes are documented, so set `per_page` yourself and read each response before you request the next page. Each page is one call at 1 credit. ### Can I get a file's contents without cloning? Yes. `/v1/github/repository-raw-file` takes `owner`, `repo`, `path` and `ref`, all required, and `/v1/github/repository-readme` takes `owner` and `repo` with an optional `ref`. For a listing of files, use `repository-tree` with optional `ref` and `recursive`. Each call costs 1 credit. For whole repositories, cloning is simpler. ### What does a failed GitHub call return? An HTTP status and a JSON body with an `error` object holding a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Codes include `not_found` (404), `invalid_parameters` (422) for an out-of-range value, and `rate_limited` (429), which carries a `Retry-After` header with the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. github scraping open source repositories developer data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. --- title: "Google Search Scraper or API: What You Get | Perceptlayer" description: "A Google Search scraper parses every block on the page. Seven endpoints return them as JSON at 1 to 3 credits a call, with a recorded Berlin search." url: https://perceptlayer.com/blog/google-search-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Search Scraper or API: What You Get 10 Nov 2026 Perceptlayer 7 min read A Google Search scraper, or SERP scraper, is code that requests a results page for a query and parses each block on it: organic links, local results, related questions, related searches, filters and paging. You maintain a parser per block type, the request options that shape the page, and the monitoring that catches silent breakage. The alternative is seven Google Search endpoints that return those blocks as named JSON at 1 to 3 credits a call. This post maps each part of a scraper to an endpoint, prices a keyword set, and gives a verdict per use case. ## Key takeaways - A results page is several layouts in one. The recorded search for `best restaurants in Berlin` returned `organic_results`, `local_results`, `related_questions`, `related_searches`, `people_also_search_for`, `filters`, `pagination` and `serp_results`: eight blocks a scraper would parse separately. - `GET /v1/google-search/search` costs 1 to 2 credits and takes `query` plus 29 optional parameters, including `location`, `gl`, `hl`, `device`, `tbm` and `start`. `search-advanced` costs 1 to 3 and adds `fetch_ai_overview`. - `search-light` and `search-light-autocomplete` cost 1 credit each, as do `search-ai-overview`, `google-ai-mode-search` and `search-advanced-place`. - Tracking 50 keywords once a day on `search` is 50 to 100 credits a day, or 1,500 to 3,000 over 30 days, inside the Starter pack's 10,000. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What does a Google Search scraper have to parse? A Google Search scraper has to parse a page that is a stack of different blocks, each with its own markup, and which blocks appear depends on the query. Your scraper needs a parser for every block you care about and a rule for blocks it doesn't recognise. The recorded response shows how many blocks one ordinary query produces. For `best restaurants in Berlin`, the page carried organic results, a local pack with two modules, related questions, related searches, a "people also search for" list, filter chips and links to further pages. A scraper that only reads organic links would miss most of it, and one that reads all of it has eight parsers to keep working. Then there's order. Knowing a link is "result 1" isn't enough if a local pack sits above it, so a scraper also has to record where each block sits on the page. That means walking the page top to bottom and numbering blocks as it goes, which breaks whenever a new block type appears between the ones it knows. ### What else does a SERP scraper maintain? Beyond parsing, a SERP scraper maintains its request options, request pacing and monitoring. Results depend on country, language, device and location, so the scraper has to set those on every request and keep them consistent between runs. Search engines have to tell people apart from automated traffic, so a scraper running many queries a day should expect slow responses, challenge pages and blocks. When that happens, stop rather than work around it with rotating proxies or CAPTCHA solvers. Read Google's terms of service before you build one. Monitoring compares each run with the last and alerts when a block that was always there comes back empty. ## Which endpoint replaces which part of a scraper? Each of the seven endpoints on the [Google Search API](https://perceptlayer.com/apis/google-search) covers part of what a SERP scraper does, so you pick by the blocks you need rather than writing parsers for all of them. The full results page comes from `search` or `search-advanced`; lighter jobs such as plain result lists, suggestions or an AI overview have their own 1-credit endpoints. All are `GET`. | Scraper job | Endpoint | Credits | Required | Optional parameters you'll use first | | --- | --- | --- | --- | --- | | Full results page, every block | [`/v1/google-search/search`](https://perceptlayer.com/apis/google-search/search) | 1–2 | `query` | `location`, `gl`, `hl`, `device`, `tbm`, `start`, `page` | | Full page plus an AI overview | [`/v1/google-search/search-advanced`](https://perceptlayer.com/apis/google-search/search-advanced) | 1–3 | `query` | As `search`, plus `fetch_ai_overview` | | A lighter result list | [`/v1/google-search/search-light`](https://perceptlayer.com/apis/google-search/search-light) | 1 | `query` | `num`, `start`, `page`, `hl`, `gl`, `dateRestrict`, `sort` | | Query suggestions | [`/v1/google-search/search-light-autocomplete`](https://perceptlayer.com/apis/google-search/search-light-autocomplete) | 1 | `query` | `hl`, `limit` | | The AI overview alone | [`/v1/google-search/search-ai-overview`](https://perceptlayer.com/apis/google-search/search-ai-overview) | 1 | `query` | `hl`, `gl`, `google_domain`, `uule` | | AI mode answers | [`/v1/google-search/google-ai-mode-search`](https://perceptlayer.com/apis/google-search/google-ai-mode-search) | 1 | `q` | `hl`, `gl`, `follow_up_token` | | One place's details | [`/v1/google-search/search-advanced-place`](https://perceptlayer.com/apis/google-search/search-advanced-place) | 1 | none | `detail_url`, `svid`, `hl`, `gl` | Some parameters take a fixed set of values: `device` is `desktop`, `tablet` or `mobile`; `tbm` is `isch`, `vid`, `nws`, `lcl`, `shop` or `pts`; `safe` is `active` or `off`. No defaults or page sizes are documented, so set the ones you depend on on every call. That's the request-options job of a scraper, reduced to query parameters. ### What does one full-page call return? This is the recorded call to `search`, with the key in the `X-API-Key` header as the [authentication docs](https://docs.perceptlayer.com/authentication) describe: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to the parts that replace a scraper's parsers and its page-order logic: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", … "rank_group": 1, "rank_absolute": 4 }, … ], … "local_results": { "places": [ { "position": 1, "title": "BLESS Restaurant", "rating": 4.8, "reviews": 2400, "price": "€20–70", "type": "Asian", … "rank_absolute": 1 }, … ], "modules": [ { "title": "Local results", "place_indexes": [ 0 ], "rank_group": 1, "rank_absolute": 1 }, … ] }, … "pagination": [ { "start": 10, "link": "https://www.google.com/search?q=best+restaurants+in+Berlin&safe=off&gl=us&hl=en&complete=0&pws=0&nfpr=1&start=10&sstk=…" }, … ], … "serp_results": [ { "type": "local_results", "module_index": 0, "rank_group": 1, "rank_absolute": 1 }, { "type": "local_results", "module_index": 1, "rank_group": 2, "rank_absolute": 2 } ], … } ``` ### How does the response replace page-order logic? The response records order for you, so you don't number blocks yourself. `serp_results` lists blocks by `type` with a `rank_absolute`, and in this recording its two entries have `module_index` 0 and 1 and `rank_absolute` 1 and 2, the same values as the two entries in `local_results.modules`. Each module's `place_indexes` holds 0 or 1, matching the positions of the two entries in `places`. Organic results carry their own `rank_absolute`, so you can sort every block into one page order. Paging works the same way: the `pagination` entries carry `start` values of 10 and 20, and `search` takes a `start` parameter, so the names match. Try the next page in the playground before you rely on it. ## How do a SERP scraper and the endpoints compare? A SERP scraper costs engineering time per block type and carries blocking and terms risk; the endpoints cost 1 to 3 credits per call and return named blocks with their positions. The table compares them for a recurring job, such as tracking a keyword set daily. | | DIY Google Search scraper | Google Search endpoints | | --- | --- | --- | | Setup | Fetcher, one parser per block type, page-order logic, monitoring | API key in the `X-API-Key` header | | Blocks | Whatever you write parsers for | `organic_results`, `local_results`, `related_questions`, `related_searches`, `people_also_search_for`, `filters`, `pagination` | | Page order | Numbered by your own code | `rank_absolute` on results and modules, plus `serp_results` | | Country, language, device | Rebuilt into every request URL | `gl`, `hl`, `location`, `uule`, `device` | | When the page changes | Parsers return empty values until you fix them | You read named JSON fields; no parser of yours to fix | | Blocks and challenges | Yours to handle, more likely at volume | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 to 3 credits per successful call by endpoint | ### What does a keyword cost to track? Cost follows calls, one per keyword per check. On `search` at 1 to 2 credits, 50 keywords once a day is 50 to 100 credits a day, or 1,500 to 3,000 credits over 30 days, inside the Starter pack's 10,000. On `search-light` at 1 credit, the same set is 50 credits a day, 1,500 over 30 days. Check the [search endpoint page](https://perceptlayer.com/apis/google-search/search) for the cost of the calls you plan before you size a pack. The 100 free credits granted once on signup cover at least 50 full-page searches, which is enough to check the blocks you need for your own queries. Adding a second page for each keyword with `start` doubles the call count. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ### Reading the blocks in Python This script makes the recorded call and prints the page in order. It reads only fields that appear in the recording, and treats every block as optional because the mix changes with the query: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/google-search/search", params={"query": "best restaurants in Berlin", "hl": "en", "safe": "off"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60, ) resp.raise_for_status() data = resp.json() print("credits used:", resp.headers.get("X-Credits-Used")) rows = [] for r in data.get("organic_results", []): rows.append((r.get("rank_absolute"), "organic", r.get("title"), r.get("link"))) for p in data.get("local_results", {}).get("places", []): rows.append((p.get("rank_absolute"), "local", p.get("title"), p.get("rating"))) for rank, kind, title, extra in sorted(rows, key=lambda x: x[0] or 999): print(rank, kind, title, extra) for q in data.get("related_questions", []): print("question:", q.get("question")) ``` ## Which route should you choose? Choose by the blocks you need and how often, because that decides whether parser upkeep or per-call credits dominate. For a few searches by hand, use a browser and skip both. The verdicts below assume recurring work. - **Daily rank tracking for a keyword set**: `search` with fixed `gl`, `hl` and `device`, storing `position` and `rank_absolute` per run. 1 to 2 credits per keyword per day. - **Local visibility** (who appears in the local pack): `search` with `location`, reading `local_results.places` and `modules`. Same cost. - **Plain result lists at the lowest cost**: `search-light`, 1 credit per call. - **Keyword research from suggestions**: `search-light-autocomplete` with `limit`, 1 credit per query. - **Watching AI overviews for your topics**: `search-ai-overview` at 1 credit, or `search-advanced` with `fetch_ai_overview` when you want the full page in the same call. - **Learning how parsing works**: build a scraper against a practice site, not a search engine. - **An agent that needs live search**: give it these endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. `call_endpoint` spends credits on success only. For another engine's results, [Bing Scraper or API](https://perceptlayer.com/blog/bing-scraper-vs-api) covers the same trade-off, and the [search engine APIs](https://perceptlayer.com/verticals/search) page lists the rest. To see the blocks for your own queries, run `search` in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search), then [get a free API key](https://perceptlayer.com/signup) when it fits. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Is scraping Google Search allowed? That depends on Google's terms of service, how you collect the results and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. The endpoints return data collected from publicly available sources, as found at the time of the call. ### What is the difference between a SERP scraper and a SERP API? A SERP scraper is code you run that fetches a results page and parses each block itself. A SERP API returns the parsed blocks as JSON. Here, `search` returns `organic_results`, `local_results`, `related_questions` and other blocks, each with a `rank_absolute`, for 1 to 2 credits per successful call, and you maintain no parser. ### Which Google Search endpoint costs least? `search-light`, `search-light-autocomplete`, `search-ai-overview`, `google-ai-mode-search` and `search-advanced-place` each cost 1 credit per successful call. `search` costs 1 to 2 credits and `search-advanced` 1 to 3, depending on the call. Failed calls on any of them cost nothing and return `X-Credits-Used: 0`. ### How do I get results for a specific country or device? Pass `gl` and `hl` (two characters each) for country and language, `location` or `uule` for a place, and `device` as `desktop`, `tablet` or `mobile`. Keep them the same on every run if you compare results over time. `search-light` takes `gl` and `hl` but not `device` or `location`. ### What happens when a search call fails? You get an HTTP status and a JSON body with an `error` object holding a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) and [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover each case. google search serp scraper scraping search results local results ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 27 Oct 2026 Updated 10 Nov 2026 Perceptlayer 9 min read ## [eBay Scraper or API: Prices Without the Parsing](https://perceptlayer.com/blog/ebay-scraper-vs-api) Compare an eBay scraper with eBay search at 1 credit a call: a recorded coffee maker search with price.extracted, sponsored flags and 110,000 results. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 8 min read ## [Scrape Google Search Results with Python](https://perceptlayer.com/blog/scrape-google-search-results-python) Get Google results in Python as JSON: organic\_results, related\_questions and related\_searches from one call to /v1/google-search/search, at 1 credit a page. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "Patreon Scraper or API: What You Get | Perceptlayer" description: "A DIY Patreon scraper versus 3 restricted Patreon endpoints at 1 credit a call: creator, posts and search, the upkeep, the terms and a verdict per use case." url: https://perceptlayer.com/blog/patreon-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Patreon Scraper or API: What You Get 10 Nov 2026 Perceptlayer 8 min read A Patreon scraper is code that loads Patreon's search and creator pages and reads names, descriptions and post lists out of what comes back. You write and maintain the fetching, the parsing and the paging. The alternative is three Patreon endpoints, `creator`, `posts` and `search`, that return JSON for 1 credit a successful call. All three are restricted, so they come with terms that shape what you can collect. This post compares the two routes and gives a verdict per use case, for aggregate research on creators and categories. ## Key takeaways - The Patreon API on Perceptlayer has 3 `GET` endpoints: `/v1/patreon/creator` (takes `vanity`), `/v1/patreon/posts` (takes `campaign_id`, with optional `cursor` and `page[count]`) and `/v1/patreon/search` (takes `q`, with optional `page[size]`). - Every one of them costs 1 credit per successful call. Failed calls cost nothing and return `X-Credits-Used: 0`. - All three Patreon endpoints are restricted. They work after you accept the restricted-endpoint terms, which don't permit collecting personal data without a lawful basis or using it to contact people. - A study of 40 search queries plus 2 posts pages for each of 30 creators is 40 + 60 = 100 calls × 1 credit = 100 credits, exactly the 100 free credits on signup. - A scraper's ongoing cost is upkeep: parsers that break when pages change, paging logic, and monitoring that notices when a run quietly returns nothing. ## What does building a Patreon scraper involve? Building a Patreon scraper means writing three pieces and keeping them working: a fetcher that requests search and creator pages, a parser that finds the fields you want in what each page returns, and a pager that walks through long lists of posts without missing or repeating any. None of it is hard to write once. All of it needs attention every time the pages it reads change. The fetcher is the simple part until volume grows. A script that reads a handful of pages by hand behaves very differently from one that runs on a schedule across hundreds of creators. Large sites have to tell people apart from automated traffic, so expect slow responses, errors or challenge pages as a scraper scales. When that happens, stop. Working around a site's protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. The parser is where most of the upkeep goes. Modern pages often render content with scripts or load it from separate requests, so the data you want may not be in the first HTML response at all. You end up either running a headless browser or replaying the page's own requests, and both tie your code to formats you don't control. When a field moves, your parser returns empty values rather than an error, which is why the third piece matters. ### What does a scraper need besides parsing? A recurring scraper needs monitoring, storage rules and a decision about what not to keep. Monitoring compares each run with the last one and alerts when counts drop to zero. Storage rules decide how long you keep pages and what you strip before saving. On a membership platform, that last question is the important one, because creator pages sit next to supporters' names and comments, and those are personal data you shouldn't be collecting. Before you build anything, read Patreon's terms of use and get legal advice if the project is commercial. For the general case of when a scraper is worth writing at all, the [Instagram scraper comparison](https://perceptlayer.com/blog/instagram-scraper-vs-api) covers the same trade-off for another restricted social source. ## What do the Patreon endpoints return? The [Patreon API](https://perceptlayer.com/apis/patreon) has three endpoints, all `GET`, all 1 credit per successful call: a creator lookup, a creator's posts and a search. Each returns JSON, collected from publicly available sources and returned as found at the time of the call. There's no recorded response for this API yet, so this post doesn't show one or list response fields. Run a call in the playground on the API page to see the exact shape before you build on it. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | [`GET /v1/patreon/creator`](https://perceptlayer.com/apis/patreon/creator) | Creator | `vanity` (string, up to 100 characters) | none | | [`GET /v1/patreon/posts`](https://perceptlayer.com/apis/patreon/posts) | Posts | `campaign_id` (integer) | `cursor` (string, up to 200 characters), `page[count]` (integer) | | [`GET /v1/patreon/search`](https://perceptlayer.com/apis/patreon/search) | Search | `q` (string, up to 200 characters) | `page[size]` (integer) | The parameter list is everything documented about these endpoints. There are no documented defaults or page sizes, so set `page[size]` and `page[count]` explicitly if you depend on them, and read the response to see how many items came back. ### A search request This is a search for creators on a topic, with the key in the `X-API-Key` header as the [authentication docs](https://docs.perceptlayer.com/authentication) describe: ```bash curl "https://api.perceptlayer.com/v1/patreon/search?q=tabletop+games" \ -H "X-API-Key: $API_KEY" ``` The `posts` endpoint takes a `campaign_id` integer and a `cursor` string. Whether the creator or search response carries a value you can pass as `campaign_id`, and where the next `cursor` comes from, isn't recorded here. Check both in the playground: if a creator response contains a campaign identifier, try it on `posts` and see what comes back. ## Which terms apply to the Patreon endpoints? All three Patreon endpoints are restricted, so the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) apply to every call. They work once you accept those terms in the dashboard; until then a call returns `restricted_endpoint` (403) and costs nothing. The terms don't permit collecting personal data without a lawful basis, and they don't permit using data from these endpoints to contact people. That rules out supporter lists, outreach and lead generation, whatever tool you collect with. What fits is aggregate work. You can study how many creators turn up for a set of topics, how categories compare, or how creators' public pages present their offers, read across many pages at once rather than one person at a time. Store the counts and categories your analysis needs, drop anything that identifies a supporter or commenter, and don't build a profile of a single creator's activity over time. The [errors docs](https://docs.perceptlayer.com/errors) list `restricted_endpoint` and the other codes you might see. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries blocking and terms risk; the endpoints cost credits per call and come with restricted-endpoint terms, but leave you no parser to maintain. The table compares them for a recurring research job, such as reading search results for a list of topics each week. | | DIY Patreon scraper | Patreon endpoints | | --- | --- | --- | | Setup | Fetcher, parser or headless browser, pager, storage, monitoring | API key in the `X-API-Key` header | | Inputs | Page URLs you build yourself | `q`, `vanity`, `campaign_id`, plus `cursor`, `page[count]` and `page[size]` | | Output | Whatever you can parse from each page | JSON from `creator`, `posts` or `search`; check the shape in the playground | | When pages change | Your parser returns empty values until you fix it | You read JSON; there's no parser of yours to fix | | Blocks and challenges | Yours to handle, and more likely at volume | Not yours to handle; a failed call returns an error code and costs 0 | | Paging | You reverse-engineer it | `cursor` and `page[count]` on posts, `page[size]` on search | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | | Terms | Patreon's terms; your own legal review | Restricted-endpoint terms: no personal data without a lawful basis, no contacting people | ### What does a research run cost? Cost follows calls, and every Patreon call is 1 credit. Say you map a market with 40 search queries, one per topic, then read 2 pages of posts for each of 30 creators the searches turned up. That's 40 + (30 × 2) = 100 calls × 1 credit = 100 credits, which is exactly the 100 free credits granted once on signup. Run the same 40 queries every week for a year to watch how topics grow, and the search share alone is 40 × 52 = 2,080 credits. Add the 60 posts calls each week and it's 100 × 52 = 5,200 credits a year, inside the Starter pack's 10,000. Purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ### How fast can it run? Limits are per account and counted per minute. A free account gets 1 request a second, so the 100-call study above finishes in under two minutes. Paying accounts run at least 5 requests a second. A rate-limited call returns 429 with a `Retry-After` header; wait that many seconds and retry. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. ## Which route should you choose? Choose by what you're studying and how often, because that decides whether parser upkeep or per-call credits dominate. Both routes leave the same rule in place: aggregate research on creators and categories, never tracking or contacting individuals. For reading five creator pages once, open them in a browser and skip both. - **Market research on a creator category** (how many creators cover a topic, how offers are framed): run `search` once per topic with a fixed `page[size]` and store counts and categories. 1 credit per query. - **Comparing categories over time**: repeat the same queries weekly and compare aggregates between runs. 40 topics a week is 2,080 credits a year. - **Studying how creators publish, in aggregate** (posting cadence across a category, not one person): read `posts` pages for a sample of creators and keep counts and dates, not commenters or supporters. - **Supporter lists, outreach or lead generation**: don't. The restricted-endpoint terms don't permit using this data to contact people, and a scraper doesn't change what's appropriate. - **Learning how scraping works**: build a scraper against a practice site, not a membership platform. - **An agent answering questions about creator categories**: give it the Patreon endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. The `call_endpoint` tool spends credits on success only. The [social media APIs](https://perceptlayer.com/verticals/social) page lists related sources. To see the response shape for your own topics, run `search` in the playground on the [Patreon API page](https://perceptlayer.com/apis/patreon), then [get a free API key](https://perceptlayer.com/signup) when it fits. ## APIs in this post - [Patreon **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/patreon) ## Frequently asked questions ### Is scraping Patreon allowed? That depends on Patreon's terms of use, how you collect the data and the law where you operate, so read the terms and get legal advice for commercial projects. Don't get around blocks or challenges. Through the endpoints, the restricted-endpoint terms apply: no personal data without a lawful basis and no using the data to contact people. Keep work aggregate. ### Which Patreon endpoints are restricted? All three: `/v1/patreon/creator`, `/v1/patreon/posts` and `/v1/patreon/search`. They work after you accept the restricted-endpoint terms, published at `/legal/restricted-endpoints`, in the dashboard. Before that, a call returns `restricted_endpoint` with HTTP 403 and costs nothing. The terms don't permit collecting personal data without a lawful basis or using it to contact people. ### How much does a Patreon call cost? Each successful call to any of the three Patreon endpoints costs 1 credit, and a failed call costs nothing. A study of 100 calls fits the 100 free credits you get once on signup. Recurring work needs a pack; the Starter pack holds 10,000 credits, and purchased credits last 12 months. The pricing page lists what credits cost. ### Does the posts endpoint page through results? It takes an optional `cursor` string, up to 200 characters, and an optional `page[count]` integer. No defaults or page sizes are documented, so set them yourself and read the response to see how many posts came back and whether a next cursor is present. Each page is a separate call at 1 credit. ### What does a failed Patreon call return? An HTTP status and a JSON body with an `error` object holding a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Codes include `invalid_parameters` (422) for a bad input, `restricted_endpoint` (403) before you accept the terms and `rate_limited` (429), which carries a `Retry-After` header with the seconds to wait. patreon scraping creator economy market research social media data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Pinterest Scraper or API: What You Get](https://perceptlayer.com/blog/pinterest-scraper-vs-api) A DIY Pinterest scraper versus 6 Pinterest endpoints at 1 credit a call: pin search, board pins, upkeep, terms and the credits per search term tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Telegram Scraper or API: What You Get](https://perceptlayer.com/blog/telegram-scraper-vs-api) A DIY Telegram scraper versus 4 Telegram channel endpoints at 1 credit a call: channel posts, in-channel search, upkeep, terms and cost per channel. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Threads Scraper or API: What You Get](https://perceptlayer.com/blog/threads-scraper-vs-api) A DIY Threads scraper versus 8 Threads endpoints at 1 credit a call: keyword search, topic tags, brand posts, upkeep, terms and the cost per tag tracked. --- title: "Booking.com Scraper or API: What You Get | Perceptlayer" description: "A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price." url: https://perceptlayer.com/blog/booking-com-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Booking.com Scraper or API: What You Get 9 Nov 2026 Perceptlayer 8 min read A Booking.com scraper is code that builds search URLs for a place and a set of dates, loads the results and hotel pages, and pulls names, prices, scores and rooms out of the HTML. You maintain the URL building, the parsing and the scheduling yourself. The alternative is 11 Booking.com endpoints that return the same data as JSON for 1 credit a call. This post compares the two on recorded Paris calls, works out the cost per hotel tracked, and gives a verdict per use case. ## Key takeaways - A hotel price is only defined for a place, a check-in date, a check-out date and a party size, so a price scraper has to request every combination you care about, not just every hotel. - The recorded `GET /v1/booking/prices` call for Paris returned `total_prices: 25`, each with `name`, `url`, `price`, `review_score` and `location`, for 1 credit. - Prices arrive as strings with a currency symbol, such as `"$351.05"`, and the recorded `rooms` price is a block of page text. Plan to normalise both. - Tracking one city for 30 check-in dates costs 30 calls × 1 credit = 30 credits a day; at 25 hotels a call that is 0.04 credits per hotel price. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What would a Booking.com scraper have to do? A Booking.com scraper has four jobs: build the right search URL for each place, date pair and party, parse the results page into hotels and prices, parse each hotel page into rooms and scores, and notice when any of those parsers starts returning less than it did yesterday. Each is code you write once and repair whenever the page it depends on changes, which on a large consumer site happens as features ship. The URL builder is easy to underrate. Results depend on the destination, `checkin`, `checkout`, the number of adults, children and rooms, the language and the currency, so the scraper has to set all of them deliberately or it records prices for a stay nobody asked about. The parsers then have to find each hotel's name, link, displayed price, score and address in markup that was written for people, not programs. The operational layer is the rest: pacing requests, retrying slow pages, alerting when a run returns zero hotels for a city that had dozens, and storing results so you can compare days. Expect any high-traffic site to slow, challenge or block automated traffic at volume; if that happens, stop rather than work around it. Read Booking.com's terms before you build a collector. [Airbnb Scraper or API](https://perceptlayer.com/blog/airbnb-scraper-vs-api) covers the same trade-off for short-term rentals. ## Why do dates and guests multiply the work? Hotel prices are not a property of a hotel; they are a property of a stay. The same room has a different price for a Friday arrival than a Tuesday one, for two adults than for a family, and for three nights than for one. Any job that watches prices is really watching a grid of hotels × check-in dates × party sizes, and every cell is a separate request for a scraper and a separate call for an API. That grid is what decides cost on either route. A revenue manager watching 30 competitors over the next 60 arrival dates for two adults needs 1,800 hotel-date prices a day. A scraper has to fetch and parse enough pages to fill that grid without being slowed or blocked. On the endpoints, the question becomes how many cells one call fills: a city-level `prices` call returns many hotels for one date pair, while a `rooms` call returns one hotel for one date pair. The next sections use the recordings to put numbers on both. ## What do the Booking.com endpoints return? The [Booking.com API](https://perceptlayer.com/apis/booking) has 11 endpoints, all 1 credit per successful call, covering the same ground a scraper would: finding hotels, pricing them for dates, describing one property and reading its reviews. All except `bulk-prices` are `GET` requests; that one is a `POST` that takes a list of `searches`. Every response is JSON with named fields, so there is no HTML for you to parse. | Job | Endpoint | Parameters you'll set first | | --- | --- | --- | | Find a place | `GET /v1/booking/destinations` | `q` | | List hotels | `GET /v1/booking/search`, `GET /v1/booking/search-by-url` | `ss` and dates; or a results `url` | | Price a city for dates | `GET /v1/booking/prices` | `ss`, `checkin`, `checkout` (required), `dest_id`, `dest_type`, `group_adults` | | Price many searches | `POST /v1/booking/bulk-prices` | `searches` (list) | | Rooms for one hotel | `GET /v1/booking/rooms` | `url`, or `country` and `slug`, plus dates and guests | | Describe one hotel | `GET /v1/booking/hotel`, `facilities`, `photos` | `url`, or `country` and `slug` | | Judge quality | `GET /v1/booking/reviews`, `review-scores` | `url`, or `country` and `slug`; reviews also take `page`, `limit`, `sort` | `dest_type` accepts `city`, `region`, `district`, `hotel`, `landmark` or `airport`, and `sort` on reviews accepts `recent_desc`, `recent_asc`, `score_desc` or `score_asc`. The [prices endpoint page](https://perceptlayer.com/apis/booking/prices) and the [bulk prices endpoint page](https://perceptlayer.com/apis/booking/bulk-prices) show each parameter with a playground. ### A recorded prices call: Paris, three nights, two adults This request prices Paris for 20 to 23 November 2026 for two adults, with the destination pinned by `dest_id` and `dest_type`: ```bash curl "https://api.perceptlayer.com/v1/booking/prices?ss=Paris&checkin=2026-11-20&checkout=2026-11-23&group_adults=2&dest_id=-1456928&dest_type=city" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to two hotels: ```json { "success": true, "data": { "title": "Booking.com: hotels in Paris", … "prices": [ { "name": "Royal Saint Michel", "url": "https://www.booking.com/hotel/fr/royal-saint-michel.html", "price": "$351.05", "review_score": "8.8", "location": "3 Boulevard Saint Michel, Paris", "image": "https://cf.bstatic.com/xdata/images/hotel/square240/560523800.jpg?…" }, { "name": "Ibis Styles Paris Batignolles", "url": "https://www.booking.com/hotel/fr/mirific.html", "price": "$146.46", "review_score": "8.3", "location": "119 Avenue De Clichy, Paris", … } ], "total_prices": 25, "parsed": true }, "meta": { … "scraped_at": "2026-10-23T19:48:12+00:00", "cached": false, … } } ``` Two things to note before you build on it. `price` and `review_score` are strings, so convert them yourself and keep the raw value too. And `meta.scraped_at` records when the data was collected, which is the timestamp to store with each price. ### From a price result to its rooms The recorded `rooms` call used `country=fr` and `slug=royal-saint-michel`, the two parts of the first hotel's `url` above ( `/hotel/fr/royal-saint-michel.html`), with the same dates: ```bash curl "https://api.perceptlayer.com/v1/booking/rooms?country=fr&slug=royal-saint-michel&checkin=2026-11-20&checkout=2026-11-23&group_adults=2" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { … "canonical_url": "https://www.booking.com/hotel/fr/royal-saint-michel.html", "rooms": [ { "name": "Attic Single Room", "price": "€ 978 € 588 Original price € 978 Current price € 588 € 326.12 × 3 nights € 978.35 Limited-time Deal - € 390.73 …", "occupancy": "1 adult", "beds": "1 twin bed", "available": true } ], "total_rooms": 1, "parsed": true }, … } ``` This is the candid part. The room's `price` is the page's price text as found, with an original price, a current price, a per-night breakdown and deal wording in one string. The endpoint saves you fetching and locating it, but you still decide which figure you want. If your job is a single comparable number per hotel and date, the city-level `prices` field is simpler to work with. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries terms and blocking risk; the endpoints cost credits per call and take away the fetching and the HTML parsing, though not all normalisation. The table compares them for a recurring job, such as tracking prices for a city's hotels across upcoming dates. | | DIY Booking.com scraper | Booking.com endpoints | | --- | --- | --- | | Setup | URL builder, results and hotel-page parsers, scheduler, storage, alerts | API key in the `X-API-Key` header | | Inputs | Whatever query string you assemble | Named parameters: `ss`, `checkin`, `checkout`, `group_adults`, `group_children`, `no_rooms`, `dest_id`, `dest_type`, `lang`, `currency` | | Hotels per request | One page of results | `total_prices: 25` in the recorded Paris `prices` call | | Price format | Whatever text the page shows | String as found: `"$351.05"` from `prices`, a text block from `rooms` | | When the page changes | Your parser breaks and you fix it | You read named JSON fields | | Blocks and slow pages | Yours to handle | A failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### What does each hotel cost to track? On the endpoints, cost follows calls, so the question is how many hotel prices one call fills. A city-level `prices` call returned 25 hotels in the recording. Watching one city for the next 30 check-in dates, same stay length and party, is 30 calls × 1 credit = 30 credits a day, or 30 ÷ (30 × 25) = 0.04 credits per hotel price. Over 30 days that's 900 credits. Watching named competitors is per hotel. Thirty hotels × 60 arrival dates through `rooms` is 1,800 calls × 1 credit = 1,800 credits a day, or 54,000 over 30 days: more than the Build pack's 50,000 and inside the Growth pack's 200,000. The 100 free credits on signup cover a few days of the city watch or a test of the `rooms` flow on a handful of hotels. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ### A daily price log in Python This script runs the recorded Paris call and appends one row per hotel to a CSV, reading only fields that appear in the recording. It keeps the raw price string next to a parsed number, because the string carries the currency. ```python import csv import datetime import os import re import requests URL = "https://api.perceptlayer.com/v1/booking/prices" params = { "ss": "Paris", "checkin": "2026-11-20", "checkout": "2026-11-23", "group_adults": 2, "dest_id": -1456928, "dest_type": "city", } resp = requests.get(URL, params=params, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=90) resp.raise_for_status() body = resp.json() data = body["data"] scraped_at = body.get("meta", {}).get("scraped_at", datetime.datetime.now(datetime.timezone.utc).isoformat()) with open("paris-prices.csv", "a", newline="") as f: writer = csv.writer(f) for hotel in data.get("prices", []): raw = hotel.get("price") or "" amount = re.sub(r"[^0-9.]", "", raw) writer.writerow([scraped_at, params["checkin"], params["checkout"], hotel.get("name"), hotel.get("url"), raw, amount, hotel.get("review_score")]) print(data.get("total_prices"), "hotels;", resp.headers.get("X-Credits-Used"), "credit(s) used") ``` Loop it over check-in dates for a date grid. On a 429, wait for the seconds in `Retry-After` before the next call; the [errors docs](https://docs.perceptlayer.com/errors) list every code. ## Which route should you choose? Choose by the shape of your grid and what you do with the numbers, because that decides whether upkeep or per-call cost dominates. For a one-off look at a few hotels, use the website and skip both. For anything on a schedule, the verdicts below apply. - **City-level rate monitoring** (how prices in a destination move by arrival date): use `prices` with `dest_id` and `dest_type`, one call per date pair. At 25 hotels a call it's 0.04 credits per hotel price. - **Watching a fixed competitor set**: use `rooms` per hotel and date with `country` and `slug` from the hotel's `url`, and budget for parsing the room price text into the figure you compare. - **Quality signals next to prices**: add `review-scores` per hotel, or `reviews` with `sort=recent_desc` and `page`, and leave guest names out of anything you store. If scores move slowly for your hotels, a weekly run may be enough. - **Comparing sites, not just hotels**: [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) puts the sources side by side, and [Expedia Scraper or API](https://perceptlayer.com/blog/expedia-scraper-vs-api) runs the same trade-off for Expedia. - **An agent planning trips**: give it the Booking.com endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `prices` instead of browsing pages. To check the fields against your own destination and dates, run `prices` in the playground on the [Booking.com API page](https://perceptlayer.com/apis/booking), then [get a free API key](https://perceptlayer.com/signup) when they fit. The [travel APIs](https://perceptlayer.com/verticals/travel) page lists the other travel sources. ## APIs in this post - [Booking.com **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/booking) ## Frequently asked questions ### Is scraping Booking.com allowed? That depends on Booking.com's terms of use and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Hotel facts such as names, prices and scores carry less risk than personal data; leave guests' and reviewers' names out of anything you keep. ### How many hotels does one Booking.com prices call return? The recorded Paris call for three nights and two adults returned `total_prices: 25`, each with `name`, `url`, `price`, `review_score`, `location` and `image`. It cost 1 credit. The count for your destination and dates may differ, so run the call in the playground before you size a budget. ### Why is the price a string and not a number? The endpoints return data as found at the time of the call, and the recorded prices include a currency symbol. The recorded `prices` call returned `"$351.05"`, and the recorded `rooms` call returned the page's full price text. Keep the raw string, parse the figure you need, and store the currency next to it. ### Does a failed Booking.com call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. ### How fast can I run a daily date sweep? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 30-call city sweep finishes in about half a minute. Paying accounts run at least 5 requests a second (300 a minute). The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. booking.com hotel prices scraping travel data rate monitoring ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 8 min read ## [Expedia Scraper or API: What You Get](https://perceptlayer.com/blog/expedia-scraper-vs-api) An Expedia scraper vs 4 Expedia endpoints at 1 credit each: a recorded Paris search and rooms call with total\_price, rate plans, and the cost per hotel-date. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read ## [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) Expedia, Booking.com and Google Hotels hotel endpoints compared on recorded Paris searches: price as numbers or strings, hotel IDs, 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 9 min read ## [Vrbo Scraper or API: What You Get](https://perceptlayer.com/blog/vrbo-scraper-vs-api) A Vrbo scraper vs 6 endpoints at 1 credit a call: a recorded Lake Tahoe search with stay\_total, nightly\_original and rating, and the cost per listing. --- title: "Vinted Scraper or API: What You Get | Perceptlayer" description: "A Vinted scraper vs 10 endpoints: one recorded search returned 24 items with price, service_fee and total_item_price for 1 credit, about 0.04 credits per item." url: https://perceptlayer.com/blog/vinted-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Vinted Scraper or API: What You Get 9 Nov 2026 Perceptlayer 8 min read A Vinted scraper is code that runs searches on Vinted, reads each page of results and pulls item ids, titles, prices, sizes and conditions out of what the page returns, then repeats the run to catch new listings. You maintain the fetching, the parsing and the de-duplication yourself. The alternative is 10 Vinted endpoints that return the same item data as JSON, at 1 credit a call for search. This post compares the two on a recorded search, prices a listing watch per item, and gives a verdict per use case. ## Key takeaways - The hard part of a Vinted scraper is not one search; it's re-running searches often enough to catch new items and recognising the ones you've already seen. - The recorded `GET /v1/vinted/search` for `nike shoes` in `DE` returned 24 items on page 1 of 40, with `total_entries: 960`, for 1 credit. - Each item has an `id`, `title`, `price`, `service_fee` and `total_item_price` (each an `amount` and `currency_code`), plus `favourite_count`, `view_count`, `promoted` and a `url`. - At 24 items a page, a search call costs 1 ÷ 24 ≈ 0.04 credits per item. `GET /v1/vinted/item-details` costs 1 to 2 credits per call, so fetch details only for items you act on. - Each item also carries a `user` object with the seller's login: leave it out of anything you store. ## What would a Vinted scraper have to handle? A Vinted scraper has three jobs: run a search with the filters you care about, turn each results page into clean item records, and repeat the search on a schedule while telling new items from ones already stored. Each job is code you write once and repair whenever the page it depends on changes. None of them is difficult on its own; the upkeep is what costs time. Running the search means setting a query, a market, a sort order, price bounds and any brand, size, colour, material or condition filters, then following pages. Parsing means finding each item's id, title, price, fees, size and condition in markup written for people. The recorded search in `DE` returned size and condition in German, so a scraper covering several markets should expect to parse several languages. Repeating the search is where scrapers drift. On a busy second-hand marketplace, listings appear and sell all the time, and a page ranked by relevance can show a different mix each run, so you need a stable sort, a stopping rule and a store keyed on item id. Add request pacing, retries, and an alert when a run returns zero items for a query that had hundreds. Expect any high-traffic site to slow or block automated traffic at volume; if that happens, stop rather than work around it, and read Vinted's terms before you build a collector. ## What do the Vinted endpoints return? The [Vinted API](https://perceptlayer.com/apis/vinted) has 10 endpoints, all `GET`, covering search, the filter and category lists, one item's details and shipping, similar items and sellers' public listings. All cost 1 credit per successful call except `item-details`, which costs 1 to 2 credits. Every response is JSON with named fields, so there is no HTML for you to parse. | Job | Endpoint | Credits | Parameters you'll set first | | --- | --- | --- | --- | | Search items | `/v1/vinted/search` | 1 | `query`, `country`, `order`, `price_from`, `price_to`, `page`, `per_page` | | Filters for a search | `/v1/vinted/filters` | 1 | Same parameters as search | | List categories and markets | `/v1/vinted/categories`, `/v1/vinted/countries` | 1 | `country` (categories only) | | Complete a typed query | `/v1/vinted/suggestions` | 1 | `query` (required) | | One item's details | `/v1/vinted/item-details` | 1–2 | `item_id` (required), `country`, `include_member_items` | | One item's shipping | `/v1/vinted/item-shipping` | 1 | `item_id` (required), `country` | | Similar items | `/v1/vinted/similar-items` | 1 | `item_id` (required), `page`, `country` | | A seller's listings and profile | `/v1/vinted/user-items`, `/v1/vinted/user-profile` | 1 | `user_id` (required) | Search accepts 14 optional parameters, none required. `order` takes `relevance`, `newest_first`, `price_low_to_high` or `price_high_to_low`, and `country` takes one of 19 codes: FR, DE, ES, IT, NL, BE, AT, PL, CZ, LT, LU, SK, HU, RO, PT, SE, DK, FI and US. The id filters ( `brand_ids`, `catalog_ids`, `color_ids`, `size_ids`, `material_ids`, `status_ids`) are strings; the [filters endpoint](https://perceptlayer.com/apis/vinted/filters) takes the same parameters as search, so try it in the playground to see what it returns for your market. ### A recorded search: Nike shoes in Germany This is the request: ```bash curl "https://api.perceptlayer.com/v1/vinted/search?query=nike+shoes&country=DE" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to the fields a tracker keeps and with the seller's details removed: ```json { "success": true, "data": { "items": [ { "content_source": "search", "favourite_count": 66, "id": 10490818547, "item_box": { "first_line": "Nike", "item_id": 10490818547, "second_line": "38.5 · Sehr gut", … }, "photo": { "url": "https://images1.vinted.net/t/06_00853_fZcSGhpcLtP5zySfYRu7MUL7/f800/be5ef36b.webp?…", "width": 800, "height": 600, … }, "price": { "amount": "20.00", "currency_code": "EUR" }, "promoted": false, "service_fee": { "amount": "1.70", "currency_code": "EUR" }, "title": "Nikeshoe size 38.5", "total_item_price": { "amount": "21.70", "currency_code": "EUR" }, "url": "/items/10490818547-nikeshoe-size-385", "user": { … }, "view_count": 0 }, { "content_source": "search_promoted_items", "favourite_count": 40, "id": 10182967081, … "price": { "amount": "15.00", "currency_code": "EUR" }, "promoted": true, "title": "Nike Kids Shoes", "total_item_price": { "amount": "16.45", "currency_code": "EUR" }, … } ], "pagination": { "current_page": 1, "per_page": 24, "total_entries": 960, "total_pages": 40, … }, … }, "message": "Items retrieved successfully", "meta": { "scraped_at": "2026-10-23T20:53:19.928683Z", … } } ``` ## What in the response still needs care? The search response removes the fetching and the HTML, but three things in it still need handling in your code. None of them is a reason to scrape instead; they're the normalisation work any tracker does, and it's better to plan for it than discover it in production. **Amounts are strings.** `price.amount` is `"20.00"`, not a number, so convert it with a decimal type and store `currency_code` beside it. The recorded `total_item_price` equals `price` plus `service_fee` (20.00 + 1.70 = 21.70), so decide which one your analysis compares and use it consistently. **Size and condition are display text.** `item_box.second_line` is `"38.5 · Sehr gut"`: size and condition joined by a dot, in German because the search ran in `DE`. If you compare conditions across markets, map the text per language before you compare, and keep the raw string. **Promoted items appear in results.** The second recorded item has `promoted: true` and `content_source: "search_promoted_items"`. Keep the flag so you can separate paid placement from the rest, and de-duplicate on `id` so one item is stored once. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries terms and blocking risk; the endpoints cost credits per call and remove the fetching, parsing and paging code. The table compares them for a recurring job, such as watching a set of searches for new listings and price drops across a few markets. | | DIY Vinted scraper | Vinted endpoints | | --- | --- | --- | | Setup | Fetcher, results parser, de-duplication store, scheduler, alerts | API key in the `X-API-Key` header | | Filters | Whatever you can encode in a page request | 14 named search parameters, and a `filters` endpoint that takes the same ones | | Markets | One parser per market's layout and language | `country` with 19 codes on search | | Items per request | One page of results | `per_page: 24` in the recorded call | | Paging | Follow the site's pages | `page`, with `total_pages` and `total_entries` in `pagination` | | Prices | Text to parse | `price`, `service_fee`, `total_item_price` with `amount` and `currency_code` | | When the page changes | Your parser breaks and you fix it | You read named JSON fields | | Blocks and slow pages | Yours to handle | A failed call returns an error code and costs 0 | | Cost | Hosting and your time | 1 credit per search call; 1–2 for item details | ### What does each item cost to track? On the endpoints, cost follows calls, and one search call returned 24 items. That's 1 ÷ 24 ≈ 0.04 credits per item seen. Reading every page of the recorded query once, 40 pages for 960 items, is 40 calls × 1 credit = 40 credits, within the 100 free credits on signup. A watch for new listings is cheaper than a full sweep. Sort with `order=newest_first` and read page 1 only: 20 saved searches checked every hour is 20 × 24 = 480 calls × 1 credit = 480 credits a day, or 14,400 over 30 days. That's more than the Starter pack's 10,000 and inside the Build pack's 50,000. Item details are extra: at 1 to 2 credits a call, 50 detail lookups a day costs 50 to 100 credits, so call `item-details` only for items that pass your own filters. Every response's `X-Credits-Used` header shows what that call cost. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ### A new-listings watch in Python This script runs one search sorted by newest, stores items in SQLite keyed on `id`, and prints only items it hasn't seen before. It reads only fields that appear in the recording and never touches `user`. ```python import os import sqlite3 import requests URL = "https://api.perceptlayer.com/v1/vinted/search" params = {"query": "nike shoes", "country": "DE", "order": "newest_first"} db = sqlite3.connect("vinted.db") db.execute("""CREATE TABLE IF NOT EXISTS items ( id INTEGER PRIMARY KEY, title TEXT, price TEXT, total TEXT, currency TEXT, promoted INTEGER, url TEXT, first_seen TEXT)""") resp = requests.get(URL, params=params, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60) resp.raise_for_status() body = resp.json() seen_at = body.get("meta", {}).get("scraped_at") for item in body["data"].get("items", []): price = item.get("price") or {} total = item.get("total_item_price") or {} cur = db.execute( "INSERT OR IGNORE INTO items VALUES (?, ?, ?, ?, ?, ?, ?, ?)", (item["id"], item.get("title"), price.get("amount"), total.get("amount"), price.get("currency_code"), int(bool(item.get("promoted"))), item.get("url"), seen_at), ) if cur.rowcount: print("new:", item["id"], item.get("title"), total.get("amount"), total.get("currency_code")) db.commit() print("credits used:", resp.headers.get("X-Credits-Used")) ``` Run it from cron at the interval your budget allows. On a 429, wait for the seconds in `Retry-After` before retrying; the [errors docs](https://docs.perceptlayer.com/errors) list every code. ## Which route should you choose? Choose by how often you need fresh results and how many markets you cover, because that decides whether upkeep or per-call cost dominates. For a one-off look at a few items, browse Vinted and skip both. For anything on a schedule, the verdicts below apply. - **New-listing alerts for a few saved searches**: use `search` with `order=newest_first`, page 1 only, and de-duplicate on `id`. It's 1 credit per check. - **Resale price research for a brand or model**: sweep all pages of a filtered search once and store `price.amount`, `total_item_price.amount` and `item_box.second_line`. The recorded query was 40 credits for 960 items. - **Comparing prices across markets**: repeat the same search with each `country` code; 19 codes is 19 credits per sweep at page 1, and amounts come back with their `currency_code`. - **Deep checks on a shortlist**: call [item details](https://perceptlayer.com/apis/vinted/item-details) for the items that pass your filters, budgeting 2 credits each to be safe, and `item-shipping` if delivery cost matters. - **Studying individual sellers**: avoid it unless you have a lawful basis; keep seller logins and avatars out of your data, and never use it to contact people. - **An agent that finds second-hand items**: give it the Vinted endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `search` instead of browsing pages. If you track several resale sources, [Facebook Marketplace API: Listings as JSON](https://perceptlayer.com/blog/facebook-marketplace-api) covers another, and the [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists the rest. To check the fields for your own query and market, run the [Vinted search endpoint](https://perceptlayer.com/apis/vinted/search) in its playground, then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Vinted **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/vinted) ## Frequently asked questions ### Is scraping Vinted allowed? That depends on Vinted's terms of use and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Item facts such as titles, prices and conditions carry less risk than personal data; leave sellers' usernames, avatars and profile links out of anything you keep. ### How many items does one Vinted search call return? The recorded search for `nike shoes` in `DE` returned 24 items, with `pagination` showing `per_page: 24`, `total_entries: 960` and `total_pages: 40`. It cost 1 credit. Use `page` to read further pages ( `per_page` is also accepted), and check `pagination` in your own response before sizing a budget. ### What does a Vinted item-details call cost? The catalogue lists `GET /v1/vinted/item-details` at 1 to 2 credits per successful call; every other Vinted endpoint costs 1. The `X-Credits-Used` header on each response shows what that call cost, so log it if you need exact figures. Budget 2 credits per lookup when planning. ### Does a failed Vinted call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. ### How often can I check a saved search? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), and paying accounts run at least 5 a second (300 a minute), so the rate rarely limits a watch; credits do. Twenty searches an hour is 480 credits a day. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. vinted second-hand marketplaces scraping resale prices ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Oct 2026 Updated 7 Nov 2026 Perceptlayer 6 min read ## [Vinted API: Search Second-Hand Items as JSON](https://perceptlayer.com/blog/vinted-api-search-items-json) Search Vinted as JSON with 14 optional parameters, then price-check one query across 19 countries. Each call costs 1 credit; failed calls cost nothing. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [StockX API: Product and Resale Price Data as JSON](https://perceptlayer.com/blog/stockx-api-sneaker-prices) Search StockX and read lowest\_ask, highest\_bid, last\_sale and sales\_last\_90d as JSON at 1 credit a call, then track a sneaker list daily. --- title: "Vrbo Scraper or API: What You Get | Perceptlayer" description: "A Vrbo scraper vs 6 endpoints at 1 credit a call: a recorded Lake Tahoe search with stay_total, nightly_original and rating, and the cost per listing." url: https://perceptlayer.com/blog/vrbo-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Vrbo Scraper or API: What You Get 9 Nov 2026 Perceptlayer 9 min read A Vrbo scraper loads search results for a destination and a pair of stay dates, then turns each rental card into numbers: price, bedrooms, rating, discount. You maintain the fetching, the text parsing and the checks that catch a silent break. The alternative is six Vrbo endpoints that return those fields as JSON for 1 credit per successful call. Below, a recorded Lake Tahoe search shows which parsing jobs disappear, which decisions stay yours, and what each tracked listing costs. ## Key takeaways - A Vrbo search result only means something with its query: `check_in` and `check_out` are both required on `GET /v1/vrbo/search`, and every price you store needs those dates next to it. - The recorded search returns `price.nightly`, `price.stay_total` and `price.nights` as numbers next to display text such as `"$2,473 for 3 nights"`, so there is no price string to parse. - One recorded property has `nightly_original` (289 against a `nightly` of 280) and the other doesn't. Treat the field as optional; its presence is the discount signal. - `total_results` was 361 with `limit` 20, so one snapshot of the whole market for one date window is 19 search calls × 1 credit = 19 credits, if paging reaches every result. - Failed calls cost nothing and return `X-Credits-Used: 0`; a scraper's failures cost you the run and the time to find out why. ## What does a Vrbo scraper have to handle? A Vrbo scraper is four pieces of code, and each needs upkeep: a query builder, a fetcher, a parser and a monitor. None of this depends on how Vrbo's site is built; it's what any collector for a large travel site has to cover. Before you write one, read Vrbo's terms of use and decide whether your use is one you can defend. ### Building the query Rental prices depend on the stay, so the scraper has to reproduce a visitor's search: destination, check-in, check-out, adults, children and any filters. Filters such as amenities or house rules have values you must discover first, usually by inspecting the page, and those values can change. If the query you sent and the results you got don't match, every row from that run is wrong. ### Fetching without being blocked Any scraper that runs every day across several markets has to plan for slow responses, error pages and refused requests, on any site. Treat a block as a reason to stop. Getting around a site's protections with rotating proxies or challenge solvers isn't something we'd recommend. ### Turning cards into numbers Rental cards are written for people. A size line reads like "House · 2 bedrooms · 4 beds", a price reads like "$839 for 3 nights", and a crossed-out rate sits next to the real one only when there's a discount. Your parser splits text on separators, strips currency symbols and thousands separators, and has to know which number is the current rate. ### Noticing when it broke A changed page rarely raises an exception. It produces rows with empty prices, a bedroom count of zero, or half as many results as yesterday. You need checks that compare each run with the last one and alert you, and someone to fix the parser when they fire. ## What does the search endpoint return instead? `GET /v1/vrbo/search` returns each rental as named, typed fields, with the size, rating and stay price already split out. This is the recorded request: Lake Tahoe, three nights from 10 December 2026, two adults. It costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/vrbo/search?check_in=2026-12-10&check_out=2026-12-13&destination=Lake+Tahoe%2C+California&adults=2" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed with `…` to the paging fields and the first property: ```json { "success": true, "data": { "destination": "Lake Tahoe, California", "check_in": "2026-12-10", "check_out": "2026-12-13", "adults": 2, "sort": "recommended", "total_results": 361, "pagination_label": "1 - 50 of 300+", "offset": 0, "limit": 20, "has_more": true, "next_offset": 20, "properties": [ { "property_id": "133784568", … "listing_id": "5390725", "area": "Within Tahoe Keys", "overview": "Condo · 3 bedrooms · 4 beds", "property_type": "Condo", "bedrooms": 3, "beds": 4, "rating": 9, "rating_scale": 10, "rating_label": "Wonderful", "review_count": 2, "price": { "currency": "USD", "nightly": 824, "nightly_formatted": "$824", "stay_total": 2473, "stay_total_text": "$2,473 for 3 nights", "nights": 3, "fees_note": "All fees included" }, … "image_count": 10 }, … ] }, "meta": { "endpoint_family": "rental_search", "billable": true } } ``` ### What the recording tells you about the data The response echoes the query: `destination`, `check_in`, `check_out`, `adults` and `sort` come back in `data`. That is the context a scraper has to record by hand, returned with every page, so a stored row can't lose its dates. `overview` and `stay_total_text` are still there as display text, but you don't have to parse them: `property_type`, `bedrooms`, `beds`, `stay_total` and `nights` carry the same facts as values. Keep the text fields if you show them to people, and compute with the numbers. `area` is free text, and the two recorded properties use it differently: "Within Tahoe Keys" names a neighbourhood, "6 min drive to the beach" describes a distance. Don't treat it as a location column you can group by. `rating` is out of `rating_scale` 10, with a `rating_label` beside it. The first property has `rating` 9 from `review_count` 2; the second has 9.8 from 161. A tracker that ranks by rating alone will put the first one near the top, so store both fields and weigh rating by count. The second property's price block adds `"nightly_original": 289` next to `"nightly": 280`; the first has no `nightly_original`. That absence is information, not an error. A scraper would have to spot a crossed-out number on the card to get the same signal. ### Paging: which number do you trust? The response carries three different counts: `total_results` 361, a `pagination_label` of "1 - 50 of 300+", and `limit` 20. The label is the display text a scraper would read, and it disagrees with the page size of the call. Page by `has_more` and `next_offset`, and use `total_results` for planning. `limit` sets the page size, but no maximum is documented, so test larger values in the playground before you rely on them. ## How do a scraper and the endpoints compare? Both routes can reach the same rental data; the difference is who turns pages into numbers and who fixes it when that stops working. The table compares them for a recurring job, such as a daily price snapshot of one destination for a few date windows. | What you need | DIY Vrbo scraper | Vrbo endpoints | | --- | --- | --- | | Destination lookup | Reproduce the site's place search | `/v1/vrbo/destinations` with `query` | | Filter values | Inspect the page and copy them | `/v1/vrbo/filters` for a destination and dates | | Rental identity | Parse an ID from a link | `property_id` and `listing_id` | | Size | Split "Condo · 3 bedrooms · 4 beds" | `property_type`, `bedrooms`, `beds` | | Stay price | Parse "$2,473 for 3 nights" | `price.stay_total`, `price.nights`, `price.currency` | | Discount | Find a crossed-out rate on the card | `price.nightly_original`, present only when set | | Rating | Parse a score and a label | `rating`, `rating_scale`, `rating_label`, `review_count` | | Next page | Find and follow the site's pagination | `has_more`, `next_offset`, and an `offset` parameter | | Calendar and reviews | A parser per page type | `listing-availability` and `listing-reviews` by `property_id` | | When it breaks | Empty fields until your checks notice | An HTTP status and an error `code`; the call costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free; at least 5 a second on paid credits | | Running cost | Hosting, your time, and proxies if you use them | 1 credit per successful call | The endpoints don't remove every job. You still choose the date windows, decide which properties to follow, store the query with each row and handle errors. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain how requests are counted per minute. ## What does each tracked Vrbo listing cost? On the endpoints, cost follows calls, not listings. A search call costs 1 credit whatever it returns, so with 20 properties a page, each listing in a snapshot costs 1 ÷ 20 = 0.05 credits for that date window. Per-property calls ( `listing`, `listing-availability`, `listing-reviews`) cost 1 credit for one property each. Take the recorded market: 361 results at 20 a page is 19 pages, so one full snapshot for one date window is 19 calls × 1 credit = 19 credits, assuming paging reaches every result. Track four date windows once a day and it's 19 × 4 = 76 credits a day, or 2,280 credits over 30 days. Many trackers also watch a short list of competing properties more closely. Checking availability for 40 of them once a week is 40 calls × 1 credit = 40 credits a week, or about 160 a month. | Job | Calls | Credits | | --- | --- | --- | | One snapshot, one date window (361 results, 20 a page) | 19 | 19 | | Daily snapshot, 4 date windows, 30 days | 2,280 | 2,280 | | Weekly `listing-availability`, 40 properties, 4 weeks | 160 | 160 | | Total for the month | 2,440 | 2,440 | The 100 free credits on signup cover five single-window snapshots of this market (5 × 19 = 95 credits), enough to check whether the fields fit your model. The full month is 2,440 credits, inside the Starter pack's 10,000, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how `X-Credits-Used` and `X-Credits-Remaining` report spend. Requests have no idempotency key, so a call whose reply your client timed out on may have succeeded and been billed. Log `X-Credits-Used` per call to keep your own count. ## How do you store a dated snapshot from code? Write one row per property per run, with the dates and the fetch time beside the price, so later runs compare like with like. The script below pages through one search with `next_offset` and saves rows to SQLite. It reads only fields from the recorded response and uses `.get()` for each property field, because `nightly_original` already shows that fields can be missing. ```python import os import sqlite3 from datetime import datetime, timezone import requests URL = "https://api.perceptlayer.com/v1/vrbo/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} QUERY = { "destination": "Lake Tahoe, California", "check_in": "2026-12-10", "check_out": "2026-12-13", "adults": 2, } db = sqlite3.connect("vrbo_snapshots.db") db.execute( """CREATE TABLE IF NOT EXISTS snapshots ( fetched_at TEXT, property_id TEXT, check_in TEXT, check_out TEXT, adults INTEGER, property_type TEXT, bedrooms INTEGER, beds INTEGER, rating REAL, review_count INTEGER, currency TEXT, nightly REAL, nightly_original REAL, stay_total REAL, nights INTEGER )""" ) fetched_at = datetime.now(timezone.utc).isoformat() offset, spent = 0, 0 while True: resp = requests.get(URL, params={**QUERY, "offset": offset}, headers=HEADERS, timeout=60) if resp.status_code != 200: print("stopped:", resp.status_code, resp.json()["error"]["code"]) break spent += int(resp.headers.get("X-Credits-Used", 0)) data = resp.json()["data"] for p in data["properties"]: price = p.get("price") or {} db.execute( "INSERT INTO snapshots VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", ( fetched_at, p.get("property_id"), QUERY["check_in"], QUERY["check_out"], QUERY["adults"], p.get("property_type"), p.get("bedrooms"), p.get("beds"), p.get("rating"), p.get("review_count"), price.get("currency"), price.get("nightly"), price.get("nightly_original"), price.get("stay_total"), price.get("nights"), ), ) db.commit() if not data.get("has_more"): break offset = data["next_offset"] db.close() print("credits used:", spent) ``` We have no recorded run of the full loop, so try it with one page first. A rate-limited (429) response stops the loop; for a scheduled job, wait the seconds in its `Retry-After` header and resume from the same `offset`. Get a key from the [free sign-up page](https://perceptlayer.com/signup), export it as `API_KEY`, and see the [authentication docs](https://docs.perceptlayer.com/authentication) for the `api_key` query parameter. ## Which route fits your job? Pick by how often the job runs and which fields it needs, because that decides whether parser upkeep or per-call credits dominate. These verdicts assume the fields shown above cover what you need. - **Daily rate tracking for one destination**: use `search` with fixed `check_in`, `check_out` and `adults`, and store each row with its query. At 20 a page it's 0.05 credits per listing per date window. - **Spotting discounts**: store `nightly` and `nightly_original` from the same search rows. A property gaining or losing `nightly_original` between runs is the change to alert on, at no extra calls. - **Watching a fixed set of competitors**: call `listing-availability` with each `property_id` and a `start_date` and `end_date`, at 1 credit per property per check. [Vrbo API: Vacation Rental Listings and Availability](https://perceptlayer.com/blog/vrbo-api-vacation-rental-listings) walks through that flow. - **Guest feedback over time**: use `listing-reviews` with `sort=newest`, and keep guests' names out of anything you store. - **A field none of the six endpoints return**: a narrow scraper for that one field may be justified, after you've read the terms. - **A handful of rentals, once**: open them in a browser. Neither route is worth setting up. - **An AI agent answering stay questions**: give it the endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls search instead of browsing pages. For the same comparison on other rental and travel sites, see [Airbnb Scraper or API: What You Get](https://perceptlayer.com/blog/airbnb-scraper-vs-api) and [Expedia Scraper or API: What You Get](https://perceptlayer.com/blog/expedia-scraper-vs-api), and the [travel APIs](https://perceptlayer.com/verticals/travel) page lists the rest. Next step: run the Lake Tahoe search with your own dates in the playground on the [Vrbo API page](https://perceptlayer.com/apis/vrbo). ## APIs in this post - [Vrbo **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/vrbo) ## Frequently asked questions ### Is scraping Vrbo allowed? That depends on Vrbo's terms of use, what you do with the data and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Rental facts such as price, size and rating carry less risk than personal data; leave hosts' and guests' names out of what you keep. ### How much does a Vrbo API call cost? Each of the 6 Vrbo endpoints costs 1 credit per successful call, and failed calls cost nothing. A full snapshot of the recorded Lake Tahoe search, 361 results at 20 a page, is 19 credits for one date window. Every verified account gets 100 free credits once, and the [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Why does the same rental show different prices? Prices depend on the stay, so `search` requires `check_in` and `check_out`, and `adults` and `children` change the party. The recorded response returns `price.nightly`, `price.stay_total` and `price.nights` for the query sent. Store the dates and party with every price, or rows from different runs won't compare. ### Why doesn't pagination\_label match total\_results? The recorded search returned a `pagination_label` of "1 - 50 of 300+" while `limit` was 20 and `total_results` was 361. The label is display text; the other fields describe the call. Page with `offset`, reading `has_more` and `next_offset` from each response, and plan call counts from `total_results`. ### What happens when my credits run out mid-run? The call returns `insufficient_credits` (402) and nothing more is debited; there is no automatic top-up. Rows already saved stay saved. In the script above the loop stops and prints the error code, so you can buy a pack and run the snapshot again. vrbo scraping vacation rentals price tracking travel data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Airbnb Scraper or API: What You Get](https://perceptlayer.com/blog/airbnb-scraper-vs-api) An Airbnb scraper vs search, listing and reviews endpoints at 1 credit a call: a recorded Paris search with price.amount, price\_breakdown and coordinates. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 8 min read ## [Amazon Scraper or API: Search, Offers and Reviews](https://perceptlayer.com/blog/amazon-scraper-vs-api) An Amazon scraper vs 18 endpoints at 1 credit a call: a recorded laptop stand search with asin, price.amount and rating, and the domains each call takes. --- title: "AliExpress Scraper or API: What You Get | Perceptlayer" description: "An AliExpress scraper vs 1-credit endpoints: a recorded search with 60 products a page, price.amount, sold_count and is_sponsored, and cost per product." url: https://perceptlayer.com/blog/aliexpress-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # AliExpress Scraper or API: What You Get 8 Nov 2026 Perceptlayer 8 min read An AliExpress scraper is code you write and maintain to run searches on AliExpress, read product cards and pages, and turn prices, discounts, ratings and order counts into structured rows. The alternative is nine AliExpress endpoints that return that data as JSON for 1 credit per successful call. A recorded search for `wireless earbuds` returned 60 products on one page, each with a numeric price, an original price, `sold_count` and an `is_sponsored` flag. This post compares the two routes, prices tracking per product, and gives a verdict per use case. ## Key takeaways - A recorded `GET /v1/aliexpress/search` for `wireless earbuds` with `sort=orders` returned `page_size: 60`, `total_results: 16557` and `has_more: true`, so one call covers up to 60 products. - Each result carries `product_id`, `title`, `url`, `price.amount`, `price.currency`, `original_price`, `discount_percent`, `rating`, `sold_count`, `sold_text` and `is_sponsored`. The `promotion` field appeared on one result and not the other. - `sold_text` is a rounded label ( `10,000+ sold`) while `sold_count` is a number ( `17921`): store the number. - Sweeping 5 pages for 20 keywords daily is 100 calls × 1 credit = 100 credits a day for up to 6,000 product rows, 1 credit per 60 rows. The 100 free credits on signup cover one day. - All 9 AliExpress endpoints are standard tier and cost 1 credit per successful call; a failed call costs nothing. ## What would an AliExpress scraper have to handle? An AliExpress scraper has to do four things: run a search with the right sort and filters, page through results, parse every product card into fields, and do it again on a schedule without silently losing fields. Each is code that depends on pages you don't control. Marketplace listings make the parsing harder than it looks, because a single card carries a current price, a struck-through price, a discount, a rating, an order count and promotional labels, and any of them can be missing on a given product. Prices are the first trap. A scraper reads text such as `US $4.35` and has to split it into an amount and a currency, and keep both when a listing shows more than one price. Order counts are the second: a display label like `10,000+ sold` is rounded, so a scraper that keeps only the label loses the precision you need for trends. Sponsored placements are the third, because a price study that mixes paid placements with organic results measures something different from one that separates them. Then comes the operational layer every scraper shares: request pacing, retries with backoff, alerts when a run returns fewer products than yesterday, and checks that a field which was always populated hasn't gone blank. Read AliExpress's terms before you build a collector, and if a site blocks or challenges your traffic, stop rather than work around it. None of it is hard to build once. Keeping it correct is the recurring cost. ## What does one AliExpress search call return? One search call returns a page of products with every price already parsed into numbers, plus paging fields, the facet options and the sort options. The search endpoint requires `query` (up to 200 characters), `page` and `sort`, where `sort` is one of `default`, `orders`, `price_asc` or `price_desc`. Optional parameters are `min_price`, `max_price`, `ship_from` and `filters[]`. This is the recorded request, sorted by orders: ```bash curl "https://api.perceptlayer.com/v1/aliexpress/search?query=wireless+earbuds&page=1&sort=orders" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to the paging fields and the first product: ```json { "success": true, "data": { "query": "wireless earbuds", "sort": "orders", "page": 1, "page_size": 60, "total_results": 16557, "has_more": true, "results": [ { "product_id": "3256812408115438", "title": "HTC NE79 TWS Bluetooth 6.0 Earbuds AI Translation 135 Languages ENC Noise Cancelling HiFi Stereo Headphones with LED Display", "url": "https://www.aliexpress.com/item/3256812408115438.html", "image_url": "https://ae-pic-a1.aliexpress-media.com/kf/Sff7e4be36c804173b8bf2ad0f4a81b0bA.png", … "price": { "amount": 4.35, "currency": "USD", "formatted": "US $4.35" }, "original_price": { "amount": 17.31, "currency": "USD", "formatted": "US $17.31" }, "discount_percent": 74, "rating": 4.9, "sold_count": 17921, "sold_text": "10,000+ sold", "selling_points": [ "Fastest delivery in 6 days" ], "promotion": "Dollar Express", "is_sponsored": false }, … ], … }, "meta": { "endpoint_family": "search", "billable": true } } ``` ### Which scraper problems do these fields remove? Each of the three traps above maps to a field. The price arrives as `price.amount` ( `4.35`) and `price.currency` ( `USD`), with the display string kept separately in `formatted`, so there's no text to split. The order count arrives twice: `sold_count: 17921` and `sold_text: "10,000+ sold"`. The second product in the recording has `sold_count: 250` and `sold_text: "250 sold"`, so in this recording the label was rounded for the larger count and exact for the smaller one. And every result has `is_sponsored`, `false` on both recorded products, so you can filter paid placements in one line. Two fields need defensive code. `promotion` is `"Dollar Express"` on the first product and absent on the second, so treat it as optional. `selling_points` is a list of short strings, such as `"Fastest delivery in 6 days"` and `"New shoppers save $34.32"`, which reads as marketing copy rather than a structured value. ### What else comes back with the results? The response also lists `facets` and `sort_options`. Each facet has a `title`, a `type` and `options` with a `label` and a `value`, such as `Free shipping` with `filterCode:freeshipping` and `Choice` with `filterCode:choice_atm`. The search endpoint takes an optional `filters[]` parameter, but we have no recorded call that passes one of these values back, so try it in the playground before you build on it. The `sort_options` pair `value` with `label`: `orders` is shown as `Popular` and `default` as `Best matches`. ## How do an AliExpress scraper and the endpoints compare? A scraper costs engineering time, hosting and repairs when pages change; the endpoints cost 1 credit per successful call and return the same field names every time. The table compares them on a recurring job: tracking prices, discounts and order counts across a product category. | | DIY AliExpress scraper | AliExpress endpoints | | --- | --- | --- | | Search and sort | Build URLs, parse result cards | `search` with `query`, `page` and `sort` ( `default`, `orders`, `price_asc`, `price_desc`) | | Price | Split display text into amount and currency | `price.amount`, `price.currency`, `price.formatted` | | Discount | Compute from two parsed prices | `original_price` and `discount_percent` | | Order count | Rounded label as shown | `sold_count` as a number, `sold_text` as shown | | Sponsored placements | Detect from markup | `is_sponsored` per result | | Paging | Your loop, your stopping rule | `page`, `page_size`, `total_results`, `has_more` | | Price bounds | Your own filtering | `min_price`, `max_price`, `ship_from` | | Deeper data | More parsers per page type | `product`, `product-reviews`, `product-shipping`, `store` and others, 1 credit each | | When pages change | Parsers return blanks until fixed | Same JSON fields; no parser of yours to fix | | Failures | Yours to detect | HTTP status and error code; a failed call costs 0 credits | ### What does tracking a product cost? Every AliExpress call costs 1 credit, so the cost per product depends on how you collect. A category sweep reads search pages: the recording returned `page_size: 60`, so one call covers up to 60 products. A fixed watchlist calls [`product`](https://perceptlayer.com/apis/aliexpress/product) once per product, taking the `product_id`, the same name as the field in search results. Its response isn't recorded here, so check its fields in the playground. Two worked examples. A category sweep of 20 keywords, 5 pages each, once a day: 20 × 5 = 100 calls × 1 credit = 100 credits a day for up to 6,000 product rows, 3,000 credits over 30 days. The 100 free credits on signup cover the first day, and the 10,000-credit Starter pack covers 100 days. A watchlist of 200 products checked daily: 200 calls × 1 credit = 200 credits a day, 6,000 over 30 days, so the 50,000-credit Build pack covers 250 days. Shipping quotes add one [`product-shipping`](https://perceptlayer.com/apis/aliexpress/product-shipping) call per product per `country`. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## How do you sweep search pages in code? Loop over pages until `has_more` is false or you reach your page limit, and write one row per product per day keyed on `product_id`. This Python script does that with `sqlite3`. It reads only fields that appear in the recorded response, uses `.get()` for `promotion` because it can be missing, and skips sponsored results. ```python import datetime import os import sqlite3 import requests API = "https://api.perceptlayer.com/v1/aliexpress/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} KEYWORDS = ["wireless earbuds"] MAX_PAGES = 5 db = sqlite3.connect("aliexpress_prices.db") db.execute( """CREATE TABLE IF NOT EXISTS prices ( day TEXT, keyword TEXT, product_id TEXT, price REAL, currency TEXT, original_price REAL, discount_percent INTEGER, rating REAL, sold_count INTEGER, promotion TEXT, PRIMARY KEY (day, keyword, product_id))""" ) today = datetime.date.today().isoformat() for keyword in KEYWORDS: for page in range(1, MAX_PAGES + 1): params = {"query": keyword, "page": page, "sort": "orders"} r = requests.get(API, params=params, headers=HEADERS, timeout=60) r.raise_for_status() data = r.json()["data"] for p in data["results"]: if p.get("is_sponsored"): continue db.execute( "INSERT OR REPLACE INTO prices VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (today, keyword, p["product_id"], p["price"]["amount"], p["price"]["currency"], (p.get("original_price") or {}).get("amount"), p.get("discount_percent"), p.get("rating"), p.get("sold_count"), p.get("promotion")), ) print(keyword, "page", page, "credits left:", r.headers.get("X-Credits-Remaining")) if not data.get("has_more"): break db.commit() ``` A day-over-day change in `sold_count` for the same `product_id` is an order-velocity signal; a change in `price.amount` with a steady `original_price` is a discount change. If a request fails, `raise_for_status()` stops the run before that page is written, the call costs nothing, and the JSON body carries a code from the [errors docs](https://docs.perceptlayer.com/errors), such as `rate_limited` (429) with a `Retry-After` header. ## Which route fits your job? Pick by how often you collect and how much of the catalogue you need. A scraper's cost is upkeep; the endpoints' cost is 1 credit per call. These verdicts assume a recurring job. For checking a handful of listings once, the AliExpress site in a browser is enough. - **Category price and demand tracking**: sweep `search` with `sort=orders` for each keyword and store `price.amount`, `sold_count` and `discount_percent` by `product_id`. 1 credit per page of up to 60 products. - **Watching specific products**: call `product` per `product_id` daily. 1 credit per product per check. - **Landed cost by destination**: add `product-shipping` with a `country` for the products you care about. - **Product research for a store**: use `min_price`, `max_price` and `ship_from` on `search` to narrow before you read details, and [`product-reviews`](https://perceptlayer.com/apis/aliexpress/product-reviews) for what buyers report. Leave reviewers' names and profile details out of anything you store. - **An AI shopping or sourcing agent**: connect the AliExpress endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so the agent calls `search` instead of reading pages. - **Learning to scrape**: practise on a site built for it, not a live marketplace. [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) turns rows like these into alerts, [AliExpress API: product search and reviews](https://perceptlayer.com/blog/aliexpress-api-product-search-reviews) covers the product and review calls, and [eBay Scraper or API](https://perceptlayer.com/blog/ebay-scraper-vs-api) and [Walmart Scraper or API](https://perceptlayer.com/blog/walmart-scraper-vs-api) run the same comparison for other retailers. The [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists the rest. To check the fields for your own keyword, run [`search`](https://perceptlayer.com/apis/aliexpress/search) in the playground on the [AliExpress API page](https://perceptlayer.com/apis/aliexpress), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [AliExpress **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/aliexpress) ## Frequently asked questions ### Is scraping AliExpress allowed? That depends on AliExpress's terms, how you store and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks or challenges. Product prices and order counts are lower risk than personal data; leave reviewers' names and profile details out of anything you keep. ### How many products does one AliExpress search call return? The recorded search for `wireless earbuds` returned `page_size: 60` with `total_results: 16557` and `has_more: true`. The page size isn't documented as fixed, so read `page_size` and `has_more` from each response rather than hard-coding 60. Every page is a separate call at 1 credit. ### Why are there two sold fields? `sold_count` is a number and `sold_text` is the label as shown. In the recording, the first product had `sold_count: 17921` and `sold_text: "10,000+ sold"`, while the second had `250` and `"250 sold"`. Use `sold_count` for trends and calculations, and `sold_text` only when you need to show the label. ### Does a failed AliExpress call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Most AliExpress parameters are required, so a call missing one fails with `invalid_parameters` (422) and costs nothing. ### How fast can I run a daily AliExpress sweep? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 100-call sweep takes about two minutes. Paying accounts run at least 5 requests a second. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. aliexpress ecommerce price monitoring scraping marketplaces ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Google Shopping Scraper or API: What You Get](https://perceptlayer.com/blog/google-shopping-scraper-vs-api) A Google Shopping scraper vs one GET at 1 credit: the recorded iphone 15 search with source, extracted\_price and product\_id, and the cost per item tracked. --- title: "Expedia Scraper or API: What You Get | Perceptlayer" description: "An Expedia scraper vs 4 Expedia endpoints at 1 credit each: a recorded Paris search and rooms call with total_price, rate plans, and the cost per hotel-date." url: https://perceptlayer.com/blog/expedia-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Expedia Scraper or API: What You Get 8 Nov 2026 Perceptlayer 8 min read An Expedia scraper is code that runs a hotel search for a destination and a date range, reads each result's price, rating and position, then opens hotels for their rooms and rate plans. Every date pair and guest count is a different page, so the scraper's workload grows with the dates you track, not just the hotels. The alternative is four Expedia endpoints that return the same data as JSON at 1 credit per successful call. This post compares the two on a recorded Paris search and rooms call, prices tracking per hotel and date, and gives a verdict per use case. ## Key takeaways - A hotel price is only defined for a date pair and a guest count, so a scraper or an API call is one request per hotel or region per date pair. Cost is counted in hotel-dates, not hotels. - The recorded `GET /v1/expedia/hotels-search` for Paris, 2026-11-20 to 2026-11-23, returned `hotels[]` with `property_id`, `position`, `total_price`, `price_per_night`, `currency`, `sponsored` and `free_cancellation`, plus `total_results: 500`, `has_more: true` and `next_offset: 10`. - The first result, `property_id: "564660"`, is the `property_id` in the recorded `GET /v1/expedia/hotels-rooms` call for the same dates, which returned two rooms with two `rate_plans` each. - `original_price` appears on one search result and not the other, and both results shown are `sponsored: true`, so a rank or discount tracker has to treat both as fields, not assumptions. - Checking 20 hotels' rooms for 30 check-in dates is 20 × 30 = 600 calls × 1 credit = 600 credits per sweep. ## What does an Expedia scraper have to fetch, parse and maintain? An Expedia scraper is a search-results parser, a hotel-page parser and a scheduler that multiplies both by every date you care about. The search parser reads name, position, price and rating for each hotel in a region. The hotel parser reads rooms and their rate options. The scheduler decides which check-in dates, lengths of stay and guest counts to request, because each combination is its own page with its own prices. The parsing is the part that breaks. On a travel results page, one block can hold a price, a crossed-out price, a badge and a sponsored marker, and any site's layout changes as it ships new designs. On many sites prices arrive after the first page response, in which case a plain HTTP fetch returns a page without them and you end up running a browser. A price only means something next to the dates, guests and currency it was shown for, so the scraper also has to record what it asked for next to what it read. The operational layer is the same as for any scraper: pacing, retries, alerts when a run returns empty prices, and storage of raw pages for re-parsing. A large booking site has to tell people from automated traffic, so a job that requests hundreds of date pairs a day should expect slow responses and blocked requests; if that happens, stop rather than work around it. Read Expedia's terms of use before you build a collector. [Google Flights Scraper or API](https://perceptlayer.com/blog/google-flights-scraper-vs-api) covers the same date-multiplied problem for airfares. ## What do the Expedia endpoints return? The [Expedia API](https://perceptlayer.com/apis/expedia) has four `GET` endpoints, each costing 1 credit per successful call. Two of them, `hotels-search` and `hotels-rooms`, take dates and return prices; the other two look up a destination and a hotel's details. Dates go in as `check_in` and `check_out` strings in the form the recordings use, such as `2026-11-20`. | Endpoint | Returns | Required parameters | Optional parameters | | --- | --- | --- | --- | | `GET /v1/expedia/destinations` | Destinations | `query` | `limit` | | `GET /v1/expedia/hotels-search` | Hotels in a region for a date range | `check_in`, `check_out`, `region_id` | `adults`, `children`, `region_name`, `sort`, `limit`, `offset` | | `GET /v1/expedia/hotels-rooms` | Rooms and rate plans for one hotel | `check_in`, `check_out`, `property_id` | `adults`, `children` | | `GET /v1/expedia/hotels-detail` | Hotel detail | `property_id` | `check_in`, `check_out`, `adults` | `sort` takes `recommended`, `price_low_to_high` or `review`. `destinations` takes a place name as `query`; there's no recorded response for it here, so run it in the playground on the [Destinations page](https://perceptlayer.com/apis/expedia/destinations) to see what it returns before you rely on it for `region_id` values. The recorded search below uses `region_id=2734` with `region_name=Paris, France`. ## What do the recorded search and rooms calls show? The two recorded calls cover the same stay, three nights in Paris from 2026-11-20 for two adults, at two levels. The search returns one price per hotel in a ranked list; the rooms call returns each room and its rate plans for one of those hotels. The search's first `property_id`, `564660`, is the one the rooms call uses, so the recordings show the hand-off a scraper would make by following a link. ### The region search ```bash curl "https://api.perceptlayer.com/v1/expedia/hotels-search?region_id=2734®ion_name=Paris%2C+France&check_in=2026-11-20&check_out=2026-11-23&adults=2&limit=10" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "region_id": "2734", "check_in": "2026-11-20", "check_out": "2026-11-23", "hotels": [ { "property_id": "564660", "position": 1, "name": "Mercure Paris Centre Tour Eiffel", … "guest_rating": 8, "guest_rating_label": "Very good", "review_count": 1000, "total_price": 690, "price_per_night": 230, … "free_cancellation": false, "sponsored": true, … "currency": "EUR" }, { "property_id": "994215", "position": 2, … "total_price": 1203, "original_price": 1329, "price_per_night": 401, … "sponsored": true, … } ], "total_results": 500, "offset": 0, "has_more": true, "next_offset": 10 }, … } ``` ### The rooms call for the first hotel ```bash curl "https://api.perceptlayer.com/v1/expedia/hotels-rooms?property_id=564660&check_in=2026-11-20&check_out=2026-11-23&adults=2" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "property_id": "564660", … "currency": "EUR", "rooms": [ { "unit_id": "226385", "name": "Classic Room, 1 Double Bed", "features": ["18 sq m", "Sleeps 2"], … "rate_plans": [ { "rate_plan_id": "397104173", "total_price": 690, "price_per_night": 230 }, { "rate_plan_id": "397104181", "total_price": 825, "price_per_night": 275 } ] }, { "unit_id": "226392", "name": "Classic Room, 2 Single Beds", … "rate_plans": [ { "rate_plan_id": "397104205", "total_price": 700, "price_per_night": 233 }, … ] } ] }, … } ``` ## What in these responses still needs care? Named fields remove the parsing, not the interpretation. The recordings show five details a tracker has to handle, and a scraper would meet the same ones inside HTML. | Detail | What the recordings show | What to do | | --- | --- | --- | | Sponsored results | Both hotels shown have `sponsored: true`, at `position` 1 and 2 | Store `sponsored` with `position`; filter it out before you report organic rank | | Discounts | `original_price: 1329` appears on the second hotel only | Treat it as optional; a missing value means no crossed-out price, not zero | | Rounded nightly prices | Rate plan 397104205 has `total_price: 700` and `price_per_night: 233` for 3 nights | Compare stays on `total_price`; 700 ÷ 3 is 233.33 | | Currency | `currency: "EUR"` on each hotel and on the rooms response | Store it on every row; don't assume one currency across runs | | IDs as strings | `property_id: "564660"`, `region_id: "2734"`, `rate_plan_id: "397104173"` | Keep them as text; don't cast to integers | The search price for hotel 564660, `total_price: 690`, is the same as its cheapest rate plan in the rooms call. That holds for this pair of recordings; check it on your own hotels before you treat the search price as the lowest room rate. ## How do an Expedia scraper and the endpoints compare? A scraper costs engineering time, possibly browser automation, and terms and blocking risk; the endpoints cost 1 credit per successful call and return prices as numbers with a currency. The table compares them on a recurring job: tracking prices and rank for a set of hotels across upcoming dates. | | DIY Expedia scraper | Expedia endpoints | | --- | --- | --- | | Region search | Parse result cards per date pair | `hotels-search` with `region_id`, `check_in`, `check_out` | | Prices | Text to parse from each result card | `total_price`, `price_per_night`, `original_price` as numbers, plus `currency` | | Rank and ads | Infer from layout and badges | `position` and `sponsored` on each hotel | | Rooms and rate plans | A second parser per hotel page | `hotels-rooms`: `rooms[]` with `unit_id`, `name`, `features`, `amenities`, `rate_plans[]` | | Paging | Find and follow the site's paging | `limit` and `offset`; response has `total_results`, `has_more`, `next_offset` | | Joining records | Whatever ID the page exposes | `property_id` in search and rooms | | When the page changes | Parsers return blanks until fixed | Same JSON fields; no parser of yours to fix | | Failures | Yours to detect | HTTP status and error code; a failed call costs 0 credits | | Cost | Hosting, any browser automation, your time | 1 credit per successful call | ### What does each hotel-date cost? Cost follows calls, and every call is for one date pair. Room-level tracking is 1 credit per hotel per date pair: 20 hotels across the next 30 check-in dates is 20 × 30 = 600 calls × 1 credit = 600 credits per sweep. Run that daily and it's 18,000 credits over 30 days, inside the 50,000-credit Build pack. Region-level tracking is cheaper per hotel, because one search call covers a page of hotels. The recorded call used `limit=10` and returned `next_offset: 10`; at that page size, the top 50 hotels for one date pair is 5 calls, so 30 dates is 5 × 30 = 150 credits a day, or 4,500 credits over 30 days. Combine them by searching the region and calling `hotels-rooms` only for hotels whose `total_price` moved. The 100 free credits you get once on signup cover a test sweep of a few hotels. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ### A date sweep in Python This script searches Paris for 3-night stays starting on each of the next 7 days and stores one row per hotel per date in SQLite. It reads only fields in the recorded search response and costs 7 credits. ```python import os import sqlite3 from datetime import date, timedelta import requests API = "https://api.perceptlayer.com/v1/expedia/hotels-search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} db = sqlite3.connect("expedia_prices.db") db.execute( """CREATE TABLE IF NOT EXISTS prices ( run_date TEXT, check_in TEXT, property_id TEXT, position INTEGER, name TEXT, total_price REAL, currency TEXT, sponsored INTEGER, PRIMARY KEY (run_date, check_in, property_id))""" ) today = date.today() for offset in range(1, 8): check_in = today + timedelta(days=offset) params = { "region_id": "2734", "region_name": "Paris, France", "check_in": check_in.isoformat(), "check_out": (check_in + timedelta(days=3)).isoformat(), "adults": 2, "limit": 10, } r = requests.get(API, params=params, headers=HEADERS, timeout=60) r.raise_for_status() for h in r.json()["data"].get("hotels", []): db.execute( "INSERT OR REPLACE INTO prices VALUES (?, ?, ?, ?, ?, ?, ?, ?)", (today.isoformat(), check_in.isoformat(), h["property_id"], h.get("position"), h.get("name"), h.get("total_price"), h.get("currency"), int(bool(h.get("sponsored")))), ) db.commit() ``` A failed call raises before its rows are written and costs nothing. The [errors docs](https://docs.perceptlayer.com/errors) list the codes, such as `rate_limited` (429), which comes with a `Retry-After` header. Paging past the first 10 uses `offset`; the response's `next_offset` has the matching name, so check the second page in the playground before you loop on it. ## Which route fits your job? Pick by how many dates you track and what you do with the prices: a scraper's cost is upkeep that grows with every date pair, the endpoints' cost is 1 credit per call. These verdicts assume a recurring job; for one trip, open Expedia in a browser. - **Rate parity or competitor pricing for a set of hotels**: call `hotels-rooms` per hotel per date pair and store `rate_plan_id`, `total_price` and `currency`. 1 credit per hotel-date. - **Market price levels for a destination**: run `hotels-search` per date pair with `sort=price_low_to_high` or `recommended` and store `total_price` by `property_id`. - **Rank and visibility tracking**: run `hotels-search` with the same parameters each day and store `position` with `sponsored`, so ads don't distort the trend. - **Discount tracking**: store `original_price` where it appears and compare it with `total_price`. - **An AI agent planning trips**: give it the Expedia endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `hotels-search` instead of browsing. - **Learning to scrape**: build against a practice site, not a booking platform. [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) compares three hotel sources, [Expedia Hotels API: Search Hotels and Rooms as JSON](https://perceptlayer.com/blog/expedia-hotels-api-search-json) walks through the flow step by step, and the [travel APIs](https://perceptlayer.com/verticals/travel) page lists the rest. To check prices for your own city and dates, run `hotels-search` in the playground on the [Expedia API page](https://perceptlayer.com/apis/expedia), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Expedia **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/expedia) ## Frequently asked questions ### Is scraping Expedia allowed? That depends on Expedia's terms of use and the law where you operate, so read the terms and get legal advice before collecting at commercial scale. Don't get around blocks, challenges or other protections. Hotel prices, ratings and room names are business data; if you collect reviews later, leave reviewers' names and profiles out of what you store. ### How many credits does tracking one hotel cost? Each successful call costs 1 credit and covers one date pair. Tracking one hotel's rooms for 30 check-in dates is 30 credits per sweep; doing it daily is 900 credits over 30 days. Searching a region instead covers a page of hotels per call, so it costs less per hotel when you track many in one city. ### Does the search price match the room price? In the recorded calls for hotel 564660, 2026-11-20 to 2026-11-23, the search returned `total_price: 690` and the cheapest rate plan in the rooms call was also `total_price: 690`. That is one pair of recordings, not a rule. Call `hotels-rooms` when you need every rate plan, and compare on `total_price` rather than the rounded `price_per_night`. ### Does a failed Expedia call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A client timeout is different: the request may have succeeded and been billed, so check `X-Credits-Remaining` before retrying a large sweep. ### How fast can I run a 600-call sweep? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so 600 calls take 10 minutes. Paying accounts run at least 5 requests a second (300 a minute), which brings the sweep to 2 minutes. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. expedia hotel prices scraping travel data rate monitoring ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Booking.com Scraper or API: What You Get](https://perceptlayer.com/blog/booking-com-scraper-vs-api) A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read ## [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) Expedia, Booking.com and Google Hotels hotel endpoints compared on recorded Paris searches: price as numbers or strings, hotel IDs, 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 9 min read ## [Vrbo Scraper or API: What You Get](https://perceptlayer.com/blog/vrbo-scraper-vs-api) A Vrbo scraper vs 6 endpoints at 1 credit a call: a recorded Lake Tahoe search with stay\_total, nightly\_original and rating, and the cost per listing. --- title: "Redfin Scraper or API: What You Get | Perceptlayer" description: "A Redfin scraper vs 14 Redfin endpoints at 1 credit each: recorded Seattle locations, search, property and valuation calls, and the cost per home tracked." url: https://perceptlayer.com/blog/redfin-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Redfin Scraper or API: What You Get 8 Nov 2026 Perceptlayer 9 min read A Redfin scraper is code that loads Redfin's region and home pages and pulls price, beds, baths, status and sale history out of whatever the page sends back. You write and maintain the fetching, the parsing and the checks that tell you when either broke. The alternative is the 14 Redfin endpoints on Perceptlayer, which return the same kinds of data as named JSON fields at 1 credit per successful call. This post follows one Seattle home through four recorded calls, prices a watch list per home, and gives a verdict per use case. ## Key takeaways - The recorded chain runs `locations` → `search` → `property` and `valuation`: `region_id: 16163`, `region_type: 6` and `market: "seattle"` from locations are the search parameters, and `property_id: 124182` with `listing_id: 224635828` from search are the property and valuation parameters. - A recorded `GET /v1/redfin/search` for Seattle reports `count: 350`; each home carries `property_id`, `listing_id`, `price`, `beds`, `baths`, `sqft`, `year_built`, `status` and `mls_number`. - The same home has `property_type: 1` in search and `property_type: 6` in property, and its `status` is the text `"Coming Soon"` in search but the number `8` in property. Don't join or filter across endpoints on those codes. - The recorded valuation returned `lastSoldPrice: 1050000` with `lastSoldDate` in epoch milliseconds, and `sectionPreviewText: "Estimate Not Available"`. - Checking a 200-home watch list once a day with `property` costs 200 calls × 1 credit = 200 credits a day, or 6,000 credits over 30 days. ## What does a Redfin scraper have to fetch, parse and keep working? A Redfin scraper is four jobs, and each one needs upkeep. It has to turn a place name into the region the site uses, page through the homes in that region, open each home for detail and sale history, and notice when any step starts returning less than it did yesterday. None of these is hard to write once. The cost is that all of them depend on page structure you don't control. Resolving a region means parsing a search box's suggestions or a region page and keeping whatever identifier it uses. Paging means finding how results are split and how to request the next set. Home detail means a parser per page type, because a condo, a house and a sold home don't always show the same blocks. If valuations and sale history load separately from the main page, as they do on many sites, that's one more request and one more parser per home. Then comes the operational layer every scraper shares: pacing requests, retrying failures, storing raw pages so you can re-parse them, and alerting when a run returns empty prices for homes that had them. A large site also has to separate people from automated traffic, so a daily job at volume should expect slow responses and blocked requests. If that happens, stop; working around a site's protections is not a fix we recommend. Read Redfin's terms of use before you build a collector, and keep agents' and owners' personal details out of anything you store. ## What do the Redfin endpoints return instead? The [Redfin API](https://perceptlayer.com/apis/redfin) has 14 `GET` endpoints, each costing 1 credit per successful call and returning JSON. They cover the four scraper jobs above plus data a scraper would need extra parsers for: price history, nearby and similar homes, schools, scores, open houses, sold homes and market trends. Every one takes either a region ( `region_id` and `region_type`, often with `market`) or a home ( `property_id`, sometimes with `listing_id`). | Job | Endpoint | Required parameters | | --- | --- | --- | | Turn a place name into a region | `GET /v1/redfin/locations` | `query` | | Homes for sale in a region | `GET /v1/redfin/search` | `region_id`, `region_type`, `market` | | Recently sold homes | `GET /v1/redfin/sold` | `region_id`, `region_type`, `market` | | Open houses | `GET /v1/redfin/open-houses` | `region_id`, `region_type`, `market` | | Market trends for a region | `GET /v1/redfin/market-trends` | `region_id`, `region_type` | | One home's details | `GET /v1/redfin/property` | `property_id` | | One home's valuation | `GET /v1/redfin/valuation` | `property_id` | | Price and sale history | `GET /v1/redfin/history` | `property_id` | | Schools and scores | `GET /v1/redfin/schools`, `GET /v1/redfin/scores` | `property_id` | | Nearby and similar homes | `GET /v1/redfin/nearby`, `GET /v1/redfin/similar` | `property_id`, `listing_id` | | Agents | `GET /v1/redfin/agents`, `GET /v1/redfin/agent` | `region_id` and `region_type`, or `slug` | `search` also filters on `min_price`, `max_price`, `num_beds`, `num_baths`, `property_types`, `status` (one of 1, 9, 130 or 131) and `sold_within_days`, and pages with `num_homes` and `page`. Several endpoints accept `country`, with `ca` allowed on `locations`, `search`, `history`, `market-trends` and `scores`. The endpoint pages, such as [Locations](https://perceptlayer.com/apis/redfin/locations), [Property](https://perceptlayer.com/apis/redfin/property) and [History](https://perceptlayer.com/apis/redfin/history), list every parameter and have a playground. ## How does one home move through the recorded calls? Four recorded calls take Seattle from a typed name to one home's detail and valuation, and each call's output is the next call's input. `locations` returns the region values that `search` needs; `search` returns the `property_id` and `listing_id` that `property` and `valuation` take. That is the same chain a scraper builds out of four parsers, with the IDs already extracted. ### Step 1: find the region ```bash curl "https://api.perceptlayer.com/v1/redfin/locations?query=Seattle%2C+WA" \ -H "X-API-Key: $API_KEY" ``` ```json { "data": { "locations": [ { "name": "Seattle", "subName": "Seattle, WA, USA", "region_id": 16163, "region_type": 6, "region_type_name": "city", "market": "seattle", … }, { "name": "West Seattle", … "region_id": 3040, "region_type": 1, "region_type_name": "neighborhood", "market": "seattle", … } ], … } } ``` The response also lists the `region_type` codes it uses: 1 neighborhood, 2 zip, 5 county, 6 city. A neighborhood such as West Seattle is its own region, so you can watch part of a city without filtering the whole of it. ### Step 2: search the region ```bash curl "https://api.perceptlayer.com/v1/redfin/search?region_id=16163®ion_type=6&market=seattle&sold_within_days=30" \ -H "X-API-Key: $API_KEY" ``` ```json { "data": { "properties": [ … { "property_id": 124182, "listing_id": 224635828, "address": "2517 25th Ave W", "city": "Seattle", "state": "WA", "zip": "98199", "price": 2750000, "beds": 3, "baths": 4, "sqft": 3570, "lot_size": 5120, "year_built": 2005, "property_type": 1, "status": "Coming Soon", … "mls_number": "2222589287335410617" } ], "count": 350, "region_id": 16163, "region_type": 6 } } ``` ### Step 3: property and valuation for one home The recorded property and valuation calls both use `property_id=124182&listing_id=224635828`, the values from the search result above: ```bash curl "https://api.perceptlayer.com/v1/redfin/valuation?property_id=124182&listing_id=224635828" \ -H "X-API-Key: $API_KEY" ``` ```json { "data": { "listingTimezone": "US/Pacific", "numBeds": 3, "numBaths": 4, … "listingPrice": 2750000, "lastSoldPrice": 1050000, "lastSoldDate": 1285830000000, … "searchStatusId": 8, … "sectionPreviewText": "Estimate Not Available", … "propertyId": 124182 } } ``` The property response for the same home returns `price: 2750000`, `price_label: "Listed at Price"`, `property_type: 6`, `status: 8`, coordinates and a `photos` list with `url` and `fullscreen_url` for each image. ## What in the JSON still needs care? The endpoints remove the parsing, not the thinking. The recorded responses show four things to handle in your own code, and a scraper would face each of them too, buried in HTML instead of named fields. | What | Where it shows | What to do | | --- | --- | --- | | Different codes for the same home | `property_type` is 1 in search, 6 in property; `status` is `"Coming Soon"` in search, `8` in property | Store each endpoint's value as is, labelled by source; join on `property_id` only | | Different field names | `property_id` and `price` in search and property; `propertyId` and `listingPrice` in valuation | Map names per endpoint when you load them | | Dates as numbers | `lastSoldDate: 1285830000000` is epoch milliseconds, with `soldDateTimeZone: "US/Pacific"` | Divide by 1,000 and convert in that zone: 2010-09-30 | | No estimate | `sectionPreviewText: "Estimate Not Available"` on a listed home | Check it before you count a home as valued | The valuation response also carries fields that change from call to call, such as `queryId` and a `random` object. Leave them out of anything you diff, or every run will look like a change. ## How do a Redfin scraper and the endpoints compare? A scraper costs engineering time and carries terms and blocking risk; the endpoints cost 1 credit per successful call and hand you the IDs, prices and statuses as fields. The table compares the two on a recurring job: watching a set of homes, or one region, for new listings, price changes and status changes. | | DIY Redfin scraper | Redfin endpoints | | --- | --- | --- | | Region lookup | Parse suggestions or a region page | `locations` returns `region_id`, `region_type`, `market` | | Homes in a region | Parse result pages, find the paging | `search`, `sold` and `open-houses`, with `num_homes` and `page` | | One home | A parser per page layout | `property` with `price`, `beds`, `baths`, `sqft`, `year_built`, `status`, `photos` | | Sale history and valuation | Extra requests and parsers per home | `history` and `valuation` by `property_id`, 1 credit each | | Joining records | Whatever ID you can find on the page | `property_id` and `listing_id` in every recorded response that names a home | | When the page changes | Parsers return blanks until you fix them | Same JSON fields; no parser of yours to fix | | Failures | Yours to detect | HTTP status and error code; a failed call costs 0 credits | | Speed | As fast as you can fetch without being blocked | 1 request a second free; at least 5 a second on paid credits | | Cost | Hosting, proxies if you use them, your time | 1 credit per successful call | ### What does each tracked home cost? On the endpoints, cost follows calls. A watch list of known homes costs 1 credit per home per check with `property`, so 200 homes checked daily is 200 calls × 1 credit = 200 credits a day, or 6,000 credits over 30 days. Adding a weekly `valuation` for the same 200 homes is 200 × 4 = 800 credits a month. The total, 6,800 credits, fits inside the 10,000-credit Starter pack. Watching a whole region is cheaper per home, because one `search` call returns many homes. The cost is the number of pages × 1 credit; the recorded Seattle search reports `count: 350`, so check in the playground how many homes one page holds for your `num_homes`, then divide. The 100 free credits you get once on signup cover the first few days of either plan, enough to test the fields on your own market. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ### A daily check in Python This script runs the recorded chain for one city and prints price, status and last sale for the first five homes. It reads only fields that appear in the recordings and uses `.get` for ones a home may not have. It costs 1 + 1 + 5 = 7 credits. ```python import os from datetime import datetime, timezone import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): r = requests.get(BASE + path, headers=HEADERS, params=params, timeout=60) r.raise_for_status() return r.json()["data"] region = get("/v1/redfin/locations", query="Seattle, WA")["locations"][0] homes = get( "/v1/redfin/search", region_id=region["region_id"], region_type=region["region_type"], market=region["market"], )["properties"] for home in homes[:5]: val = get("/v1/redfin/valuation", property_id=home["property_id"], listing_id=home["listing_id"]) sold_ms = val.get("lastSoldDate") sold = datetime.fromtimestamp(sold_ms / 1000, timezone.utc).date() if sold_ms else None print(home["property_id"], home["address"], home.get("price"), home.get("status"), val.get("lastSoldPrice"), sold, val.get("sectionPreviewText")) ``` A failed call raises before anything prints and costs nothing. The [errors docs](https://docs.perceptlayer.com/errors) list the codes, such as `rate_limited` (429), which comes with a `Retry-After` header. ## Which route fits your job? Pick by how often the job runs and what you'll do with the data: a scraper's cost is upkeep, the endpoints' cost is calls. These verdicts assume a repeating job; to look at three homes before a viewing, open Redfin in a browser and skip both. - **New listings and price changes in one area**: run `search` daily for the region, store `property_id`, `price`, `status` and the run date, and diff on `property_id`. - **A fixed watch list of homes**: call `property` per home daily at 1 credit each, and `history` when the price or status changes. - **Sold comparables for pricing a home**: use `sold` for the region, with filters such as `sold_within_days`, `num_beds` and `min_price`, or `similar` for one home, whose `type` takes `listings` or `solds`. - **Valuation work**: call `valuation`, check `sectionPreviewText` first, and keep `lastSoldPrice` and `lastSoldDate` as the anchor when no estimate is available. - **Area trends rather than single homes**: start with `market-trends` for a city, zip or county instead of aggregating listings yourself. - **An AI agent answering housing questions**: give it the Redfin endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `locations` and `search` instead of browsing. - **Learning to scrape**: build against a practice site, not a property portal. [Zillow Scraper or API](https://perceptlayer.com/blog/zillow-scraper-vs-api) covers the same trade-off for Zillow, [Redfin API: Search Homes, Then Property and Valuation](https://perceptlayer.com/blog/redfin-api-property-valuation) walks through the valuation flow step by step, and the [real estate APIs](https://perceptlayer.com/verticals/real-estate) page lists the other property sources. To check the fields on your own market, run `locations` and then `search` in the playground on the [Redfin API page](https://perceptlayer.com/apis/redfin), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Redfin **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/redfin) ## Frequently asked questions ### Is scraping Redfin allowed? That depends on Redfin's terms of use, the terms attached to any listing data you store, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Listing facts such as price, beds and status carry less risk than personal data; leave agents' and owners' names and contact details out of what you keep. ### How do I get the region\_id for a Redfin search? Call `GET /v1/redfin/locations` with a `query` such as `Seattle, WA`. The recorded response returned `region_id: 16163`, `region_type: 6` and `market: "seattle"` for the city, and `region_id: 3040` with `region_type: 1` for the West Seattle neighborhood. Pass all three values to `search`, `sold` or `open-houses`. The lookup costs 1 credit. ### Why does the valuation say "Estimate Not Available"? The recorded valuation for property 124182, a listed home, returned `sectionPreviewText: "Estimate Not Available"` alongside `listingPrice`, `lastSoldPrice` and `lastSoldDate`. Data is returned as found at the time of the call, so check that field before you treat a home as valued, and fall back to the last sale or `sold` comparables when it's missing. ### Does a failed Redfin call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A client timeout is different: the request may have succeeded and been billed, so check `X-Credits-Remaining` before retrying a large batch. ### How fast can I run a daily Redfin job? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 200-home check takes just over three minutes. Paying accounts run at least 5 requests a second (300 a minute), and faster rates can be chosen at checkout. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. redfin real estate scraping property data home valuation ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 26 Oct 2026 Perceptlayer 8 min read ## [Zillow Scraper or API: Listing Data Without Upkeep](https://perceptlayer.com/blog/zillow-scraper-vs-api) Compare a Zillow scraper with Zillow endpoints at 1 credit a call: a recorded Seattle search with zpid, price and Zestimate, and the cost per listing per day. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Oct 2026 Updated 24 Oct 2026 Perceptlayer 7 min read ## [Redfin API: Search Homes, Then Property and Valuation](https://perceptlayer.com/blog/redfin-api-property-valuation) Four Redfin endpoints at 1 credit each: find a region, search homes with a real JSON response, then call property and valuation by property\_id. --- title: "Glassdoor Scraper or API: What You Get | Perceptlayer" description: "A Glassdoor scraper vs 1-credit company, review and salary calls: recorded Stripe data, 157 pages for a full review backfill, and the weekly cost per company." url: https://perceptlayer.com/blog/glassdoor-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Glassdoor Scraper or API: What You Get 7 Nov 2026 Perceptlayer 8 min read A Glassdoor scraper is code that finds a company's pages, then pulls its rating, reviews and salary figures out of them and pages through the rest. You maintain the company lookup, the parsers for each page type and the paging yourself. The other route is the Glassdoor endpoints, which return the same company, review and salary data as JSON at 1 credit a call. This post compares the two on recorded Stripe and salary responses, works out the cost per company tracked, and gives a verdict per use case. ## Key takeaways - A Glassdoor scraper needs three parsers (company, reviews, salaries), an ID lookup to connect them, and paging logic that can resume after a failed run. - `GET /v1/glassdoor/companies-search?query=Stripe` returned Stripe with `id: 671932`, `rating: 3.8`, `review_count: 1619` and `salary_count: 4702`; the recorded reviews call used that `id` as `employer_id`. - The recorded reviews call returned page 1 of `total_pages: 157` for `total_reviews: 1564`, so a full backfill at that paging is 157 calls × 1 credit = 157 credits. - `GET /v1/glassdoor/salaries` returns pay percentiles from `p10` to `p90` per employer, plus an `estimate` block with a `confidence` value and a `salaries_count`. - Watching 200 companies' ratings and newest reviews weekly is 200 × 2 = 400 credits a week; all 13 Glassdoor endpoints are standard tier and cost 1 credit. ## What does a Glassdoor scraper have to handle? A Glassdoor scraper handles three page types, each with its own parser: a company profile with its rating and counts, a review list that runs to many pages, and salary pages organised by job title. On top of that it needs a lookup that turns a company name into the identifier the other pages use, because "Stripe" alone matches more than one employer. Each piece needs upkeep. Pages change as the site ships features, and a parser that misses a field writes empty columns instead of failing, so you also need a monitor that compares each run with the last. Review lists are long, so the pager has to remember where it stopped and resume rather than restart after a timeout. Any large site also has to separate people from automated traffic, so a scraper running at volume should expect slow responses, challenge pages and blocked requests. When that happens, stop: getting around a site's protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. Then there's what you're allowed to collect. Read Glassdoor's terms before you build anything, and plan from the start to keep reviewers' personal details out of what you store. [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) covers fetchers and parsers in general, if you're weighing the build. ## How do you find the right company? You find a company with `GET /v1/glassdoor/companies-search`, which takes a `query` and returns matching employers with an `id`, a rating and counts. That `id` is the `employer_id` every company endpoint takes. It's the step a scraper does by parsing search pages, and it matters because one name can match several employers. ```bash curl "https://api.perceptlayer.com/v1/glassdoor/companies-search?query=Stripe" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed: ```json { "success": true, "data": { "query": "Stripe", "companies": [ { "id": 671932, "name": "Stripe", … "rating": 3.8, "review_count": 1619, "salary_count": 4702, "job_count": 3 }, { "id": 5554043, "name": "Stripe OLT", … "rating": 4, "review_count": 24, "salary_count": 38, "job_count": 0 } ], "page": 1, "total_pages": 5, "has_more": true }, … } ``` Two employers match "Stripe", and the second has 24 reviews against the first's 1,619. Pick by `review_count` or by checking `name` exactly, then store the `id` so later runs skip the lookup. For a tracker that only needs the headline numbers, this one call already returns `rating`, `review_count`, `salary_count` and `job_count` per company. ## What does the reviews endpoint return? `GET /v1/glassdoor/companies-reviews` takes an `employer_id` and returns a page of reviews with paging fields, for 1 credit. The recorded call used `employer_id=671932`, the `id` from the search above, and came back with the company name, page 1 of 157 and `has_more: true`. ```bash curl "https://api.perceptlayer.com/v1/glassdoor/companies-reviews?employer_id=671932" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to review content, with reviewer details left out: ```json { "success": true, "data": { "company": { "id": 671932, "name": "Stripe", … }, "reviews": [ { "id": 106035163, "date": "2026-10-20T11:12:55Z", "summary": "Progressive environment with intense performance expectations", "pros": "Progressive workplace environment\nGood benefits\nGood compensation", "cons": "Intense performance ecosystem\nOffice is moving to less convenient location", "rating": 4, … }, { "id": 106018689, "date": "2026-10-19T08:08:16Z", "summary": "Strong product suite but limited career growth", … "rating": 3, "ratings": { "career_opportunities": 3, "compensation_and_benefits": 3, "culture_and_values": 3, "diversity_and_inclusion": 4, "senior_leadership": 3, "work_life_balance": 3 }, … } ], "page": 1, "total_pages": 157, "total_reviews": 1564, "has_more": true }, … } ``` Three details matter for a tracker. The sub-scores in `ratings` appear on the second review and not the first, so treat that object as optional. Each review has an `id` and an ISO `date`, which give you a key to de-duplicate on and a time to sort by. And the counts differ between endpoints: search reported `review_count: 1619` while reviews reported `total_reviews: 1564` for the same `id`. Pick one source for your headline number and keep it consistent. Each review also carries fields about the reviewer's role, location and employment status; leave them out of what you keep unless you have a lawful basis to store them. ## What does the salaries endpoint return? `GET /v1/glassdoor/salaries` takes a `job_title` and returns pay figures per employer, plus an overall `estimate` for the title. It also takes an optional `employer_id`, the same name the company endpoints use. A scraper would parse each figure from salary pages; here each one is a named number with its currency and pay period. ```bash curl "https://api.perceptlayer.com/v1/glassdoor/salaries?job_title=software+engineer" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to one employer and the estimate: ```json { "success": true, "data": { "job_title": "software engineer", "salaries": [ { "job_title": "Software Engineer", "job_title_id": 4279, "employer": { "id": 9079, "name": "Google", … "rating": 4.4 }, "currency": "USD", "pay_period": "ANNUAL", "base_pay_mean": 184722.83, "additional_pay_mean": 126972.82, "total_pay": { "p10": 207909.08, … "p50": 311695.65, … "p90": 486503.67 } }, … ], "page": 1, "total_pages": 10438, "total_results": 104377, "has_more": true, "estimate": { "job_title": "Software Engineer", "currency": "USD", "pay_period": "ANNUAL", "location": "United States", "confidence": "CONFIDENT", "salaries_count": 727155, … "total_pay": { "p10": 99464.84, … "p50": 152101.59, … "p90": 237195.82 } } }, … } ``` The unfiltered title query reports 10,438 pages, which is not something to page through. For the companies you follow, try the `employer_id` parameter with the `id` from search in the playground and check what comes back before you build on it. For an overall figure, the `estimate` block already gives percentiles for the title with a `location`, a `confidence` value and a `salaries_count`. ## How does a scraper compare with the endpoints? A scraper costs engineering time and carries blocking and terms risk; the endpoints cost credits per call and take the parsing, ID lookup and paging state off your hands. The table compares them for a recurring job, such as watching a list of employers every week. | | DIY Glassdoor scraper | Glassdoor endpoints | | --- | --- | --- | | Setup | Company lookup, three parsers, pager, storage, monitoring | API key in the `X-API-Key` header | | Finding a company | Parse search pages, choose a match | `companies-search` returns `id`, `rating`, `review_count` per match | | Reviews | Parse each page, track where you stopped | `reviews[]` with `id`, `date`, `summary`, `pros`, `cons`, `rating`; `page`, `total_pages`, `has_more` | | Salaries | Parse figures and units from pages | `total_pay` `p10` to `p90`, `currency`, `pay_period`, plus an `estimate` | | When pages change | Your parsers write empty fields until you notice | Named JSON fields; no parser of yours to fix | | Blocks and challenges | Yours to handle; expect them at volume | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### What does a company cost to track? On the endpoints, cost follows calls. A full review backfill for Stripe at the recorded paging is 157 calls × 1 credit = 157 credits, once. After that, a weekly watch needs two calls per company: `companies-search` for the rating and counts, and page 1 of `companies-reviews` for the newest reviews, which in the recording are listed with the latest `date` first. So watching 200 companies weekly is 200 × 2 = 400 credits a week, or 1,600 credits over four weeks, inside the Starter pack's 10,000. Adding one `salaries` call per company for a single job title adds 200 credits each time you run it. The 100 free credits on signup cover a first pass over 50 companies, enough to check the fields. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how calls are debited. ## How do you pull new reviews in code? Look up the company once, store its `id`, then fetch page 1 of reviews each run and keep the reviews whose `id` you haven't stored. The script below reads only fields from the recorded responses and uses standard Python: `requests` for the calls and `csv` for output. It writes review content and leaves reviewer fields out. ```python import csv import os import requests BASE = "https://api.perceptlayer.com/v1/glassdoor" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): resp = requests.get(f"{BASE}/{path}", headers=HEADERS, params=params, timeout=30) if resp.status_code != 200: raise RuntimeError(resp.json().get("error", {}).get("code")) return resp.json()["data"] companies = get("companies-search", query="Stripe")["companies"] company = max(companies, key=lambda c: c.get("review_count") or 0) print(company["name"], company["id"], "rating", company.get("rating")) page = get("companies-reviews", employer_id=company["id"]) seen = set() if os.path.exists("reviews.csv"): with open("reviews.csv", newline="") as f: seen = {row["id"] for row in csv.DictReader(f)} new_file = not seen with open("reviews.csv", "a", newline="") as f: writer = csv.DictWriter(f, fieldnames=["id", "date", "rating", "summary", "pros", "cons"]) if new_file: writer.writeheader() for r in page.get("reviews", []): if str(r.get("id")) in seen: continue writer.writerow({k: r.get(k) for k in writer.fieldnames}) print("page", page.get("page"), "of", page.get("total_pages"), "has_more", page.get("has_more")) ``` Each run costs 2 credits per company. A failed call raises with the error `code` and costs nothing; a 429 or 503 response carries a `Retry-After` header with the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain per-minute limits. ## Which route fits your job? Choose by how many companies you follow and which data you need, because that decides whether upkeep or per-call cost dominates. The verdicts below assume a recurring job; to read one company's reviews once, open Glassdoor in a browser. - **Employer reputation tracking** for a list of companies: run `companies-search` weekly for `rating` and `review_count`, and page 1 of `companies-reviews` for new reviews. That's 2 credits per company per week. - **Review text analysis** for one company: backfill with `companies-reviews` and `page` up to `total_pages`, 157 credits for Stripe at the recorded paging. Store `summary`, `pros`, `cons`, `rating` and `date`. - **Compensation benchmarking**: call `salaries` with a `job_title`, try `employer_id` for the companies you follow, and use the `estimate` block for the market figure. Don't page through unfiltered titles. - **Hiring signals**: [`companies-jobs`](https://perceptlayer.com/apis/glassdoor/companies-jobs) takes an `employer_id` and optional parameters such as `keyword`, `remote_only` and `location_id`. [Jobs API](https://perceptlayer.com/blog/jobs-api-comparison) compares it with other job sources, and [Glassdoor salary data](https://perceptlayer.com/blog/glassdoor-salary-data-api) covers the salary endpoints. - **Candidate research before an interview**: [`companies-interviews`](https://perceptlayer.com/apis/glassdoor/companies-interviews) and [`companies-benefits`](https://perceptlayer.com/apis/glassdoor/companies-benefits) each take an `employer_id`, 1 credit a call. - **An agent answering questions about employers**: give it the Glassdoor endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. To check the fields for the companies you care about, run `companies-search` in the playground on the [Glassdoor API page](https://perceptlayer.com/apis/glassdoor), then `companies-reviews` with the `id` it returns. When they fit, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Glassdoor **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/glassdoor) ## Frequently asked questions ### Is scraping Glassdoor allowed? That depends on Glassdoor's terms and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Company-level figures such as ratings and review counts are a different matter from data about individual reviewers, which you should leave out unless you have a lawful basis. ### How many calls does a full review history take? One call per page. The recorded reviews call for Stripe returned `total_pages: 157` and `total_reviews: 1564`, so reading every page at that paging takes 157 calls, or 157 credits. Use `has_more` to stop, and store each review's `id` so a resumed run skips what it already has. ### Why do review\_count and total\_reviews differ? They come from different endpoints. In the recordings, `companies-search` reported `review_count: 1619` for Stripe while `companies-reviews` reported `total_reviews: 1564` for the same `employer_id`. Data is returned as found at the time of each call, so pick one field for your headline number and use it consistently. ### Can I get salaries for one company? `GET /v1/glassdoor/salaries` takes a required `job_title` and an optional `employer_id`, the same parameter name the company endpoints use for the `id` from `companies-search`. Run it in the playground with that value to see the results before you build on them. Each successful call costs 1 credit, and the recorded response includes `total_pay` percentiles per employer and an `estimate` block. ### Does a failed Glassdoor call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. glassdoor scraping company reviews salary data employer data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Glassdoor API: Company Reviews and Salaries as JSON](https://perceptlayer.com/blog/glassdoor-salary-data-api) Find a Glassdoor employer ID, then pull reviews and salary percentiles as JSON. Real responses, parameters and 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. --- title: "Google News Scraper or API: What You Get | Perceptlayer" description: "A Google News scraper vs a 1-credit news call: the recorded response with iso_date, source and story_token, and 4 credits per tracked query per day." url: https://perceptlayer.com/blog/google-news-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google News Scraper or API: What You Get 7 Nov 2026 Perceptlayer 8 min read A Google News scraper is code that loads Google News result pages for your queries, pulls each article's headline, link, publisher and time out of the page, and keeps doing it on a schedule without missing or repeating stories. You maintain the fetching, the parsing, the date handling and the de-duplication yourself. The other route is `GET /v1/google-news/news`, which returns the same results as JSON for 1 credit a call. This post compares the two on a recorded response, works out the cost per tracked query, and gives a verdict per use case. ## Key takeaways - A news scraper has four jobs to maintain: fetching result pages, parsing each item, turning displayed dates into timestamps, and recognising articles it has already stored. - `GET /v1/google-news/news?q=technology` returns `news_results[]` with `position`, `title`, `link`, `snippet`, `iso_date`, `published_at`, `date`, `source.name` and `story_token`, plus `menu_links[]` with `topic_token` values. - The recorded `date` field reads "2 days ago" and "today", while `iso_date` holds the exact time, such as `2026-10-20T15:59:45+00:00`. A scraper reading the displayed text has to convert it; the JSON already has both. - Tracking one query four times a day costs 4 calls × 1 credit = 4 credits a day, or 120 credits over 30 days. Failed calls cost 0. - All 9 Google News endpoints are standard tier and cost 1 credit per successful call. ## What does a Google News scraper have to do? A Google News scraper does four jobs, and each one needs upkeep. It fetches result pages for every query, topic or publication you follow. It parses each result into a headline, an article link, a publisher, a snippet and a time. It converts the time into something you can sort on. And it remembers what it stored last run, so a story that stays in the results for two days isn't counted twice. Fetching is the part people plan for, and it's the part with the least control. Any large site has to separate people from automated traffic, so a scraper that runs several times an hour across many queries should expect slow responses, challenge pages and blocked requests. When that happens, stop and reconsider: getting around a site's protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. Read Google's terms before you build a collector. Parsing is the part that fails quietly. Result pages change as the site ships features, and a parser that misses a field doesn't raise an error; it writes empty columns. So a news scraper also needs a monitor that compares each run's row counts and empty fields with the last one. [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) covers fetchers and parsers in general, if you're weighing the build. ### Why are dates and duplicates the hard part? Dates and duplicates are where news scrapers go wrong after the parser works. A results page often shows a relative time, such as "2 days ago", which only means something next to the moment you fetched it. Convert it late or with the wrong clock and every article in a run shifts. And the same article can appear across runs, queries and topics, so you need a stable key to de-duplicate on. The recorded response shows both problems and the fields that solve them. The first item's `date` is "2 days ago" and the second's is "today", but each also carries `iso_date` and `published_at` with the exact time. Each item's `link` points at the publisher's own article URL, such as `https://www.bbc.com/news/videos/cq0ld7e0jg2eo`, which makes a usable de-duplication key. ## What does the news endpoint return? `GET /v1/google-news/news` returns a page of news results as JSON, one object per article, each with the fields a scraper would otherwise parse. Every parameter is optional: `q` takes a search term of up to 500 characters, and `topic_token`, `publication_token`, `section_token`, `story_token` and `kgmid` are string parameters whose names match tokens in the response. A successful call costs 1 credit. This is the recorded request: ```bash curl "https://api.perceptlayer.com/v1/google-news/news?q=technology" \ -H "X-API-Key: $API_KEY" ``` And the recorded response, trimmed to the first result and one menu link: ```json { "news_results": [ { "position": 1, "title": "Top Strategic Technology Trends for 2027", "link": "https://www.gartner.com/en/articles/top-technology-trends-2027", "type": "article", "snippet": "Explore Gartner's Top Strategic Technology Trends for 2027 — 10 trends that will shape autonomy, resilience and governance in the years...", "iso_date": "2026-10-20T15:59:45+00:00", "published_at": "2026-10-20 15:59:45 UTC", "date": "2 days ago", … "source": { "name": "Gartner", … "title": "Gartner" }, "story_token": "CBMib0FVX3lxTE1zMGNNN1p0UTdtOXV0U3RoU2JvSGlYUXpQYTZIeEFvcHZGZVpiazBjZ2UyZ0ZhVzZ6NUl3c3Y3LTdCWUVfYVd1YnZuMFdtVElGcHlsR3IwM1BnYXBQNGZueEdldUZJOWM0UnRTQ3Y0WQ", "related_publications": [ { "title": "Gartner", … "publication_token": "CAAqJQgKIh9DQklTRVFnTWFnMEtDMmRoY25SdVpYSXVZMjl0S0FBUAE" } ] }, … ], "menu_links": [ { "title": "U.S.", … "topic_token": "CAAqIggKIhxDQkFTRHdvSkwyMHZNRGxqTjNjd0VnSmxiaWdBUAE" }, … ] } ``` Three things in this response replace scraper code. `iso_date` replaces relative-date conversion. `link` is the publisher's URL, ready to store and de-duplicate on. And the tokens carry their own names: each result has a `story_token` and `related_publications[].publication_token`, and `menu_links[]` carries `topic_token` values. Those names match parameters on the news endpoint, and `story_token` also matches the required parameter of the story endpoint, so try them in the playground to see what each returns before you build on them. ### Which other endpoints would a scraper otherwise cover? A scraper that follows more than keyword searches ends up parsing several page types: headlines, topic pages, local news, publisher pages and story clusters. The Google News API has an endpoint for each, all `GET`, all 1 credit per successful call, all standard tier. | Endpoint | What it's for | Parameters | | --- | --- | --- | | [`/v1/google-news/news`](https://perceptlayer.com/apis/google-news/news) | Results for a query or a token | `q`, `topic_token`, `publication_token`, `story_token`, `kgmid`, `so`, `start`, `page` and more | | [`/v1/google-news/search`](https://perceptlayer.com/apis/google-news/search) | Search with `when`, `after` and `before` | `q` (required), `when` ( `1h`, `1d`, `7d`, `1y`), `after`, `before` | | [`/v1/google-news/headlines`](https://perceptlayer.com/apis/google-news/headlines) | Headlines | `hl`, `gl` | | `/v1/google-news/topic` | A topic | `topic` ( `WORLD`, `NATION`, `BUSINESS`, `TECHNOLOGY` and others), `topic_token` | | [`/v1/google-news/stories`](https://perceptlayer.com/apis/google-news/stories) | Stories for a topic | `topic`, `topic_token` | | [`/v1/google-news/story`](https://perceptlayer.com/apis/google-news/story) | One story | `story_token`, `hl`, `gl` (all required) | | [`/v1/google-news/local`](https://perceptlayer.com/apis/google-news/local) | Local news | `city` (required) | | [`/v1/google-news/publication`](https://perceptlayer.com/apis/google-news/publication) | A publisher's page | `domain`, `publication_token` | | [`/v1/google-news/decode`](https://perceptlayer.com/apis/google-news/decode) | Decode | `article_id`, `url` | Most endpoints also take `hl` and `gl`. The [Google News API page](https://perceptlayer.com/apis/google-news) lists every parameter, and [News API Options](https://perceptlayer.com/blog/news-api-comparison) compares these endpoints with general web search for news. [Google News API](https://perceptlayer.com/blog/google-news-api) walks through the calls step by step. ## How does a scraper compare with the endpoints? A scraper costs engineering time and carries blocking and terms risk; the endpoints cost credits per call and take the parsing and date handling off your hands. The table compares them for a recurring job, such as following 50 queries through the day. | | DIY Google News scraper | Google News endpoints | | --- | --- | --- | | Setup | Fetcher, parser per page type, date conversion, storage, monitoring | API key in the `X-API-Key` header | | What you get | Whatever you parse from each page | `news_results[]` with `title`, `link`, `snippet`, `iso_date`, `source.name`, `story_token` | | Dates | Displayed text such as "2 days ago", converted by you | `iso_date` and `published_at`, plus the displayed `date` | | When the page changes | Your parser writes empty fields until you notice | Named JSON fields; no parser of yours to fix | | Blocks and challenges | Yours to handle; expect them at volume | Not yours; a failed call returns an error code and costs 0 | | Other page types | A new parser each | 9 endpoints: headlines, topic, stories, story, local, publication, search, decode | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### What does a tracked query cost? On the endpoints, cost follows calls, and one call returns a page of results for one query. So the useful unit is a query tracked per day, not an article. Polling one query four times a day is 4 calls × 1 credit = 4 credits a day, or 120 credits over 30 days. Scale that to a media monitor. Following 50 queries four times a day is 50 × 4 = 200 calls a day, or 200 × 30 = 6,000 credits a month, inside the Starter pack's 10,000. The 100 free credits on signup cover the first half day of that plan, which is enough to check the fields against your own queries. Adding a daily `headlines` call for five countries adds 5 × 30 = 150 credits a month. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how calls are debited. ## How do you store only new articles? Store each article once, keyed on `link`, and skip any link you've seen before. That turns a poll that returns overlapping results into a feed of new articles. The script below uses only fields from the recorded response and standard Python: `requests` for the call and `sqlite3` for storage. ```python import os import sqlite3 import requests API = "https://api.perceptlayer.com/v1/google-news/news" HEADERS = {"X-API-Key": os.environ["API_KEY"]} QUERIES = ["technology", "semiconductors"] db = sqlite3.connect("news.db") db.execute( "CREATE TABLE IF NOT EXISTS articles (" "link TEXT PRIMARY KEY, query TEXT, title TEXT, source TEXT, iso_date TEXT)" ) for q in QUERIES: resp = requests.get(API, headers=HEADERS, params={"q": q}, timeout=30) if resp.status_code != 200: print(q, resp.status_code, resp.json().get("error", {}).get("code")) continue for item in resp.json().get("news_results", []): cur = db.execute( "INSERT OR IGNORE INTO articles VALUES (?, ?, ?, ?, ?)", ( item.get("link"), q, item.get("title"), (item.get("source") or {}).get("name"), item.get("iso_date"), ), ) if cur.rowcount: print("new:", item.get("iso_date"), item.get("title")) print(q, "credits left:", resp.headers.get("X-Credits-Remaining")) db.commit() ``` A failed call prints the error `code` and costs nothing. A 429 or 503 response carries a `Retry-After` header with the seconds to wait, which a scheduled job should honour before retrying. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) show how per-minute limits are counted. ## Which route fits your job? Choose by how many queries you follow and how often, because that decides whether upkeep or per-call cost dominates. The verdicts below assume a recurring job; for reading the news once, open Google News in a browser and skip both. - **Media or brand monitoring across many queries**: use `news` on a schedule and store `link`, `title`, `source.name` and `iso_date`, keyed on `link`. At four polls a day it's 4 credits per query per day. - **Alerts on recent coverage**: try `search`, whose `when` parameter takes `1h`, `1d`, `7d` or `1y` and which also takes `after` and `before`; compare its results with `news` in the playground for your query. - **Following one publisher**: if the publisher offers its own feed or API, check that first, since it's first-party. To follow many publishers in one shape, use `publication` with a `domain`. - **Story-level analysis**, such as how many outlets covered one event: store each result's `story_token` and try it on the `story` endpoint in the playground before you rely on it. - **An agent answering questions about current events**: give it the Google News endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `news` or `search` instead of browsing pages. - **Learning how scraping works**: build a scraper against a practice site, not a news aggregator. To check the fields against your own topics, run `news` with your query in the playground on the [Google News API page](https://perceptlayer.com/apis/google-news). When the shape fits, [get a free API key](https://perceptlayer.com/signup) and point the script above at your queries. ## APIs in this post - [Google News **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-news) ## Frequently asked questions ### Is scraping Google News allowed? That depends on Google's terms, the publishers' terms for any article content you store, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Storing headlines, links and publish times is a different question from copying full article text, which each publisher controls. ### Does the news endpoint return the full article text? No. Each result in the recorded response has a `title`, a `snippet`, a `link` to the publisher's article and publish times, not the article body. If you need the text, follow `link` to the publisher, subject to that publisher's terms. For most monitoring jobs the headline, snippet, source and time are what you store. ### How do I get exact publish times instead of "2 days ago"? Read `iso_date`, which in the recorded response holds values such as `2026-10-20T15:59:45+00:00`, or `published_at`, which holds the same time as `2026-10-20 15:59:45 UTC`. The `date` field keeps the relative text as displayed. Sort and filter on `iso_date`, and store it with every article. ### How much does it cost to monitor 50 queries? Each successful call costs 1 credit. Polling 50 queries four times a day is 200 calls a day, or 6,000 credits over 30 days, inside the Starter pack's 10,000 credits. Failed calls cost nothing and return `X-Credits-Used: 0`. The 100 free credits on signup are granted once, not monthly. ### Does a failed Google News call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait before you try again. google news scraping news monitoring media monitoring json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 27 Oct 2026 Perceptlayer 8 min read ## [News API Options: Google News and Search as JSON](https://perceptlayer.com/blog/news-api-comparison) Compare three news API routes: Google News returns headline, source.name, iso\_date and link per article; web search endpoints don't. 1 credit a query. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Sept 2026 Updated 22 Oct 2026 Perceptlayer 7 min read ## [Google News API: Search News Articles as JSON](https://perceptlayer.com/blog/google-news-api) One GET call to /v1/google-news/news returns articles with title, link, source and ISO date as JSON for 1 credit. Parameters, a real response, cost. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "Tripadvisor Scraper or API: What You Get | Perceptlayer" description: "A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location_id, type, rating and review_count, and the cost per place tracked." url: https://perceptlayer.com/blog/tripadvisor-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Tripadvisor Scraper or API: What You Get 7 Nov 2026 Perceptlayer 8 min read A Tripadvisor scraper is code you write and keep running to search Tripadvisor, open hotel, restaurant and attraction pages, and pull out names, ratings, review counts and reviews from the HTML. The alternative is three Tripadvisor endpoints, `search`, `place` and `reviews`, that return that data as JSON for 1 credit per successful call. This post compares the two on a recorded search, shows which fields you get without writing a parser, prices a recurring watch per place, and gives a verdict per use case. ## Key takeaways - A recorded `GET /v1/tripadvisor/search` for `pizza rome` returned results with `position`, `location_id`, `name`, `type`, `location`, `url`, `rating` and `review_count`. - Both results in that recording were tours with `type: attraction`, not pizzerias. The search mixes place types unless you set `type` to `hotel`, `restaurant`, `attraction` or `destination`. - `place` and `reviews` both take a `location_id`, the same parameter name as the field in search results. In the recording, each result's `url` also contains its `location_id` after a `d`. - Checking 40 places once a day with one `place` call each costs 40 calls × 1 credit = 40 credits a day, 1,200 credits over 30 days. The 100 free credits on signup cover the 40 searches and the first day. - Every endpoint costs 1 credit per successful call; a failed call costs nothing and returns `X-Credits-Used: 0`. ## What would a Tripadvisor scraper have to handle? A Tripadvisor scraper has three jobs: turn a name or a phrase into the right listing, read that listing's current numbers, and collect its reviews over time. Each job is a parser you write against pages you don't control, plus the scheduling, retries and storage around it. Travel listings add one wrinkle: hotels, restaurants, attractions and destinations are different kinds of page, so a scraper that handles one type well often needs separate parsing for the others. Resolving a listing is the first parser. A search returns several candidates, and your code has to pick the one you meant and record an identifier that stays stable when the name or the URL slug changes. Reading the numbers is a second parser, per page type. Collecting reviews is the third and the most work: a popular attraction has thousands of reviews across many pages, so a recurring run needs an order, a stopping rule and a way to recognise reviews it already stored. Around those parsers sits the operational layer: request pacing, retries with backoff, alerts when a run returns empty fields for a place that had numbers yesterday, and storage that keeps reviewers' personal details out. Read Tripadvisor's terms before you build a collector, and if a site blocks or challenges your traffic, stop rather than work around it. None of this is hard to build once. The cost is keeping it working every week after that. ## What does one Tripadvisor search call return? One search call returns a ranked list of places, each with a `location_id`, its `type`, a human-readable `location`, the Tripadvisor `url`, an `image`, the `rating` and the `review_count`. Those are the fields a scraper's first parser would extract, already named and typed. The request takes a query `q` (up to 255 characters) and optional `locale`, `limit` and `type`. This is the recorded request: ```bash curl "https://api.perceptlayer.com/v1/tripadvisor/search?q=pizza+rome&limit=3" \ -H "X-API-Key: $API_KEY" ``` And the recorded response, trimmed: ```json { "success": true, "data": { "query": "pizza rome", "results": [ { "position": 1, "location_id": 11449818, "name": "Pompeii from Rome with Optional Mt. Vesuvius & Pizza Lunch", "type": "attraction", "location": "Rome, Lazio, Italy", … "url": "https://www.tripadvisor.com/AttractionProductReview-g187791-d11449818-Pompeii_from_Rome_with_Optional_Mt_Vesuvius_Pizza_Lunch-Rome_Lazio.html", "rating": 4.7, "review_count": 1617 }, { "position": 2, "location_id": 28122604, "name": "Rome Pizza & Gelato Class with Wine by Cooking Italy", "type": "attraction", … "rating": 5, "review_count": 1492 } ] }, "meta": { "endpoint_family": "search", "billable": true } } ``` ### What does the recording teach about the data? Three details are worth building around. First, the query `pizza rome` returned a day tour and a cooking class, both `type: attraction`, not restaurants. A free-text search matches across place types, so set `type=restaurant` when you want pizzerias. Second, `rating` is `4.7` on one result and `5` on the other: read it as a number, not as a string with one decimal place. Third, `location_id` is an integer, and the `url` of each result contains it after a `d` ( `d11449818`, `d28122604`). Store the `location_id` as your key and the `url` as a reference. ### How do search, place and reviews fit together? The three endpoints share one parameter name. Search results carry a `location_id` field, and both `GET /v1/tripadvisor/place` and `GET /v1/tripadvisor/reviews` require a `location_id` parameter. We only have a recorded search, so we can't show here what `place` or `reviews` return. Run both in the playground on the [Tripadvisor API page](https://perceptlayer.com/apis/tripadvisor) with an ID from a search before you write code against their fields. | Endpoint | Required | Optional | | --- | --- | --- | | [`/v1/tripadvisor/search`](https://perceptlayer.com/apis/tripadvisor/search) | `q` (up to 255 characters) | `locale` (up to 10 characters), `limit`, `type` | | [`/v1/tripadvisor/place`](https://perceptlayer.com/apis/tripadvisor/place) | `location_id` (integer) | `locale` (up to 10 characters) | | [`/v1/tripadvisor/reviews`](https://perceptlayer.com/apis/tripadvisor/reviews) | `location_id` (integer) | `offset`, `limit`, `language` | The `type` parameter takes one of `hotel`, `restaurant`, `attraction` or `destination`. The reviews endpoint pages with `offset` and `limit` and can narrow by `language`; check the page size you get in the playground rather than assuming one. ## How do a Tripadvisor scraper and the endpoints compare? A scraper costs engineering time, hosting and the risk of breaking when a page changes; the endpoints cost 1 credit per successful call and return the same named fields every time. The table compares them on a recurring job: tracking a set of hotels, restaurants or attractions for rating and review changes. | | DIY Tripadvisor scraper | Tripadvisor endpoints | | --- | --- | --- | | Finding a place | Parse search results, pick the right one | `search` with `q`, narrowed by `type`; match on `location_id` | | Place types | A parser per page type | One response shape, with a `type` field per result | | Rating and volume | Parsed from each page | `rating` and `review_count` in every search result | | Stable key | Extracted from the URL or page | `location_id`, an integer | | Reviews | Parsed per page, paging found by you | `reviews` with `offset`, `limit` and `language` | | Localisation | Your own handling per site version | `locale` on `search` and `place` | | When the page changes | Parsers return blanks until fixed | Same JSON fields; no parser of yours to fix | | Failures | Yours to detect | HTTP status and error code; a failed call costs 0 credits | | Cost | Hosting and your time | 1 credit per successful call | ### What does tracking a place cost? Cost follows calls, and every Tripadvisor call is 1 credit. Resolving each place is one search, done once. Tracking it can then go two ways. If you only need `rating` and `review_count`, a single search can return several places per call, so the cost per place depends on how many of your places one query returns. If you track a fixed list by ID, one `place` call per place per check is the predictable unit. A worked example: a hotel group watching 40 competitor properties once a day spends 40 calls × 1 credit = 40 credits a day, 1,200 credits over 30 days and 14,600 over a year. The 100 free credits on signup cover the initial 40 searches and one day of the watch; after that you need a pack. The 50,000-credit Build pack covers the year with room for reviews calls. Adding a daily `reviews` call per place doubles the count to 80 credits a day. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## How do you snapshot search results in code? Store one row per result per day, keyed on `location_id`, and compare today's `rating` and `review_count` with yesterday's. This Python script runs a search per query with `type` set, and writes the fields that appear in the recorded response to a CSV file. It reads nothing else, so an unexpected response shape fails loudly instead of writing guesses. ```python import csv import datetime import os import requests API = "https://api.perceptlayer.com/v1/tripadvisor/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} QUERIES = [("pizza rome", "restaurant"), ("cooking class rome", "attraction")] FIELDS = ["position", "location_id", "name", "type", "location", "url", "rating", "review_count"] today = datetime.date.today().isoformat() with open("tripadvisor_snapshot.csv", "a", newline="") as f: writer = csv.writer(f) for q, place_type in QUERIES: r = requests.get(API, params={"q": q, "type": place_type}, headers=HEADERS, timeout=60) r.raise_for_status() print(q, "credits used:", r.headers.get("X-Credits-Used")) for result in r.json()["data"]["results"]: writer.writerow([today, q] + [result.get(k) for k in FIELDS]) ``` `raise_for_status()` stops the run on an error before anything is written, and a failed call costs nothing. The JSON body names the problem: such as `invalid_parameters` (422) or `rate_limited` (429) with a `Retry-After` header. The [errors docs](https://docs.perceptlayer.com/errors) list every code. A client timeout is the one case to handle with care: the request may have succeeded and been billed, so don't retry it in a tight loop. ## Which route fits your job? Pick by frequency and scope. A scraper's cost is ongoing upkeep across several page types; the endpoints' cost is one credit per call. These verdicts assume the job repeats. For a one-time look at a few places, open Tripadvisor in a browser. - **Watching a competitive set of hotels or restaurants**: resolve each `location_id` once with `search` and `type`, then check each place on a schedule. 1 credit per place per check. - **Mapping a market by rating and volume**: run `search` per category and city, store `rating` and `review_count` by `location_id`, and compare week to week. - **Reading what guests say**: call `reviews` with `offset` and `limit`, and `language` to keep one language per analysis run. Drop reviewers' names and profile details before you store anything. - **Building a travel agent that recommends places**: connect the Tripadvisor endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so the agent calls `search` with a `type` instead of reading pages. - **Learning to scrape**: practise on a site built for it, not on a review platform with real people's posts. For hotel prices rather than reviews, [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) covers rate data. [Yelp Scraper or API](https://perceptlayer.com/blog/yelp-scraper-vs-api) runs the same comparison for local businesses, and the [reviews APIs](https://perceptlayer.com/verticals/reviews) page lists the other review sources. To see the fields for a place you care about, run `search` and then `place` in the playground on the [Tripadvisor API page](https://perceptlayer.com/apis/tripadvisor), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Tripadvisor **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/tripadvisor) ## Frequently asked questions ### Is scraping Tripadvisor allowed? That depends on Tripadvisor's terms, how you store and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks or challenges. Ratings and review counts for a business are lower risk than personal data; leave reviewers' names, usernames and avatars out of anything you keep. ### How do I find a location\_id? Run `GET /v1/tripadvisor/search` with the place's name and set `type` to narrow the results. Each result carries a `location_id`, an integer such as `11449818` in the recording. In that recording each result's `url` also contained its `location_id` after a `d`, but check that with your own links in the playground before relying on it. ### Why did a pizza search return tours? The recorded search for `pizza rome` set no `type`, and both results came back as `type: attraction`: a day tour with a pizza lunch and a pizza-making class. A free-text search matches across place types. Set `type=restaurant` for restaurants, `hotel` for hotels, or `destination` for destinations, and check the `type` field on each result. ### Does a failed Tripadvisor call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a script can log what each run spent. ### How fast can I run a daily Tripadvisor job? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so 40 daily calls finish within a minute. Paying accounts run at least 5 requests a second. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. tripadvisor travel reviews scraping hospitality ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 7 min read ## [Trustpilot Scraper or API: Ratings and Review History](https://perceptlayer.com/blog/trustpilot-scraper-vs-api) A Trustpilot scraper vs a 1-credit company-reviews call: the recorded Amazon response, its star breakdown, and 2,340 pages × 1 credit for a full history. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read ## [Yelp Scraper or API: Reviews Without the Upkeep](https://perceptlayer.com/blog/yelp-scraper-vs-api) A Yelp scraper vs three 1-credit endpoints: a recorded Gary Danko search whose alias feeds the reviews call, with rating, text, created\_at and next\_after. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Google Maps Scraper or Places Data API: What You Get](https://perceptlayer.com/blog/google-maps-scraper-vs-api) Compare building a Google Maps scraper with the official Places API and place endpoints at 1 credit a call: fields, upkeep, terms and a verdict per use case. --- title: "Airbnb Scraper or API: What You Get | Perceptlayer" description: "An Airbnb scraper vs search, listing and reviews endpoints at 1 credit a call: a recorded Paris search with price.amount, price_breakdown and coordinates." url: https://perceptlayer.com/blog/airbnb-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Airbnb Scraper or API: What You Get 6 Nov 2026 Perceptlayer 9 min read An Airbnb scraper fetches search and listing pages for a place and a set of dates, then pulls price, rating, beds and coordinates out of whatever the page returns. You maintain the fetching, the parsing and the checks that tell you when it broke. The alternative is three Airbnb endpoints that return those fields as JSON for 1 credit per successful call. Below, a recorded Paris search shows what you get, and the cost is worked out per listing tracked. ## Key takeaways - An Airbnb price is only meaningful with its context: the listing, `checkin`, `checkout`, guest counts and `currency`. A scraper or an API has to capture all five for every row you store. - `GET /v1/airbnb/search` requires only `place`. The recorded Paris search returned `price.amount` 714 `EUR` for `nights` 4, plus `price_breakdown`, `bedrooms`, `beds`, `bathrooms`, `latitude` and `longitude`. - One listing in the recorded search has `rating` 5 and `review_count` 17; the other has neither field. Parse both as optional, whichever route you take. - Search, listing and reviews each cost 1 credit per successful call, and failed calls return `X-Credits-Used: 0`. A search page that returns R listings costs 1 ÷ R credits per listing. - A scraper still makes sense for fields the three endpoints don't return, or for a one-off look at a handful of listings. ## What is one Airbnb data point, and why do dates matter? One Airbnb data point is not a listing; it's a listing quoted for specific dates, a specific party and a specific currency. The same apartment shows a different total for a weekend in November than for a week in July, and a different total for two adults than for four. If you store a price without the query that produced it, you can't compare it with anything later. That is the first design decision for either route, and it's the same decision. Whatever collects the data has to record `checkin`, `checkout`, the guest counts, the `currency` and the time of the call alongside each price. The search endpoint takes all of those as parameters: `checkin`, `checkout`, `adults`, `children`, `infants`, `pets` and `currency`. The listing endpoint takes `checkin`, `checkout` and `adults`. A scraper has to build the same query into a URL or a form and confirm the page honoured it. The second consequence is volume. Tracking 100 listings across four date windows is 400 observations per run, not 100. Keep that multiplier in mind when you read the cost section below. ## What does a scraper have to get right for each row? A scraper for a large travel site is four jobs, and each one fails differently. None of this is specific to Airbnb's systems; it's what any collector for a site that size has to handle. Before you build one, read Airbnb's terms of service and decide whether your use is one you can defend. ### Fetching the right page You need a search query that reproduces a visitor's search for a place, dates and guests, and a way to confirm the response matches it. Large sites distinguish people from automated traffic, so expect slow responses, challenge pages and blocks at volume. Treat a block as a signal to stop. Getting around a site's protections isn't something we'd recommend. ### Finding the fields Whether the price is in the HTML, in data embedded in the page, or loaded by a later request is something you find out by inspecting the page. That answer can change without notice. The price itself comes as display text, so you also parse currency symbols, thousands separators and phrases like "for 4 nights" into numbers. ### Paging through a market One search page holds only part of a city's listings. Your scraper has to find the next page, follow it, and stop at the end without repeating or skipping listings when results shift between requests. ### Noticing when it broke Scrapers rarely fail loudly. A changed page usually produces rows with empty prices or a sudden drop in result count, not an exception. You need checks that compare today's run with yesterday's and alert you, plus someone to fix the parser when they fire. ## What does the search endpoint return for the same row? The search endpoint returns each listing as named, typed JSON, with the stay price already split into amount, currency and nights. Here is the request from the recording: Paris, four nights from 10 November 2026, two adults, prices in euros. ```bash curl "https://api.perceptlayer.com/v1/airbnb/search?place=Paris--France&checkin=2026-11-10&checkout=2026-11-14&adults=2¤cy=EUR" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed with `…`, shows both listings with the fields a price tracker reads. The response echoes the place back as `"Paris, France"`. ```json { "success": true, "data": { "place": "Paris, France", "results": [ { "id": "1669612146929039736", "url": "https://www.airbnb.com/rooms/1669612146929039736", "title": "Apartment in Paris", … "rating": 5, "review_count": 17, "price": { "amount": 714, "currency": "EUR", "nights": 4, "qualifier": "for 4 nights" }, "price_breakdown": [ { "description": "4 nights x €178.34", "amount": 713.37 } ], "bedrooms": 1, "beds": 1, "bathrooms": 1, "latitude": 48.84223, "longitude": 2.29241, "badges": [ "Guest favorite" ], … }, { "id": "1789244334462111444", … "price": { "amount": 765, "currency": "EUR", "nights": 4, "qualifier": "for 4 nights" }, … "bedrooms": 1, "beds": 2, "bathrooms": 1, "latitude": 48.8419, "longitude": 2.3529, … } ], "has_more": true, "next_cursor": "eyJzZWN0aW9uX29mZnNldCI6MCwiaXRlbXNfb2Zmc2V0IjoxOCwidmVyc2lvbiI6MX0=" }, "meta": { "endpoint_family": "stay_search", "billable": true } } ``` Two details are worth noting before you build on this. First, `price.amount` is a rounded stay total: 714 for the first listing, while its `price_breakdown` line says `4 nights x €178.34` with an `amount` of 713.37. If you need the exact nightly figure, read it from the breakdown. Second, the second listing has no `rating`, `review_count` or `badges`, so code that indexes those fields directly will fail on it. For more pages, the response ends with `has_more` and `next_cursor`, and the endpoint takes a `cursor` string of up to 200 characters. The names match; test the hand-off on the [Airbnb search endpoint page](https://perceptlayer.com/apis/airbnb/search) before relying on it. ## Scraper or endpoint: how do they compare field by field? Field for field, both routes can reach the same listing data; the difference is who turns the page into numbers and who fixes it when that stops working. The table compares them for a recurring job, such as a weekly price snapshot of one city. | What you need | DIY Airbnb scraper | Airbnb endpoints | | --- | --- | --- | | Listing identity | Parse an ID out of a link | `id` and `url` | | Stay price | Parse display text into a number and a currency | `price.amount`, `price.currency`, `price.nights` | | Nightly rate | Parse it from the breakdown text | `price_breakdown[].description` and `amount` | | Size | Parse "1 bedroom · 2 beds" style text | `bedrooms`, `beds`, `bathrooms` as numbers | | Location | Find coordinates in the page, if they're there | `latitude`, `longitude` | | Ratings | Parse, and handle listings without one | `rating`, `review_count`, optional per listing | | Next page | Find and follow the site's pagination | `has_more`, `next_cursor`, and a `cursor` parameter | | Single listing and reviews | Separate page parsers for each | `/v1/airbnb/listing` and `/v1/airbnb/reviews`, both by `listing_id` | | When it breaks | Empty fields until your checks notice | An HTTP status and an error `code`; failed calls cost 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free; at least 5 a second on paid credits | | Running cost | Hosting, proxies if you use them, and your time | 1 credit per successful call | The endpoints don't remove every job. You still store the query context with each row, decide which listings to follow, and handle errors. The [errors docs](https://docs.perceptlayer.com/errors) list each code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain the per-minute counting. ## What does each tracked listing cost in credits? On the endpoints, cost follows calls, not listings. A search call costs 1 credit whatever it returns, so if a page returns R listings, each costs 1 ÷ R credits for that date window. A listing call or a reviews page is 1 credit for one listing. The sizes below are example numbers, not measurements; count `data.results` on your own search before you plan around a page size. Suppose you track a Paris neighbourhood that takes 25 search pages to cover, for four date windows, once a day. That's 25 pages × 4 windows = 100 calls × 1 credit = 100 credits a day. On top of that, you refresh the listing detail and one reviews page for 200 listings once a month. | Job | Calls | Credits | | --- | --- | --- | | Daily search, 25 pages × 4 date windows | 100 a day | 100 a day | | Same, over 30 days | 3,000 | 3,000 | | Monthly listing detail, 200 listings | 200 | 200 | | Monthly reviews, first page for 200 listings | 200 | 200 | | Total for 30 days | 3,400 | 3,400 | The 100 free credits you get once, after verifying an email address, cover exactly one day of the search part, which is enough to see whether the fields fit. The full month is 3,400 credits, inside the Starter pack's 10,000, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how `X-Credits-Used` and `X-Credits-Remaining` report spend. Failed calls cost nothing, so a run that hits errors doesn't drain your balance. One caveat: requests have no idempotency key, so a call whose reply your client timed out on may have succeeded and been billed. ## How do you store dated price rows from code? Store each result with the query that produced it, so later runs compare like with like. The script below runs one search and writes one row per listing into SQLite with the dates, guest count, currency and fetch time. It reads only fields from the recorded response and uses `.get()` throughout, because the second recorded listing shows that some fields are absent. ```python import os import sqlite3 from datetime import datetime, timezone import requests QUERY = { "place": "Paris--France", "checkin": "2026-11-10", "checkout": "2026-11-14", "adults": 2, "currency": "EUR", } resp = requests.get( "https://api.perceptlayer.com/v1/airbnb/search", params=QUERY, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) resp.raise_for_status() print("credits used:", resp.headers.get("X-Credits-Used")) db = sqlite3.connect("airbnb_prices.db") db.execute( """CREATE TABLE IF NOT EXISTS prices ( fetched_at TEXT, listing_id TEXT, checkin TEXT, checkout TEXT, adults INTEGER, amount REAL, currency TEXT, nights INTEGER, rating REAL, review_count INTEGER, latitude REAL, longitude REAL )""" ) fetched_at = datetime.now(timezone.utc).isoformat() for item in resp.json()["data"]["results"]: price = item.get("price") or {} db.execute( "INSERT INTO prices VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", ( fetched_at, item.get("id"), QUERY["checkin"], QUERY["checkout"], QUERY["adults"], price.get("amount"), price.get("currency"), price.get("nights"), item.get("rating"), item.get("review_count"), item.get("latitude"), item.get("longitude"), ), ) db.commit() db.close() ``` We have no recorded run of this script, so try it on one search first. Get a key on the [free sign-up page](https://perceptlayer.com/signup) and export it as `API_KEY`; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the `api_key` query parameter for clients that can't set headers. ## Which should you use for your job? Pick by how often the job runs and which fields it needs, because that decides whether parser upkeep or per-call credits dominate. These verdicts assume the data you need is in the fields shown above. - **Daily or weekly price tracking for a city**: use `/v1/airbnb/search` with fixed `checkin`, `checkout`, `adults` and `currency`, and store each row with its query. Cost is 1 credit per page per date window. - **Comparing size and location against price**: the search results already carry `bedrooms`, `beds`, `bathrooms`, `latitude` and `longitude`, so you don't need a call per listing. - **Watching a fixed set of known listings**: call `/v1/airbnb/listing` with each `listing_id` and your dates, at 1 credit per listing per check. Open the [Airbnb listing endpoint page](https://perceptlayer.com/apis/airbnb/listing) to see its fields before you design the table. - **Review text for sentiment or quality work**: use `/v1/airbnb/reviews` with `limit` and `offset`, and see the [Airbnb reviews endpoint page](https://perceptlayer.com/apis/airbnb/reviews). Keep reviewers' names out of anything you store. - **A field none of the endpoints return**: a narrow scraper for that one field may be justified, after you've read the terms. - **Five listings, once**: open them in a browser. Neither a scraper nor an API is worth setting up. - **An AI agent answering stay questions**: expose the endpoints through the MCP server as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so the agent calls search instead of browsing pages. For the full parameter tables of all three endpoints, see [Airbnb listings data API: search, details and reviews](https://perceptlayer.com/blog/airbnb-listings-data-api). For hotels rather than rentals, [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) compares the options, and the [travel APIs](https://perceptlayer.com/verticals/travel) page lists the rest. Next step: run the Paris search with your own dates in the playground on the [Airbnb API page](https://perceptlayer.com/apis/airbnb). ## APIs in this post - [Airbnb **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/airbnb) ## Frequently asked questions ### Is scraping Airbnb allowed? That depends on Airbnb's terms of service, how you use the data, and the law where you operate, so read the terms and take legal advice for commercial use. Don't get around blocks or other protections. Listing facts such as price, beds and coordinates are lower risk than personal data; leave hosts' and reviewers' names and photos out of anything you keep. ### How much does an Airbnb API call cost? Each successful call to search, listing or reviews costs 1 credit, and failed calls cost nothing and return `X-Credits-Used: 0`. Every account gets 100 free credits once, after email verification, with no credit card. Credit packs start at 10,000 credits, and purchased credits last 12 months. See the pricing page for what credits cost. ### Why does the same listing show different prices? A search price is the total for the dates, guests and currency you asked for. In the recorded Paris search, `price.amount` is 714 `EUR` for `nights` 4, while the breakdown shows €178.34 a night and 713.37 in total. Change `checkin`, `checkout` or `adults` and the total changes, so store those values with every price. ### How do I get more than one page of search results? The recorded search response ends with `has_more: true` and a `next_cursor` string, and the search endpoint takes an optional `cursor` parameter of up to 200 characters. The names match, but no page size is documented, so test the hand-off in the playground and count `data.results` on each page before you plan credits. ### What happens when my credits run out mid-run? The next call returns `insufficient_credits` with HTTP status 402 and nothing is debited. The service is prepaid with no automatic top-up, so the job stops rather than overspending. Every response carries `X-Credits-Remaining`, so your script can stop early or alert you before the balance reaches zero. airbnb scraping short-term rentals price tracking travel data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 9 min read ## [Vrbo Scraper or API: What You Get](https://perceptlayer.com/blog/vrbo-scraper-vs-api) A Vrbo scraper vs 6 endpoints at 1 credit a call: a recorded Lake Tahoe search with stay\_total, nightly\_original and rating, and the cost per listing. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 8 min read ## [Amazon Scraper or API: Search, Offers and Reviews](https://perceptlayer.com/blog/amazon-scraper-vs-api) An Amazon scraper vs 18 endpoints at 1 credit a call: a recorded laptop stand search with asin, price.amount and rating, and the domains each call takes. --- title: "Google Shopping Scraper or API: What You Get | Perceptlayer" description: "A Google Shopping scraper vs one GET at 1 credit: the recorded iphone 15 search with source, extracted_price and product_id, and the cost per item tracked." url: https://perceptlayer.com/blog/google-shopping-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Shopping Scraper or API: What You Get 6 Nov 2026 Perceptlayer 9 min read A Google Shopping scraper fetches result pages for a product query and turns each listing into a row: title, seller, price, rating and an ID you can track. You write and maintain the fetching, the parsing and the checks that catch silent breakage. The alternative is `GET /v1/google-shopping/search`, which returns those rows as JSON for 1 credit per successful call. This post starts from the row you actually need, shows what each route does to produce it, and prices one tracked item. ## Key takeaways - The row a price tracker needs has seven parts: query context, title, seller, numeric price, rating, review count and a stable product ID. A scraper builds each one; the endpoint returns them as `search_parameters`, `title`, `source`, `extracted_price`, `rating`, `reviews` and `product_id`. - `price` arrives as text ( `"$393.73"`) and `extracted_price` as a number ( `393.73`), so the currency parsing a scraper would carry is already done. - One query per item per check costs 1 credit. Tracking 40 items four times a day for 30 days is 4,800 calls × 1 credit = 4,800 credits, inside the Starter pack's 10,000. - In the recorded response, `thumbnail` holds a 1×1 placeholder GIF, not a product image. Don't build image features on it. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a bad run doesn't drain the balance. ## What row does a Google Shopping scraper have to produce? Before comparing routes, fix the output. A useful Google Shopping row says what was searched and where, which product came back, who sells it, at what price as a number, and an ID that lets you recognise the same product tomorrow. Everything else, such as images or badges, is optional. The table maps each part of that row to the work a scraper does and to the field the endpoint returns. | Part of the row | What a scraper does to get it | Endpoint field | | --- | --- | --- | | Query context | Records the query, country, language, device and offset it sent | `search_parameters` ( `q`, `gl`, `hl`, `start`, `device`) | | Product name | Finds the title text in each result block | `title` | | Seller | Finds the merchant label, which may combine a marketplace and a shop | `source` | | Price | Finds the price text, strips the currency symbol and separators, converts to a number | `price` (text) and `extracted_price` (number) | | Rating and reviews | Finds and parses star and count text | `rating`, `reviews` | | Product ID | Pulls an identifier out of a link or attribute | `product_id`, plus `link` to the product page | | Order on the page | Counts result blocks | `position`, `rank_absolute`, `category` | If your scraper already fills every row of that table reliably, at the volume you need, the question is only whether its upkeep costs more than the credits. If it doesn't, the endpoint is the shorter path to the same row. ## Where does the work in a scraper go? Most of a shopping scraper's code isn't the first parse. It's the parts that keep the output correct over months: building requests consistently, fetching at volume, normalising prices, keeping IDs stable and noticing when any of it quietly fails. These are general engineering costs of scraping any large search page, and each one recurs. 1. **Request building.** Prices differ by country, language and device, so every request has to pin those the same way each run. Otherwise a change in context looks like a price move. 2. **Fetching at volume.** Any large site has to tell people from automated traffic. Expect slow responses, challenge pages and blocked requests at volume. Getting around a site's protections isn't something we'd recommend; if you hit them, stop and reconsider the approach. 3. **Price normalisation.** Price text varies by locale: symbols before or after the number, commas or dots as decimal separators, ranges, and labels next to the figure. Each format needs a rule, and each rule needs a test. 4. **Identity.** A tracker compares today with yesterday, so it needs an ID that survives layout changes. Positions shift between runs, so they can't be the key. 5. **Silent failure.** A scraper rarely crashes when a page changes. It returns fewer rows, or rows with an empty price. You need a monitor that compares each run with the last one. Then there are the terms. Read Google's terms of service before you build a collector, and keep a record of what you store and why. ## What does the recorded iphone 15 search return? The Google Shopping API on Perceptlayer has one endpoint, `GET /v1/google-shopping/search`. It needs `q` and takes eight optional parameters: `gl`, `hl`, `location`, `uule`, `start`, `device`, `small_business` and `shoprs`. This is the request behind the recording, a US English search for `iphone 15`: ```bash curl "https://api.perceptlayer.com/v1/google-shopping/search?q=iphone+15&gl=us&hl=en" \ -H "X-API-Key: $API_KEY" ``` An excerpt of the recorded response, trimmed with `…`: ```json { "search_parameters": { "q": "iphone 15", "gl": "us", "hl": "en", "start": 0, "device": "desktop" }, "shopping_results": [ { "position": 1, "category": "Popular products", "title": "Apple iPhone 15", "source": "Walmart - Wireless Source", "rating": 4.7, "reviews": 45000, "extensions": [ " & more" ], "rank_absolute": 1, "product_id": "4263606017411565992", "link": "https://www.google.com/shopping/product/4263606017411565992", "price": "$393.73", "extracted_price": 393.73, "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" … }, { "position": 2, "title": "Apple iPhone 15 128GB", "source": "Best Buy", "rating": 4.4, "reviews": 94, "product_id": "4379032623638529631", "price": "$441.00", "extracted_price": 441, … } ], "pagination": { "current_page": 1, "start": 0, "next_start": 10 } } ``` ### What the recording tells you before you build on it Read a recorded response for its quirks, not only its fields. Five details in this one change how you'd write a tracker. - **The two results are different products.** "Apple iPhone 15" and "Apple iPhone 15 128GB" have different `product_id` values and different sellers. Compare prices within one `product_id`, never across a results page. - **`source` is a label, not a clean seller key.** "Walmart - Wireless Source" combines a marketplace name and a shop name. Store it as written; splitting it on the hyphen is a guess. - **`rank_absolute` is 1 on both results** while `position` is 1 and 2. Use `position` for order on the page, and don't treat either as a key. - **`thumbnail` is a placeholder.** The data URI decodes to a 1×1 GIF. If you need product images, this field won't supply them. - **`extensions` is display text.** `" & more"` has a leading space and no meaning on its own, so treat it as optional decoration. The full result also carries a `product_token`, cut here for length. The [Search endpoint page](https://perceptlayer.com/apis/google-shopping/search) lists each parameter with its type and limits. ## How do a scraper and the endpoint compare? A scraper costs engineering time, hosting and terms risk, and gives you whatever you can parse. The endpoint costs credits per call and gives you named, typed fields. The table compares them for a recurring job: checking a fixed list of products several times a day. | | DIY Google Shopping scraper | `GET /v1/google-shopping/search` | | --- | --- | --- | | Setup | Fetcher, parsers, price normaliser, storage, run monitor | A key in the `X-API-Key` header | | Price as a number | Your locale rules | `extracted_price`, next to the `price` text | | Product identity | An ID you extract and hope stays put | `product_id` on every recorded result | | Locale and device | Pinned in your own request code | `gl`, `hl`, `location`, `uule`, `device`, echoed in `search_parameters` | | Paging | Your own offset logic | `start` in the request; `pagination` with `current_page` and `next_start` in the response | | When the page changes | Your parser breaks, often silently | You read the same named fields | | Blocks and challenges | Yours to handle | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | On paging, the names match: the request takes `start`, and the recorded `pagination` shows `next_start: 10`. The recording doesn't include a second-page call, so check one in the playground before you rely on it. ### Checking a response instead of parsing a page With the endpoint, the code you keep is validation rather than parsing. This script runs one search, keeps rows that have both a `product_id` and an `extracted_price`, flags the rest, and prints what the call cost from `X-Credits-Used`. It reads only fields present in the recording and treats any of them as possibly missing. ```python import os import requests API = "https://api.perceptlayer.com/v1/google-shopping/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def check(query, gl="us", hl="en"): r = requests.get(API, params={"q": query, "gl": gl, "hl": hl}, headers=HEADERS, timeout=30) if r.status_code != 200: err = r.json().get("error", {}) print("failed:", r.status_code, err.get("code"), "credits used: 0") return [] data = r.json() context = data.get("search_parameters", {}) good, flagged = [], [] for item in data.get("shopping_results", []): row = { "q": context.get("q"), "gl": context.get("gl"), "device": context.get("device"), "position": item.get("position"), "product_id": item.get("product_id"), "title": item.get("title"), "source": item.get("source"), "price": item.get("extracted_price"), } if row["product_id"] and isinstance(row["price"], (int, float)): good.append(row) else: flagged.append(row) print(f"{len(good)} rows, {len(flagged)} flagged, " f"credits used: {r.headers.get('X-Credits-Used')}, " f"remaining: {r.headers.get('X-Credits-Remaining')}") return good for row in check("iphone 15"): print(row["product_id"], row["source"], row["price"]) ``` A rate-limited (429) or temporarily unavailable (503) reply carries a `Retry-After` header with the seconds to wait; add a retry around the request if you run this on a schedule. Requests have no idempotency key, so a call whose reply was lost to a client timeout may have succeeded and been billed. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does each tracked item cost? On the endpoint, cost follows calls. If each tracked item gets its own query, one check of one item is 1 credit, so the cost of an item is the number of checks you run. Credits per month = items × checks a day × days. The table works that formula for three common schedules. | Schedule | Calls | Credits | Fits in | | --- | --- | --- | --- | | 100 items, one check, once | 100 | 100 | The 100 free credits on signup | | 300 items, once a week, 4 weeks | 1,200 | 1,200 | The Starter pack's 10,000 | | 40 items, four times a day, 30 days | 4,800 | 4,800 | The Starter pack's 10,000 | | 250 items, twice a day, 30 days | 15,000 | 15,000 | The Build pack's 50,000 | A broad query can cover several items at once. If one search returns rows for products you track, those items share the call, and the cost per item falls below 1 credit. Count the matched `product_id` values per call in your own runs before you plan on it, since the number of results per page isn't documented. The 100 free credits come once, after verifying your email, and aren't topped up. Purchased credits last 12 months, with no subscription. Free accounts run at 1 request a second, so 100 sequential checks take about 100 seconds; paying accounts get at least 5 a second, as the [rate limits docs](https://docs.perceptlayer.com/rate-limits) describe. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. ## Which route should you choose? Choose by how often you check, how many items, and whether the data feeds code or a person. Upkeep dominates for recurring jobs, and per-call cost dominates only at very high volume with a team that already runs scrapers. These verdicts assume the row described above. - **Daily or hourly price checks on a product list**: use the endpoint. Key on `product_id`, store `source` and `extracted_price` with `search_parameters`, and budget items × checks credits. The [price monitoring tool tutorial](https://perceptlayer.com/blog/price-monitoring-tool-build) builds the full tracker with history and drop alerts. - **One-off research on a handful of products**: open Google Shopping in a browser. Neither a scraper nor an API is worth it for ten lookups. - **Product images or rich listing detail**: neither route as tested here. The recorded `thumbnail` is a placeholder, so look at the retailer's own data for images. - **Comparing one retailer's prices in depth**: query that retailer's source as well. The [Walmart scraper or API](https://perceptlayer.com/blog/walmart-scraper-vs-api) and [eBay scraper or API](https://perceptlayer.com/blog/ebay-scraper-vs-api) posts cover those endpoints. - **An agent answering "where is this cheapest?"**: give it the endpoint through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls search instead of reading pages. - **Learning how scraping works**: write a scraper against a practice site, not a large search engine. To see the fields for your own products, run a query in the playground on the [Google Shopping API page](https://perceptlayer.com/apis/google-shopping), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Google Shopping **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/google-shopping) ## Frequently asked questions ### Is scraping Google Shopping allowed? That depends on Google's terms of service, how you collect and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Through the endpoint, data is collected from publicly available sources and returned as found at the time of the call. ### How much does one Google Shopping call cost? A successful call to `GET /v1/google-shopping/search` costs 1 credit, shown in the `X-Credits-Used` header, with the balance after the call in `X-Credits-Remaining`. Failed calls cost nothing. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited; there is no automatic top-up. ### Can I get prices for a specific country? Yes. Pass a two-character country code in `gl` and a language code in `hl`; the recording used `gl=us` and `hl=en`, and both are echoed in `search_parameters`. For a place more specific than a country, the endpoint takes `location` (up to 63 characters) or `uule` (up to 500). Keep these fixed across runs so prices stay comparable. ### Why is extracted\_price better than parsing the price text? `price` is display text such as `"$393.73"`, with a currency symbol a scraper would have to strip. `extracted_price` holds the same value as a number, `393.73`, ready for comparison and arithmetic. Store the number for analysis and keep the text only if you need to show the original string. ### How fast can I run a batch of Google Shopping checks? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute); paying accounts run at least 5 a second (300 a minute), and each pack includes a rate. A 429 response carries a `Retry-After` header with the seconds to wait before retrying. google shopping scraping price monitoring product data ecommerce ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Aug 2026 Perceptlayer 7 min read ## [Google Shopping API: Product Prices and Offers as JSON](https://perceptlayer.com/blog/google-shopping-api-product-prices) One GET to /v1/google-shopping/search returns product titles, sellers, prices and ratings as JSON. Parameters, a response and the cost of 500 products a day. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 8 min read ## [Amazon Scraper or API: Search, Offers and Reviews](https://perceptlayer.com/blog/amazon-scraper-vs-api) An Amazon scraper vs 18 endpoints at 1 credit a call: a recorded laptop stand search with asin, price.amount and rating, and the domains each call takes. --- title: "Indeed Scraper or API: Postings, Companies, Salaries" description: "An Indeed scraper parses five kinds of page; 9 Indeed endpoints return them as JSON at 1 credit a call. A recorded Berlin search is 0.05 credits a posting." url: https://perceptlayer.com/blog/indeed-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Indeed Scraper or API: Postings, Companies, Salaries 6 Nov 2026 Perceptlayer 9 min read An Indeed scraper is code that loads job search results, posting pages and employer pages, then pulls titles, companies, locations and dates out of the markup. You maintain the fetching, the parsing and the checks that tell you when either broke. The alternative is nine Indeed endpoints that return postings, company profiles, reviews and salaries as JSON for 1 credit per successful call. This post maps each page a scraper would need to an endpoint, reads a recorded Berlin search field by field, and works out the cost per item tracked. ## Key takeaways - A complete Indeed scraper covers five kinds of page: search results, a single posting, a company's profile and open jobs, its reviews, and salary figures. Each has its own parser to keep working. - The Indeed API has 9 endpoints, all `GET`, all 1 credit per successful call, and all on the standard tier. - The recorded `GET /v1/indeed/jobs` search for `software engineer` in Berlin returned 20 postings in one call, so a search costs 1 ÷ 20 = 0.05 credits per posting. - The same recording returned a Product Designer and a Senior Product Manager, and one posting dated `2025-07-21` in a response stamped `2026-10-21`. Filter on `title` and `date_published` yourself, whichever route you take. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a broken run doesn't drain your balance. ## Which pages would an Indeed scraper have to cover? A scraper that answers more than "what's open today" ends up covering five kinds of page, and each one is a separate fetcher and parser. Search results give you a list of postings for a query and place. A posting page gives you the full description. Company pages give you the employer's profile and its open roles. Review pages and salary pages give you what people say about working there and what roles pay. The table below maps each one to the endpoint that returns the same kind of data. | Page a scraper parses | What you'd extract | Endpoint | Required parameters | | --- | --- | --- | --- | | Search results | Postings for a query and place | `GET /v1/indeed/jobs` | `query` | | Search box suggestions | Titles, places, companies, skills | `GET /v1/indeed/autocomplete` | `q`, `country` | | A single posting | Full posting details | `GET /v1/indeed/jobs-details` | `job_key` | | Company search | Companies matching a name | `GET /v1/indeed/companies-search` | `q` | | Company profile | The employer's profile | `GET /v1/indeed/companies-profile` | none ( `company` or `employer_key`) | | Company open jobs | That employer's postings | `GET /v1/indeed/companies-jobs` | none ( `company` or `employer_key`) | | Company reviews | Reviews, sortable and filterable | `GET /v1/indeed/companies-reviews` | `company` | | Company salaries | Pay by job category | `GET /v1/indeed/companies-salaries` | `company` | | Salary estimate | Pay for a title in a place | `GET /v1/indeed/salaries-estimate` | `title`, `location` | The company, review, salary and autocomplete endpoints take `country` as one of `US`, `GB`, `UK` or `DE`. The [Indeed API page](https://perceptlayer.com/apis/indeed) lists every parameter, and each endpoint page, such as [Indeed API: Companies Reviews](https://perceptlayer.com/apis/indeed/companies-reviews), has a playground for running a real call. ## What does one search call return? One call to `GET /v1/indeed/jobs` returns a page of postings, a cursor for the next page and a timestamp, with every field already named and typed. That is the output a scraper's search parser exists to produce. Here is the recorded request: full-time software engineer roles in Berlin, 20 at a time. ```bash curl "https://api.perceptlayer.com/v1/indeed/jobs?query=software+engineer&location=Berlin&country=DE&job_type=full_time&limit=20" \ -H "X-API-Key: $API_KEY" ``` And an excerpt of the recorded response, trimmed to the second posting and the paging block: ```json { "success": true, "data": { "jobs": [ … { "id": "805a70464f904dce", "title": "Senior Product Manager (Enterprise)", "company": { "name": "n8n", "profile_url": "/cmp/N8n" }, "location": { "city": "Berlin", "state": "BE", "country": "DE", "country_name": "Deutschland", "formatted": "Berlin", "latitude": 52.52437, "longitude": 13.41053, "is_remote": true }, "description_html": "

The AI orchestration of your wildest imagination.

\nn8n is the open workflow orchestration platform built for the new era of AI. We give tec…", "attributes": [ "Collaboration with Sales", "Go" ], "date_published": "2026-08-12 05:00:00", "apply_url": "https://jobs.ashbyhq.com/n8n/bcf96878-d41a-479d-b506-7753356077c4?utm_source=3ZqYBLJ41R" } ], "pagination": { "next_cursor": "ABQAAYEAFAAAAAAAAAAAAAAAAmYRNdcAMgEBAQcpfSGrk7wi9QBuLZ6BEihQwmDA0xA2nDAGrqtuJIdLnPZKyLE0IcnT2+IETfyRAAA=", "has_more": true }, "metadata": { "total_results": 20, "timestamp": "2026-10-21T13:25:37.233649Z" } } } ``` ### What a scraper would have had to work out for each field Reading this response against the job a parser does shows where the effort goes: | Field | What a scraper does to get it | What the response gives you | | --- | --- | --- | | `id` | Find a stable identifier in links or markup | A string per posting, `805a70464f904dce` | | `company.name`, `company.profile_url` | Parse the employer block | Both, with the profile path `/cmp/N8n` | | `location.*` | Split a free-text place, geocode it | City, state, country, `latitude`, `longitude` | | `location.is_remote` | Guess from wording in the posting | A boolean: `true` here, though the city is Berlin | | `attributes` | Parse tag chips | A list: `Collaboration with Sales`, `Go` | | `date_published` | Convert relative dates ("3 days ago") to a timestamp | `2026-08-12 05:00:00` | | `pagination.next_cursor` | Build the next page URL and track position | A cursor to pass back as `cursor` | One thing doesn't go away: `description_html` is still HTML, cut short in the recording, so strip tags or render it safely before you store it as text. ## What breaks first in a home-built Indeed scraper? Most scraper upkeep isn't the first parser; it's the slow drift after it works. Pages on a large job board change as the site ships features, so selectors stop matching and fields come back empty without an error. Any high-traffic site has to separate people from automated traffic, so a scraper running on a schedule should expect slow responses, challenge pages and blocked requests. If that happens, stop: getting around a site's protections isn't something we'd recommend. Read Indeed's terms of use before you build a collector. Three problems sit underneath the fetching, and they're yours on either route: - **Relevance isn't a filter.** The recorded search for `software engineer` returned a Product Designer and a Senior Product Manager. Whatever produces your rows, check `title` against what you actually track. - **Old postings reappear.** The first posting's `date_published` is `2025-07-21`; the response `timestamp` is `2026-10-21`. Decide what "new" means and filter on the date, then deduplicate on `id`. - **Remote and place disagree.** The n8n posting is in Berlin with `is_remote: true`. Store both fields rather than collapsing them into one. The difference is where the fixing happens. With a scraper, a layout change breaks your parser and the bad rows land in your data. With the endpoints, you read named fields; a call that fails returns an error code, costs nothing and leaves your data as it was. For a wider look at when a scraper is worth writing at all, see [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide). ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries terms and blocking risk; the endpoints cost credits per call and take the parsing off your hands. The comparison below assumes a recurring job, such as tracking a few roles in a few cities every day plus a watchlist of employers. | | DIY Indeed scraper | Indeed endpoints | | --- | --- | --- | | Coverage | One parser per page type you build | 9 endpoints: jobs, details, autocomplete, company search, profile, jobs, reviews, salaries, salary estimate | | Setup | Fetcher, parsers, storage, monitoring | A key in the `X-API-Key` header ( [authentication docs](https://docs.perceptlayer.com/authentication)) | | Posting fields | Whatever you can parse | `id`, `title`, `company`, `location` with coordinates and `is_remote`, `description_html`, `attributes`, `date_published`, `apply_url` | | Paging | Build page URLs, track position | `cursor` in, `next_cursor` and `has_more` out | | When the site changes | Your parser breaks; empty fields slip through | No parser of yours to fix | | Blocks and challenges | Yours to handle | A failed call returns a JSON error and costs 0 | | Speed | What you can fetch without being blocked | 1 request a second free; at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | | Relevance and stale postings | Yours to filter | Still yours to filter | ## What does each tracked item cost? On the endpoints, cost follows calls, and what a call returns decides the cost per item. A search call returned 20 postings in the recording, so postings cost 0.05 credits each per run. Company, review and salary calls are 1 credit each, so for those the item is the call. Here are three jobs worked through, in credits; see [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. | What you track | Calls | Credits | | --- | --- | --- | | 5 roles in 4 cities, one search page each, daily for 30 days | 5 × 4 × 30 = 600 | 600 × 1 = 600 | | The same, with a second page wherever `has_more` is true (worst case) | 600 × 2 = 1,200 | 1,200 | | 50 employers, weekly `companies-jobs`, `companies-reviews` and `companies-salaries`, 4 weeks | 50 × 3 × 4 = 600 | 600 | | 10 titles × 10 cities, one `salaries-estimate` each, once | 10 × 10 = 100 | 100 | The worst-case roles plan plus the employer watchlist is 1,200 + 600 = 1,800 credits a month, inside the Starter pack's 10,000. The salary sweep alone fits the 100 free credits you get once on signup. Requests are counted per account per minute: a free account's 1 request a second (60 a minute) finishes 100 calls in under two minutes. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. ### Measuring cost per posting from the headers Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so you can log the real cost per posting instead of estimating it. This script runs the recorded search and reads only fields from the recording: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/indeed/jobs", params={ "query": "software engineer", "location": "Berlin", "country": "DE", "job_type": "full_time", "limit": 20, }, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) used = int(resp.headers.get("X-Credits-Used", "0")) print("status", resp.status_code, "credits used", used, "remaining", resp.headers.get("X-Credits-Remaining")) if resp.ok: jobs = resp.json()["data"]["jobs"] if jobs: print(f"{len(jobs)} postings, {used / len(jobs):.3f} credits each") for job in jobs: match = "engineer" in job["title"].lower() print("match" if match else "skip ", job["id"], job["title"], "|", job["company"]["name"], "|", job["date_published"]) else: print(resp.json()["error"]["code"]) ``` The `match` check is the relevance filter from the previous section. A rate-limited call returns 429 with a `Retry-After` header; the [errors docs](https://docs.perceptlayer.com/errors) list every code. ### Going from a search result to the other endpoints The recording only covers search, so treat links between calls as untested until you try them. Search returns `company.name` and a `company.profile_url` such as `/cmp/N8n`, and the company endpoints take a `company` parameter; the names match, but no recorded call shows which value they accept. Search returns `id`, and `jobs-details` takes `job_key`. Run both in the playground on [Indeed API: Jobs Details](https://perceptlayer.com/apis/indeed/jobs-details) and [Indeed API: Companies Profile](https://perceptlayer.com/apis/indeed/companies-profile) before you build on either. ## Which route fits your use case? Pick by how often you need the data and how many page types you'd otherwise parse. The more of the five page types a job touches, the more parsers a scraper needs, while the endpoints stay at 1 credit a call. For one look at ten postings, open Indeed in a browser and skip both routes. - **Daily alerts for a role in a city**: use `GET /v1/indeed/jobs` with `sort=date`, deduplicate on `id` and filter on `title` and `date_published`. At 20 postings a call, it's 0.05 credits a posting. - **Employer research or a hiring-signal watchlist**: use `companies-search`, then `companies-profile` and `companies-jobs` per employer. Weekly checks of 50 employers with reviews and salaries come to 600 credits over four weeks. - **Employer reputation**: `companies-reviews` sorts by `date`, `rating_asc` or `rating_desc` and filters by `ftopic`, such as `wlbalance` or `paybenefits`. Keep reviewers' details out of what you store. - **Pay benchmarks**: `salaries-estimate` for a `title` in a `location`, or `companies-salaries` by `job_category` for one employer. - **A search box or a query builder**: `autocomplete` with `type` set to `title`, `location`, `company` or `skill`. - **Comparing job sources**: [Jobs API: Indeed, Glassdoor and Google Jobs Compared](https://perceptlayer.com/blog/jobs-api-comparison) puts Indeed next to the other sources; the [jobs APIs](https://perceptlayer.com/verticals/jobs) page lists them all. - **Learning how scraping works**: build a scraper against a practice site, not a job board. - **An agent that answers hiring questions**: connect the MCP server so the agent calls these endpoints as tools, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. To check the fields on your own query, run `jobs` in the playground on [Indeed API: Jobs](https://perceptlayer.com/apis/indeed/jobs), then [get a free API key](https://perceptlayer.com/signup) when the output fits. ## APIs in this post - [Indeed **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/indeed) ## Frequently asked questions ### Is scraping Indeed allowed? That depends on Indeed's terms of use and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Job titles, companies, locations and dates are lower risk than personal data; leave reviewers' and recruiters' personal details out of anything you keep, and store only the fields your project needs. ### How many postings does one Indeed search call return? The recorded call asked for `limit=20` and returned 20 postings, with `total_results: 20` and `has_more: true`. Page size beyond that isn't documented, so set `limit` yourself and check what comes back. To get the next page, pass `data.pagination.next_cursor` as `cursor`; each page is another successful call at 1 credit. ### Does a failed Indeed call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON body with an error `code`, `message` and `request_id`, plus `X-Credits-Used: 0`. Requests have no idempotency key, so a call whose reply was lost to a client timeout may have succeeded and been billed. ### Can I get Indeed company reviews and salaries without a scraper? Yes. `GET /v1/indeed/companies-reviews` and `GET /v1/indeed/companies-salaries` each take a required `company`, plus `country` as `US`, `GB`, `UK` or `DE`. Reviews also take `start`, `sort` and filters by country, topic and job title. `GET /v1/indeed/salaries-estimate` takes a `title` and `location`. Each successful call costs 1 credit. ### Do the Indeed endpoints work for countries other than Germany? The jobs search takes `country` as a value of up to two characters, and the recorded search used `DE`. The other eight endpoints accept `US`, `GB`, `UK` or `DE` as `country`. Results are returned as found at the time of the call, so test your country and query in the playground on the Indeed API page before scheduling a job. indeed jobs scraping job postings hiring data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 29 Jul 2026 Updated 6 Nov 2026 Perceptlayer 8 min read ## [Indeed Jobs API: Get Job Postings as JSON](https://perceptlayer.com/blog/indeed-jobs-api-json) One GET to /v1/indeed/jobs returns job postings with company, location and apply URL as JSON for 1 credit. Parameters, a real response and monthly cost. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 8 min read ## [LinkedIn Scraper or API: What You Can Get](https://perceptlayer.com/blog/linkedin-scraper-vs-api) Compare a DIY LinkedIn scraper with company, job and public post endpoints at 1 credit a call: setup, upkeep, terms and a verdict per use case. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "Bing Scraper or API: Ten Result Types as JSON | Perceptlayer" description: "A Bing scraper next to 10 Bing endpoints at 1 credit a call: a recorded web search with position, url and domain, and 0.1 credits per ranking tracked." url: https://perceptlayer.com/blog/bing-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Bing Scraper or API: Ten Result Types as JSON 5 Nov 2026 Perceptlayer 8 min read A Bing scraper is a program that sends queries to Bing, loads the result pages and pulls titles, links and snippets out of the HTML. That sounds like one parser, but web, news, images, videos, shopping and maps results are each laid out differently, so a scraper that covers them is several scrapers. The Bing endpoints return each result type as JSON at 1 credit per successful call; a recorded web search returns 10 ranked results with `position`, `url` and `domain`. This post compares the two and gives a verdict per job. ## Key takeaways - The Bing API has 10 endpoints, each 1 credit per successful call: search, news, images, videos, shopping, product, maps, suggestions, autocomplete and reverse image. - `GET /v1/bing/search` needs only `query`; the recorded response returns `data[]` with `position`, `title`, `description`, `url` and `domain`, plus `results_on_page: 10`. - Filters a scraper would drive through the page are parameters: `site` and `filetype` on search, `freshness` on news and videos, and `size`, `layout`, `type`, `color` and `license` on images. - Tracking 500 keywords daily at one page each is 500 × 30 = 15,000 credits a month, or 0.1 credits per ranking tracked at 10 results a page. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a query that errors doesn't count against your balance. ## How many scrapers is a Bing scraper? Count the result types you need, because each one is a separate parser with its own layout, its own filters and its own way of breaking. A web-results scraper doesn't parse an image grid or a map listing. The table maps each result type to its endpoint and the parameters that replace the filters a scraper would otherwise click through. | Result type | Endpoint | Required | Filters and options | | --- | --- | --- | --- | | Web results | `GET /v1/bing/search` | `query` | `page`, `num`, `site`, `filetype`, `safe` ( `off`, `moderate`, `strict`), `hl`, `include_html` | | News | `GET /v1/bing/news` | `query` | `page`, `freshness` ( `hour`, `day`, `week`, `month`) | | Images | `GET /v1/bing/images` | `query` | `page`, `size`, `layout`, `type`, `color`, `freshness` ( `day` to `year`), `license` ( `any`, `public_domain`) | | Videos | `GET /v1/bing/videos` | `query` | `page`, `freshness` ( `day`, `week`, `month`) | | Shopping | `GET /v1/bing/shopping` | `query` | `page` | | One product | `GET /v1/bing/product` | `query`, `product_token` | | | Maps | `GET /v1/bing/maps` | `query` | `limit` | | Suggestions | `GET /v1/bing/suggestions` | `query` | | | Autocomplete | `GET /v1/bing/autocomplete` | `query` | | | Reverse image | `GET /v1/bing/reverse-image` | `image_url` | | Every endpoint except search also takes optional `mkt`, `cc` and `setlang` strings; their accepted values aren't documented here, so try them in the playground on the [Bing API page](https://perceptlayer.com/apis/bing). Images accept `size` of `small`, `medium`, `large` or `wallpaper`, `layout` of `square`, `wide` or `tall`, `type` of `photo`, `clipart`, `linedrawing`, `animatedgif` or `transparent`, and 14 `color` values from `color` and `bw` to single colours. The product endpoint needs a `product_token`. None of the recordings in this post shows where one comes from, so run a shopping search in the playground and look for it before you build on that pair. ## What does a web result look like as JSON? A web search call returns a ranked list under `data`, one object per result with five named fields, and a count of results on the page. This is the recorded request: ```bash curl "https://api.perceptlayer.com/v1/bing/search?query=best+web+scraping+api" \ -H "X-API-Key: $API_KEY" ``` And an excerpt of the recorded response: ```json { "data": [ { "position": 1, "title": "Best", "description": "Sep 14, 2026 · Надійний інтернет-провайдер Best …", "url": "https://best.net.ua/", "domain": "best.net.ua" }, { "position": 2, "title": "BEST | English meaning - Cambridge Dictionary", "description": "BEST definition: 1. of the highest quality, or being the most suitable, pleasing, or effective type of thing or…. Learn more.", "url": "https://dictionary.cambridge.org/dictionary/english/best", "domain": "dictionary.cambridge.org" }, … ], "results_on_page": 10, "source": "bing" } ``` Three things in this recording matter for anything you build on it: 1. **`position` and `domain` come ready to use.** A scraper would count result blocks and parse each link's host itself; here a rank check is a lookup on `domain`. 2. **A date can sit inside `description`.** The first snippet starts with `Sep 14, 2026 ·`, so if you want dates, split them off the text yourself and treat them as optional. 3. **Results follow the query, not your intent.** For `best web scraping api` the top two were an internet provider's homepage and a dictionary entry for "best". That's one query on one day, not a benchmark, but it shows why rank tracking needs exact, specific keywords, and why `site` exists for checking one domain. Snippets can also contain text in any language and symbols, so store them as UTF-8 and don't assume ASCII. ## What breaks first in a homemade Bing scraper? A search scraper rarely fails with an error; it starts returning fewer or emptier rows and keeps running. These are the failure points to plan for in any scraper of a large search engine, described as general engineering rather than anything specific to Bing: 1. **Layout changes.** Result pages change as features ship. A selector that found every title last week can find half of them this week, and your rank data shifts with it. 2. **Mixed result blocks.** Search pages mix web links with news, images, videos and other modules. A scraper has to decide what counts as a ranked result, and that decision changes your positions. 3. **Location and language.** What you get depends on where the request seems to come from and what language it asks for. A scraper has to control both on every request to get comparable runs. 4. **Automated-traffic defences.** A search engine has to tell people from scripts, so a scraper at volume should expect slow responses, challenge pages and blocks. Getting around those protections isn't a fix we'd recommend. 5. **Silent gaps.** Without a monitor that compares row counts and empty fields against earlier runs, a broken parser looks like a quiet day. Before you write a collector, read Bing's terms of use. [Scrape Google Search Results with Python](https://perceptlayer.com/blog/scrape-google-search-results-python) shows what the parsing side involves for a comparable engine, if you want to see the work in code. ## How do a Bing scraper and the endpoints compare? A scraper costs a parser per result type and ongoing upkeep; the endpoints cost a credit per call and hand you named fields. For a recurring job, such as daily positions for a keyword list plus weekly news checks, the comparison looks like this. | | DIY Bing scraper | Bing endpoints | | --- | --- | --- | | Result types | One parser each for web, news, images, videos, shopping, maps | 10 endpoints, one per type | | Ranking | Count result blocks yourself | `position` on each result | | Domain | Parse each link's host | `domain` on each result | | Filters | Drive the page's filter controls | `site`, `filetype`, `safe`, `freshness`, image filters as parameters | | When the layout changes | Your selectors break, often silently | You read JSON fields; no parser of yours to fix | | Blocks and challenges | Yours to handle at volume | A failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting, any proxies, your time | 1 credit per successful call | | Raw page | Always, since you parse it | An `include_html` boolean on search; check in the playground what it adds | ### What does a tracked keyword cost? Price it per ranking tracked. The recorded call returned `results_on_page: 10`, so one call checks 10 positions: 1 credit ÷ 10 = 0.1 credits per ranking. Each deeper page is a separate call at 1 credit. | Job | Calls a month | Credits a month | | --- | --- | --- | | 30 keywords, 1 page, daily | 30 × 30 = 900 | 900, inside the Starter pack's 10,000 | | 500 keywords, 1 page, daily | 500 × 30 = 15,000 | 15,000, inside the Build pack's 50,000 | | 500 keywords, 3 pages, daily | 500 × 3 × 30 = 45,000 | 45,000, inside the Build pack's 50,000 | | 200 topics, news, weekly | 200 × 4 = 800 | 800 | Credits come in prepaid packs and last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how each call is debited. ## How would you track one domain's positions? A daily rank check needs only the fields in the recording: `position`, `url` and `domain`. This Python script runs each keyword once, finds where your domain appears in `data`, and writes one row per keyword per day to SQLite, with `None` when the domain isn't on the page. ```python import datetime import os import sqlite3 import time import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} DOMAIN = "dictionary.cambridge.org" KEYWORDS = ["best web scraping api", "define best"] db = sqlite3.connect("bing_ranks.db") db.execute( "CREATE TABLE IF NOT EXISTS ranks " "(day TEXT, keyword TEXT, position INTEGER, url TEXT, PRIMARY KEY (day, keyword))" ) day = datetime.date.today().isoformat() for keyword in KEYWORDS: r = requests.get( f"{BASE}/v1/bing/search", params={"query": keyword}, headers=HEADERS, timeout=30 ) if r.status_code == 429: time.sleep(int(r.headers.get("Retry-After", "1"))) r = requests.get( f"{BASE}/v1/bing/search", params={"query": keyword}, headers=HEADERS, timeout=30 ) if not r.ok: print(keyword, "failed:", r.status_code, r.json()["error"]["code"]) continue hit = next((x for x in r.json()["data"] if x["domain"] == DOMAIN), None) db.execute( "INSERT OR REPLACE INTO ranks VALUES (?, ?, ?, ?)", (day, keyword, hit["position"] if hit else None, hit["url"] if hit else None), ) db.commit() print(keyword, hit["position"] if hit else "not on page", "| credits:", r.headers.get("X-Credits-Used")) time.sleep(1) # free accounts get 1 request a second ``` The primary key makes a rerun on the same day overwrite rather than duplicate. For more than one page per keyword, add `page` and loop; check in the playground how its values line up with `position` before you rely on it. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and [Rank Tracking API: Track Google Positions as JSON](https://perceptlayer.com/blog/rank-tracking-api) covers storing and comparing positions over time in more depth. ## Which route should you choose? Choose by result type and frequency, because that decides whether parser upkeep or credits dominate. The verdicts assume a recurring job; for a handful of searches once, use a browser. - **Daily Bing rankings for a keyword list**: `search`, stored by `position` and `domain`. At 10 results a page, it's 0.1 credits per ranking tracked. - **Checking whether one site ranks, or which of its pages do**: `search` with `site`, and `filetype` if you only want documents. - **Monitoring news coverage of a topic or brand**: [`news`](https://perceptlayer.com/apis/bing/news) with `freshness` set to `hour` or `day`, on a schedule that matches it. [News API Options](https://perceptlayer.com/blog/news-api-comparison) compares news sources. - **Finding images you're allowed to reuse**: [`images`](https://perceptlayer.com/apis/bing/images) with `license=public_domain`, then check each source page yourself. - **Finding where an image appears**: [`reverse-image`](https://perceptlayer.com/apis/bing/reverse-image) with an `image_url` of up to 2,000 characters. - **Keyword research**: `suggestions` and `autocomplete`, one call per seed term. - **Product and local data**: [`shopping`](https://perceptlayer.com/apis/bing/shopping) and [`maps`](https://perceptlayer.com/apis/bing/maps), checked in the playground first, since this post has no recording for them. - **An agent that searches the web**: the Bing endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. [Web Search API for AI Agents](https://perceptlayer.com/blog/web-search-api-for-ai-agents) compares engines for that job. - **Learning how scraping works**: write a scraper against a practice site, not a search engine. The [search engines hub](https://perceptlayer.com/verticals/search) lists the other engines in the catalogue. To check the fields for your own keywords, run the recorded query or yours on the [Bing search endpoint](https://perceptlayer.com/apis/bing/search) in the playground, then [get a free API key](https://perceptlayer.com/signup) for the scheduled job. ## APIs in this post - [Bing **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/bing) ## Frequently asked questions ### Is scraping Bing allowed? That depends on Bing's terms of use, how you use the results and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenge pages or other protections. Using an API instead removes the parsing and blocking work, but how you use the data is still your responsibility. ### What fields does a Bing search call return? In the recorded response, each item in `data` has `position`, `title`, `description`, `url` and `domain`. The body also has `results_on_page`, which was `10`, and `source`, which was `bing`. A date can appear at the start of `description` as text, so parse it yourself if you need it. ### How much does a Bing rank check cost? One credit per successful call, and the recorded call returned 10 results, so 0.1 credits per ranking tracked. Tracking 500 keywords at one page daily is 15,000 credits a month. Every account gets 100 free credits after verifying an email address. See pricing for what credits cost. ### Can I get Bing news, images and videos without a scraper? Yes. `news`, `images` and `videos` each take a `query`, a `page` and a `freshness` filter, and images add `size`, `layout`, `type`, `color` and `license`. Each costs 1 credit per successful call. This post has no recorded response for them, so run them in the playground on the Bing API page to see the fields. ### What happens when a Bing call fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`, plus `X-Credits-Used: 0`, so you aren't charged. A 429 `rate_limited` response carries a `Retry-After` header with the seconds to wait; `invalid_parameters` (422) usually means a missing `query` or a value outside a listed set. bing scraping serp search api rank tracking ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Aug 2026 Perceptlayer 8 min read ## [Bing Search API Alternative: Web Results as JSON](https://perceptlayer.com/blog/bing-search-api-alternative-json) Replace Microsoft's retired Bing Search API with three search endpoints at 1 credit per call. Parameters compared, real responses, and where results differ. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Nov 2026 Perceptlayer 8 min read ## [Google Images Scraper or API: What You Get](https://perceptlayer.com/blog/google-images-scraper-vs-api) Compare a Google Images scraper with one 1-credit call that returns position, source, link, original URL, pixel size and is\_product for each result. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 8 min read ## [Scrape Google Search Results with Python](https://perceptlayer.com/blog/scrape-google-search-results-python) Get Google results in Python as JSON: organic\_results, related\_questions and related\_searches from one call to /v1/google-search/search, at 1 credit a page. --- title: "Google Images Scraper or API: What You Get | Perceptlayer" description: "Compare a Google Images scraper with one 1-credit call that returns position, source, link, original URL, pixel size and is_product for each result." url: https://perceptlayer.com/blog/google-images-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Images Scraper or API: What You Get 5 Nov 2026 Perceptlayer 8 min read A Google Images scraper is code that runs an image search, reads the results grid and recovers, for each result, the page it came from, the full-size file and its dimensions. The other route is `GET /v1/google-images/images`, which returns those fields as a JSON array for 1 credit per successful call. A scraper costs upkeep; the endpoint costs credits per query per page. This post compares the two field by field, prices a tracked query, and gives a verdict per job. ## Key takeaways - The recorded `coffee` search returns an array of results, each with `position`, `thumbnail`, `source`, `title`, `link`, `original`, `original_width`, `original_height` and `is_product`. - A scraper has to tell the preview apart from the full-size file; the endpoint returns them separately as `thumbnail` and `original`, with the original's pixel size. - Nine optional parameters do a scraper's filter clicks: `hl`, `gl`, `imgsz`, `imgtype`, `imgcolor`, `imgar`, `tbs`, `safe` and `page`. - Tracking 100 queries weekly, one page each, is 100 × 4 = 400 credits a month. The 100 free credits on signup cover the first week's run, and the Starter pack's 10,000 covers a year of it. - A result is a pointer to someone else's image. Neither route gives you permission to reuse the file. ## Which fields would a scraper have to recover? Every field a scraper would recover is already a named key in the endpoint's response, so the useful comparison is per field. The table pairs each field with what a scraper has to do to get it. Most of the work sits in three of them: the result's position, the full-size file and its dimensions, because a results grid is built for looking at previews, not for handing over file addresses. | Field | What it holds (recorded `coffee` search) | What a scraper has to do for it | | --- | --- | --- | | `position` | Rank in the results: `1`, `2`, … | Count results in page order, and keep counting across pages | | `thumbnail` | The preview image URL | Read the preview off the grid | | `source` | The site's display name, such as `Wikipedia` | Read the label under each preview | | `title` | The page title, such as `Coffee - Wikipedia` | Read the caption text | | `link` | The page the image appears on | Find the destination of each result | | `original` | The full-size image file URL | Find the file address, which isn't the preview | | `original_width`, `original_height` | Pixel size of the original, such as `3200` × `2000` | Find the dimensions, or download the file to measure it | | `is_product` | `true` when the result is flagged as a product | Detect product markers in the result | Here is the recorded call and the first two results, trimmed: ```bash curl "https://api.perceptlayer.com/v1/google-images/images?q=coffee" \ -H "X-API-Key: $API_KEY" ``` ```json [ { "position": 1, "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQtHO98ebb559chzTw8eP9ZaeLZwr3h70NaxQ66SUO4_A&s", "source": "Wikipedia", "title": "Coffee - Wikipedia", "link": "https://en.wikipedia.org/wiki/Coffee", "original": "https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg?…", "original_width": 3200, "original_height": 2000, "is_product": false }, { "position": 2, … "source": "InstaCuppa Store", "title": "Easy Coffee Recipe at Home: Simple Cafe-Style Coffee in 2 Minutes", "link": "https://instacuppastore.com/blogs/recipes/easy-coffee-recipe-at-home?…", "original": "https://instacuppastore.com/cdn/shop/articles/blog-easy-coffee-recipe-at-home-cover_ce3809b1-35ce-4721-b2df-d8fc77e8ce20.jpg?…", "original_width": 1100, "original_height": 738, "is_product": true }, … ] ``` The two results show why every field matters. The first is a 3200 × 2000 file on one host, shown on a page on another domain. The second is a 1100 × 738 file on a shop's own domain, flagged `is_product: true`. In both, `thumbnail` sits on a different host from `original`, so a scraper that stores only what the grid shows ends up with previews, not the files or the pages behind them. ## What goes wrong in a scraper that the response shape avoids? Most of an image scraper's bugs come from mixing up three things: the preview, the file and the page. Each lives at its own address, and a scraper has to keep them apart through every page change. Add filters, paging and duplicates, and you get the four failure points below. The endpoint removes the parsing side of each; deciding what to do with the files stays with you. ### 1\. Previews stored as images The visible grid is previews. A scraper that saves what it sees saves small files and no dimensions. The endpoint keeps `thumbnail` and `original` as separate fields, with `original_width` and `original_height`, so you can filter by size without downloading anything. ### 2\. Filters rebuilt by hand Size, type, colour and shape filters are clicks in a browser, which a scraper has to turn into requests and keep working when the controls change. On the endpoint they are parameters with fixed values: `imgsz` (large, medium, icon), `imgtype` (photo, clipart, lineart, gif, face), `imgcolor` (color, gray, trans and eleven colours), `imgar` (tall, square, wide) and `safe` (active, off). Use only the listed values; a call that fails, for example with `invalid_parameters` (422), costs nothing. ### 3\. Paging and duplicates Results arrive in pages, and a scraper has to fetch each page, keep `position` continuous and drop repeats. The endpoint takes an integer `page`; how many results one page holds isn't documented, so check it in the playground for your query before you plan a run. De-duplicate on `original` or `link`, whichever matches your unit. ### 4\. Silent breakage and blocks When a page layout changes, a scraper often returns empty fields rather than an error, and a week of blank `original` values looks like a quiet week. At volume, a large site will also slow or refuse automated requests. If that happens, stop; getting around a site's protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. On the endpoint, a failed call returns an error `code` and `X-Credits-Used: 0`. ## How do a scraper and the endpoint compare? A scraper has no per-call bill but owns the fetch, the parsing and the repairs; the endpoint charges 1 credit per successful call and owns none of that on your side. The table assumes a recurring job: the same queries, checked on a schedule. For a single look at one query, a browser is enough and neither route is worth building. | | DIY Google Images scraper | Google Images endpoint | | --- | --- | --- | | Setup | Browser or fetch layer, grid parser, filter mapping, paging | API key in the `X-API-Key` header | | Per result | Whatever you can recover from the page | `position`, `thumbnail`, `source`, `title`, `link`, `original`, `original_width`, `original_height`, `is_product` | | Filters | Rebuilt clicks | `imgsz`, `imgtype`, `imgcolor`, `imgar`, `safe`, `tbs` (up to 500 characters) | | Language and country | Session or URL settings you manage | `hl` and `gl`, two characters each | | When the page changes | Fields go empty until you fix the parser | You read named JSON fields | | Blocks | Yours to handle | Not yours; failed calls cost 0 | | Throughput | As fast as the site tolerates | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | | Rights to the images | None granted | None granted | The last row is the same on both sides on purpose. The endpoint returns data collected from publicly available sources as found at the time of the call. It tells you where an image appears; it doesn't license the file. Before you download or republish anything from `original`, read the licence on the page in `link`, and the site's terms. ## What does a tracked image query cost? On the endpoint, cost follows calls: each query, with each filter combination and each page, is 1 call × 1 credit. So the item you price is a query-page, refreshed on a schedule. The useful question is how many variants of each query you need, because filters multiply calls. A colour study across three `imgcolor` values is three series, not one. | Plan | Calls a month | Credits a month | | --- | --- | --- | | 100 queries, page 1, weekly | 100 × 4 = 400 | 400 | | 100 queries, pages 1 and 2, weekly | 100 × 2 × 4 = 800 | 800 | | 100 queries × 3 `imgcolor` values, page 1, weekly | 300 × 4 = 1,200 | 1,200 | | 500 queries, page 1, daily | 500 × 30 = 15,000 | 15,000 | | 2,000 queries, pages 1 and 2, daily | 2,000 × 2 × 30 = 120,000 | 120,000 | The 100 free credits on signup cover one weekly run of the first plan. The Starter pack's 10,000 covers each of the first three plans for at least eight months, the 500-query daily run needs the Build pack's 50,000, and the last needs the Growth pack's 200,000. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) for how the `X-Credits-Used` and `X-Credits-Remaining` headers report each debit. ## How do you track where a site's images rank? A common recurring job is position tracking: for a list of queries, where do a given site's images appear, and are they flagged as products? The script below runs each query once, finds results whose `link` is on your domain, and records `position`, `original_width`, `original_height` and `is_product` to a CSV with the date. It reads only fields in the recorded response. ```python import csv import datetime import os from urllib.parse import urlparse import requests DOMAIN = "instacuppastore.com" QUERIES = ["coffee", "coffee recipe"] today = datetime.date.today().isoformat() with open("image_positions.csv", "a", newline="") as f: out = csv.writer(f) for q in QUERIES: resp = requests.get( "https://api.perceptlayer.com/v1/google-images/images", headers={"X-API-Key": os.environ["API_KEY"]}, params={"q": q, "gl": "us", "hl": "en"}, timeout=30, ) resp.raise_for_status() hits = [ r for r in resp.json() if urlparse(r["link"]).hostname and urlparse(r["link"]).hostname.endswith(DOMAIN) ] if not hits: out.writerow([today, q, "", "", "", ""]) for r in hits: out.writerow([today, q, r["position"], r["original_width"], r["original_height"], r["is_product"]]) print(q, len(hits), "hits, credits left", resp.headers.get("X-Credits-Remaining")) ``` A row with an empty position records that the domain wasn't on the page that day, which a tracker needs as much as the hits. The script stores no image files, only positions and sizes. Add a retry that waits for `Retry-After` on 429 and 503, and see the [errors docs](https://docs.perceptlayer.com/errors) for the full list of codes. ## Which route fits your job? Choose by what you'll keep from each result. If you keep metadata and pointers, the endpoint covers it at 1 credit a query-page. If you need the files themselves, both routes leave the licensing question with you, and a licensed image library may fit better than any search. - **Image position tracking for a site or brand**: use the endpoint on a weekly schedule and store `position`, `link` and `is_product`. 100 queries weekly is 400 credits a month. - **Product visibility in image results**: filter on `is_product` and record which `source` values show up for your product queries. - **Building a shortlist of candidate images**: use `imgsz=large` and `imgtype=photo`, keep `original_width`, `original_height` and `link`, then clear each image with its owner before you use it. - **A training set or archive of image files**: neither a scraper nor a search result grants rights to the files. Use a licensed source or images you own. - **An agent that needs to cite where an image appears**: give it the endpoint through the MCP server; `call_endpoint` spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. - **Learning how scraping works**: build against a practice site, not a search engine. If you're also tracking web results, [Rank Tracking API: Track Google Positions as JSON](https://perceptlayer.com/blog/rank-tracking-api) covers positions in regular search, and the [search engines APIs](https://perceptlayer.com/verticals/search) page lists the rest. To check the fields for your own queries, run the [Images endpoint](https://perceptlayer.com/apis/google-images/images) in the playground on the [Google Images API page](https://perceptlayer.com/apis/google-images), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Google Images **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/google-images) ## Frequently asked questions ### Is scraping Google Images allowed? That depends on Google's terms, the terms of the sites whose images appear, and the law where you operate, so read them and take legal advice for commercial use. Don't work around blocks or challenges. Collecting result metadata and links is a different question from copying image files, which are usually someone else's work. ### Can I download the images the endpoint returns? The endpoint returns URLs, not files. `original` points to the full-size file on its host, and `link` to the page that shows it. Downloading or republishing a file is your own request to someone else's site, and a search result doesn't license it. Check the licence on the `link` page first. ### How many results does one call return? The page size isn't documented, so don't build on a fixed number. The recorded `coffee` call returns an array starting at `position` 1, and the `page` parameter takes an integer for later pages. Run your query in the playground to see how many results come back before you plan credits per result. ### Does a failed Google Images call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Bad parameters return `invalid_parameters` (422). Rate-limited responses (429) carry a `Retry-After` header with the seconds to wait. ### How fast can I run a daily image query list? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so 500 queries take a little over eight minutes. Paying accounts run at least 5 a second (300 a minute), and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. google images scraping image search brand monitoring search api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Aug 2026 Perceptlayer 7 min read ## [Google Images API: Search Image Results as JSON](https://perceptlayer.com/blog/google-images-api-json) One GET to /v1/google-images/images returns image results as JSON for 1 credit: parameters, cURL and Python calls, a real response and licensing notes. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Threads Scraper or API: What You Get](https://perceptlayer.com/blog/threads-scraper-vs-api) A DIY Threads scraper versus 8 Threads endpoints at 1 credit a call: keyword search, topic tags, brand posts, upkeep, terms and the cost per tag tracked. --- title: "YouTube Scraper or API: What You Get | Perceptlayer" description: "A YouTube scraper versus 15 YouTube endpoints at 1 credit a call: search, video, channel, comments, transcripts, trending, and the cost per video tracked." url: https://perceptlayer.com/blog/youtube-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # YouTube Scraper or API: What You Get 5 Nov 2026 Perceptlayer 8 min read A YouTube scraper is code that loads YouTube pages and pulls titles, view figures, channel details, comments and transcripts out of what comes back. You maintain the fetching, the parsing and the fixes when either breaks. The other route is 15 YouTube endpoints that return the same kinds of data as JSON at 1 credit per successful call. This post compares the two job by job, works out the cost per video and channel tracked, and gives a verdict per use case. ## Key takeaways - A YouTube scraper needs a fetcher, a parser per page type (search, video, channel, comments, transcript) and a monitor that notices when a run quietly returns less. - `/v1/youtube/search` takes `query`, `order` ( `date`, `rating`, `relevance`, `viewCount`), `videoDuration`, `publishedAfter` and `publishedBefore`; `/v1/youtube/video` takes a `video_id` of up to 11 characters. - Tracking 500 videos once a day with `/v1/youtube/video` is 500 calls × 1 credit = 500 credits a day, or 1 credit per video per day. - A transcript is 1 credit per video and only needs fetching once, so 2,000 transcripts cost 2,000 credits. - The YouTube endpoints include restricted ones: accept the restricted-endpoint terms first, and use comments in aggregate, never to profile or contact commenters. ## What does building a YouTube scraper involve? A YouTube scraper is several small scrapers, one per kind of page, plus the code that keeps them honest. Search results, a video's page, a channel's page and its video list, comments and transcripts each have their own layout and their own way of loading more. Each one needs a fetcher, a parser and a check that the output still looks right. The fetcher is the easy part to write and the hard part to keep running. Pages on a large video site are built for browsers, so the fields you want may sit in the HTML, in data embedded in the page, or in later requests the page makes. You find out which by reading the page, and you find out again when it changes. Any site that size also has to tell people from automated traffic, so a scraper that runs daily at volume should expect slow responses, challenge pages and blocks. Getting around those protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. The parser is where silent failures live. A layout change rarely throws an error; it returns an empty view count, a missing date or half the comments. So the monitor matters as much as the scraper: compare each run's row counts and empty fields with the last run. Before you build any of it, read YouTube's terms of service. ## What do the YouTube endpoints cover? The [YouTube API](https://perceptlayer.com/apis/youtube) on Perceptlayer has 15 endpoints, all `GET`, all 1 credit per successful call. They map onto the page types a scraper would handle: search, a video, a channel and its videos, comments, transcripts and trending. Each returns JSON with named fields, so there's no parser of yours to break. Failed calls cost nothing and return `X-Credits-Used: 0`. | Job | Endpoint | Parameters you'll use first | | --- | --- | --- | | Search | `GET /v1/youtube/search` | `query`, `type`, `order`, `videoDuration`, `publishedAfter`, `publishedBefore`, `limit`, `continuation` | | One video | `GET /v1/youtube/video` | `video_id` | | A video's chapters | [`GET /v1/youtube/chapters`](https://perceptlayer.com/apis/youtube/chapters) | `video_id` | | A channel | [`GET /v1/youtube/channel`](https://perceptlayer.com/apis/youtube/channel) | `channel_id` | | A channel's videos | [`GET /v1/youtube/channel-videos`](https://perceptlayer.com/apis/youtube/channel-videos) | `channel_id`, `sort` ( `newest`, `popular`, `oldest`), `type` ( `videos`, `shorts`, `live`, `podcasts`) | | A channel's playlists | [`GET /v1/youtube/channel-playlists`](https://perceptlayer.com/apis/youtube/channel-playlists) | `channel_id` | | One playlist | [`GET /v1/youtube/playlist`](https://perceptlayer.com/apis/youtube/playlist) | `playlist_id` | | Comments | [`GET /v1/youtube/comments`](https://perceptlayer.com/apis/youtube/comments) | `video_id` (required), `limit` | | Transcript | `GET /v1/youtube/transcript` | `video_id`, `language` | | Trending | `GET /v1/youtube/trending` | `type` ( `now`, `music`, `gaming`, `movies`), `gl` | Several endpoints accept the same ID under two spellings: `channel_id` or `channelId`, `video_id` or `videoId`. Use one consistently. The rest of the set covers related videos, search suggestions, channel community posts, a second transcript endpoint keyed on `videoId`, and [Locales](https://perceptlayer.com/apis/youtube/locales), which takes no parameters. The reference documents types and allowed values only, so it states no defaults or page sizes. ### A search request This request searches for programming tutorials: ```bash curl "https://api.perceptlayer.com/v1/youtube/search?query=programming+tutorial" \ -H "X-API-Key: $API_KEY" ``` To filter it, add documented parameters. `order` takes `date`, `rating`, `relevance` or `viewCount`, and `videoDuration` takes `short`, `medium` or `long`: ```bash curl "https://api.perceptlayer.com/v1/youtube/search?query=programming+tutorial&type=video&order=date&videoDuration=long" \ -H "X-API-Key: $API_KEY" ``` No response is recorded for the YouTube endpoints yet, so this post doesn't show one. Run the call in the playground on the [YouTube API page](https://perceptlayer.com/apis/youtube) to see the fields, and check there whether search results carry IDs in the form `video` and `comments` expect before you chain them. ## How do a scraper and the endpoints compare? The scraper costs engineering time and carries terms and blocking risk; the endpoints cost credits per call and take the parsing and upkeep off your hands. The table compares them for a recurring job, such as following a few hundred videos and channels every day. | | DIY YouTube scraper | YouTube endpoints | | --- | --- | --- | | Setup | Fetcher, a parser per page type, storage, monitoring | API key in the `X-API-Key` header | | Search | Parse result pages and follow "load more" yourself | `search` with `order`, `videoDuration`, date bounds and `continuation` | | Video and channel details | Parse each page; fix the parser when the layout moves | `video`, `channel`, `channel-videos`, `chapters` | | Comments | Page through them yourself | `comments` with `video_id` and `limit` | | Transcripts | Find and parse the caption data per video | `transcript` with `video_id` and `language` | | Trending | Parse the trending page per region | `trending` with `type` and `gl` | | When pages change | Your parser breaks, often silently | You read named JSON fields | | Blocks and challenges | Yours to handle at volume | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | The official route is a third option, with its own trade-offs. [YouTube Data API Quota: Limits, Costs and Alternatives](https://perceptlayer.com/blog/youtube-data-api-quota) covers its daily quota and what search-heavy and transcript jobs run into, so this post doesn't repeat it. ## What does tracking a video or channel cost? On the endpoints, cost follows calls, and each call is 1 credit. A daily snapshot of one video is one `video` call, so 1 credit per video per day. A daily check on one channel is a `channel` call plus a `channel-videos` call sorted `newest`, so 2 credits per channel per day. You usually need a video's transcript once, so cache it and treat it as a one-off 1 credit. | Job | Calls | Credits | | --- | --- | --- | | 500 videos, snapshot once a day | 500 a day | 500 a day, 15,000 per 30 days | | 100 channels, `channel` + `channel-videos` daily | 200 a day | 200 a day, 6,000 per 30 days | | 2,000 transcripts, once | 2,000 | 2,000 | | 300 search queries, once a week | 300 a week | 300 a week, 15,600 a year | | Trending, 4 `type` values × 10 `gl` values, daily | 40 a day | 40 a day, 1,200 per 30 days | The 100 free credits on signup cover a small test of any of these jobs, or the first 2 days of the trending row. That row is 1,200 credits per 30 days, so the Starter pack's 10,000 covers about eight months of it. The 500-video job is 15,000 credits a month and needs purchased credits; the Build pack's 50,000 covers just over three months of it, and purchased credits last 12 months. At 500 calls, the free tier's 1 request a second finishes the run in under 9 minutes. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. Comments cost by the call, not by the comment. Each `comments` request is 1 credit, and `limit` is an optional integer whose range isn't documented, so test the values you need in the playground and count the comments per call before estimating a large job. ## What do the restricted-endpoint terms mean for YouTube data? The YouTube API includes restricted endpoints. They work after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard; until then a call returns `restricted_endpoint` (403) and costs nothing. The terms don't permit collecting personal data without a lawful basis or using it to contact people, which matters most for comments. Use comments in aggregate: how many a video draws, which topics or product names come up, how the mix changes after a release. Don't store commenters' names or handles, don't build profiles of individual viewers, and don't use comments to message anyone. Video, channel, transcript and trending data is public content about videos, so the job there is to respect the creators' rights in what you republish. Data is collected from publicly available sources and returned as found at the time of the call. ## Which route should you choose? Choose by what you track and how often, since that decides whether upkeep or per-call cost dominates. The verdicts below assume a recurring job. To look at a few videos once, open YouTube in a browser and skip both routes. - **Daily view and engagement snapshots for a fixed video list:** use `video` on a schedule and store the response with the run date. It's 1 credit per video per day. - **Watching competitors' or partners' channels for new uploads:** call `channel-videos` with `sort=newest` daily, and `channel` weekly for channel-level figures. Budget 2 credits per channel per day at most. - **Transcripts for search, summaries or an LLM corpus:** call `transcript` once per video with the `language` you need, and cache the result. It's a one-off 1 credit per video. - **Topic research across many videos:** run `search` with `order` and the `publishedAfter` and `publishedBefore` bounds, weekly, then fetch details only for the videos you keep. - **Audience feedback on your own videos:** `comments` in aggregate, counted and grouped by topic, without storing who wrote what. - **An app that uploads, manages or acts for signed-in YouTube users:** these endpoints don't do that; look at YouTube's own developer options. - **Learning how scraping works:** build a scraper against a practice site, not a large video platform. For an agent that answers "what's trending in gaming" or "summarise this video", connect the MCP server so it calls `trending` or `transcript` directly; the [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. [TikTok API: Official Options and Public Trend Data](https://perceptlayer.com/blog/tiktok-api-trend-data) covers the same kind of trend data on another platform. To test the fields for your own job, run `search` in the playground on the [YouTube API page](https://perceptlayer.com/apis/youtube), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [YouTube **1 credit per call** · 15 endpoints](https://perceptlayer.com/apis/youtube) ## Frequently asked questions ### Is scraping YouTube allowed? That depends on YouTube's terms of service, the rights in the content you store or republish, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Video facts and aggregate figures are lower risk than personal data; leave commenters' names and handles out of anything you keep. ### How much does a YouTube transcript cost? One `GET /v1/youtube/transcript` call per video, at 1 credit when it succeeds. Pass the `video_id` and, if you need a specific one, a `language`. You usually need each transcript once, so cache it: 2,000 transcripts cost 2,000 credits. A failed call costs nothing and returns `X-Credits-Used: 0`. ### Can I get YouTube comments without a scraper? Yes. `GET /v1/youtube/comments` takes a required `video_id` of up to 11 characters and an optional `limit`, and costs 1 credit per successful call. It's a restricted endpoint: accept the restricted-endpoint terms first, use comments in aggregate, and don't use them to profile or contact the people who wrote them. ### How do I get more search results than one call returns? `GET /v1/youtube/search` takes `page` and `continuation` as optional parameters, and `limit` as an optional integer. The reference doesn't document page sizes or how continuation values are issued, so check a response in the playground before you build paging. Each further page is a separate call at 1 credit. ### What happens when a YouTube call fails? You pay nothing. The response has an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns `rate_limited` (429) with a `Retry-After` header in seconds. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. youtube scraping video data transcripts channel analytics ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 24 Oct 2026 Perceptlayer 6 min read ## [YouTube Data API Quota: Limits, Costs and Alternatives](https://perceptlayer.com/blog/youtube-data-api-quota) YouTube Data API quota: 100 search.list calls and 10,000 units a day by default, 200 units per caption download. The arithmetic, and a per-call alternative. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. --- title: "Google Flights Scraper or API: What You Get | Perceptlayer" description: "Compare a Google Flights scraper with 9 endpoints at 1 credit a call: a recorded JFK to LAX search with price, stops, CO2 and a booking_token per flight." url: https://perceptlayer.com/blog/google-flights-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Flights Scraper or API: What You Get 4 Nov 2026 Perceptlayer 9 min read A Google Flights scraper has to fill in a search the way a person would, wait for fares to load, and read price, airline, stops, times and emissions off every result card. You maintain the form logic, the parsing and the waiting. The alternative is 9 Google Flights endpoints that take the search as query parameters and return each flight as JSON at 1 credit per successful call. This post compares the two on a recorded one-way JFK to LAX search, works out the cost per route tracked, and gives a verdict per use case. ## Key takeaways - A fare scraper rebuilds four things: the search state (route, date, passengers, cabin, stops), the result-card parser, a wait for slow searches, and the hand-off from a result to its booking options. - `GET /v1/google-flights/one-way` takes `origin`, `destination` and `departure_date`, and returns `flights[]` with `price`, `currency`, `stops`, `airline_name`, `total_duration_minutes`, `emissions`, `booking_token` and `legs[]`. - The response echoes the search it ran in `search_metadata`: passengers, `cabin_class`, `max_stops`, `sort_by`, `currency`, and a `response_time_ms` of 5598 on the recorded call. - Cost follows route-date pairs: 5 routes × 30 departure dates checked once a day is 150 calls × 1 credit = 150 credits a day, or 4,500 credits over a 30-day month. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What does a Google Flights scraper have to rebuild? A flight search page is an application, not a document, so a scraper for it is closer to a test script than a parser. It has to set the route, the date, the passenger counts, the cabin and any stop filter, start the search, wait until results finish loading, and then read each result card. The description here is general engineering for any interactive fare search, not a claim about how Google Flights is built. Four parts carry most of the upkeep: ### Search state Every combination of route, date, passengers, cabin and filters is a different search. A scraper has to reproduce that state through the page, usually by driving a headless browser, and has to confirm the page actually applied it. A search that silently fell back to one adult in economy looks like valid data. ### The result-card parser Each card mixes a price string, an airline name, departure and arrival times, a duration like "6 hr 24 min", a stop count and often an emissions note. All of it is display text you turn into numbers, and any layout change can move or rename it without an error. ### Waiting Fare searches take seconds, not milliseconds. A scraper needs a rule for when the results are complete, a timeout, and a retry policy, and each browser session it holds open costs memory while it waits. ### The hand-off A tracker that finds a fare often needs the booking options behind it. On a page that means clicking through and parsing a second view; in code it means keeping some reference to the result you clicked. Read Google's terms before you automate any of this, and if you hit blocks or challenge pages, stop rather than work around them. ## What does the one-way endpoint return for JFK to LAX? One call to the one-way endpoint runs a full search and returns each flight with its fare, carrier, stops, duration, emissions and legs already typed. The required parameters are `origin` and `destination` (up to 3 characters each) and `departure_date`. It costs 1 credit per successful call, and the [one-way endpoint page](https://perceptlayer.com/apis/google-flights/one-way) lists all 24 of its parameters. ```bash curl "https://api.perceptlayer.com/v1/google-flights/one-way?origin=JFK&destination=LAX&departure_date=2026-12-15" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the second flight and the search metadata: ```json { "flights": [ … { "price": 189, "currency": "USD", "total_duration_minutes": 378, "stops": 0, "airline_name": "Delta", "emissions": { … "co2_kilograms": 244, … "typical_co2_kilograms": 344, "difference_percent": -29 }, "booking_token": "CjRISVFvemhYdy1QZTBBQTR3SXdCRy0tLS0tLS0tLWVqY3J5N0FBQUFBR3JhOFJBQUFyOGdBEgVETDc3MxoLCJiTARACGgNVU0Q4HHCYkwE=", "legs": [ { "airline": "DL", "flight_number": "773", "departure_airport": "JFK", "arrival_airport": "LAX", "departure_time": "2026-12-15T09:00:00", "arrival_time": "2026-12-15T12:18:00", "duration_minutes": 378 } ] } ], "search_metadata": { "origin": "JFK", "destination": "LAX", "departure_date": "2026-12-15", "passengers": { "adults": 1, "children": 0, … }, "cabin_class": "Economy", "exclude_basic": false, "max_stops": "Any number of stops", "sort_by": "Top Flights", … "currency": "USD", "response_time_ms": 5598 } } ``` The `search_metadata` block answers the scraper's search-state problem: it records the passengers, cabin, stop filter, sort and currency the search ran with, so you can store it next to the fares and check it on every run. The first flight in the same response is a JetBlue nonstop at 179 USD with `co2_kilograms: 426` and `difference_percent: 24`, so the two results differ by 10 USD and 182 kg of estimated CO2. ## How do the scraper's form controls map to parameters? Each control a scraper would set on the page has a query parameter on the one-way endpoint, with its allowed values listed in the catalogue. That turns the search state into a URL you can log, diff and replay. The table covers the parameters a fare tracker reaches for first; round trips use the same names on `/v1/google-flights/round-trip`, plus `return_date`. | What a scraper would set | Parameter | Allowed values or type | | --- | --- | --- | | From, to | `origin`, `destination` | string, up to 3 characters | | Date | `departure_date` | string | | Passengers | `adults`, `children`, `infants_in_seat`, `infants_on_lap` | integer | | Cabin | `cabin_class` | `economy`, `premium_economy`, `business`, `first` | | Stops | `max_stops` | `any`, `nonstop`, `one_or_fewer`, `two_or_fewer` | | Sort | `sort_by` | `top_flights`, `cheapest`, `departure_time`, `arrival_time`, `duration`, `emissions` | | Airlines | `airlines[]` | list of 2-character strings | | Time windows | `departure_time_min`, `departure_time_max`, `arrival_time_min`, `arrival_time_max` | integer | | Price and duration caps | `max_price`, `max_duration_minutes` | integer | | Currency, language, country | `currency`, `hl`, `gl` | string | If your input is a city name rather than an airport code, `/v1/google-flights/autocomplete` takes `q`, and the [airports endpoint](https://perceptlayer.com/apis/google-flights/airports) needs no parameters. ### A tracker that reads only recorded fields This Python sketch runs the recorded search with a nonstop filter and prints one line per flight. It reads only fields that appear in the recording, and its timeout sits well above the recorded 5,598 ms: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/google-flights/one-way", params={ "origin": "JFK", "destination": "LAX", "departure_date": "2026-12-15", "max_stops": "nonstop", "sort_by": "cheapest", }, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60, ) resp.raise_for_status() body = resp.json() meta = body["search_metadata"] print(meta["cabin_class"], meta["max_stops"], meta["currency"]) for f in body["flights"]: legs = "+".join(leg["airline"] + leg["flight_number"] for leg in f["legs"]) co2 = f.get("emissions", {}).get("difference_percent") print(f["price"], f["currency"], f["airline_name"], legs, f["stops"], "stops", f["total_duration_minutes"], "min", co2, "% CO2") ``` ## How should you read the times and durations? Read the times as local clock times and the durations as the real elapsed minutes, and never derive one from the other. In the recording, the JetBlue leg departs at `2026-12-15T08:01:00` and arrives at `2026-12-15T11:25:00`, which is 3 hours 24 minutes on the clock, yet `duration_minutes` is 384, or 6 hours 24 minutes. The three-hour gap is the difference between New York and Los Angeles time. The timestamps carry no UTC offset, so a scraper or a pipeline that subtracts them gets the wrong duration on every coast-to-coast flight. Use `total_duration_minutes` and each leg's `duration_minutes` for elapsed time, and if you need absolute timestamps, attach the airports' time zones yourself. For multi-leg itineraries, `legs[]` lists each flight with its own `departure_airport`, `arrival_airport` and `flight_number`, so connections come out as rows rather than as text you split. The `booking_token` covers the scraper's hand-off problem. Each flight carries one, and `/v1/google-flights/booking-details` takes a `booking_token` together with `origin`, `destination`, `departure_date`, `airline` and `flight_number`, so the names match the one-way fields. Try a recorded token on the [booking details endpoint](https://perceptlayer.com/apis/google-flights/booking-details) in the playground before you build on that step. ## How do a scraper and the endpoints compare? A scraper costs engineering time and browser hours and carries breakage and blocking risk; the endpoints cost a credit per search and return typed fields. The table compares them for a recurring fare tracker that checks a fixed set of routes and dates every day. | | DIY fare scraper | Google Flights endpoints | | --- | --- | --- | | Setup | Headless browser, form-filling script, card parser, storage, monitoring | API key in the `X-API-Key` header | | Search state | Set through the page; must be verified each run | Query parameters, echoed back in `search_metadata` | | Fare fields | Parsed from price, duration and stop text | `price`, `currency`, `stops`, `total_duration_minutes`, `airline_name` | | Emissions | Parsed from a note, if shown | `emissions` with `co2_kilograms`, `typical_co2_kilograms`, `difference_percent` | | Connections | Split from card text | `legs[]` with airline, flight number, airports, times, minutes | | Booking hand-off | Click through and parse a second view | `booking_token` per flight; names match `booking-details` | | Slow searches | A browser held open per search | One HTTP call; recorded `response_time_ms` of 5598 | | When the page changes | Your scripts break, often silently | You read named JSON fields | | Cost | Hosting, browser time and your time | 1 credit per successful call; failed calls cost 0 | ## What does a tracked route cost? On the endpoints, the unit of cost is one route on one departure date: each one-way search is 1 credit, however many flights it returns. A tracker's bill is routes × dates × checks a day. Round trips cost the same 1 credit per call on `/v1/google-flights/round-trip`. | Plan | Calls a day | Credits over 30 days | | --- | --- | --- | | 1 route, next 30 departure dates, once a day | 1 × 30 = 30 | 900 | | 5 routes, next 30 dates, once a day | 5 × 30 = 150 | 4,500 | | 20 routes, next 60 dates, once a day | 20 × 60 = 1,200 | 36,000 | The 100 free credits on signup cover the first three days of the first plan. Over 30 days the first two plans fit inside the Starter pack's 10,000, and the third inside the Build pack's 50,000. Before you multiply calls by dates, look at `/v1/google-flights/date-range` and `/v1/google-flights/calendar`, which take a start and end date in one call; check in the playground whether their output covers your question, because that changes the arithmetic. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Plan for the time a search takes as well as its price. At the recorded 5,598 ms, a loop that waits for each call before sending the next manages about one call every 5.6 seconds, below even the free 1 request a second. To use a paid rate of 5 a second you need several requests in flight. Set client timeouts well above the search time: requests have no idempotency key, so a call whose reply you abandoned may have succeeded and been billed. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the per-minute headers. ## Which route should you choose? Choose by how many route-date pairs you watch and what you do with the fares. For one trip you're planning yourself, search in a browser and skip both routes. - **A daily fare tracker for a fixed set of routes**: use `one-way` or `round-trip` on a schedule and store `price`, `currency`, `stops`, `legs[].flight_number` and the full `search_metadata` with the run date. Budget routes × dates credits per day. - **Finding the cheapest date in a window**: start with `date-range` or `calendar` rather than one call per date, and confirm their fields in the playground. - **Comparing emissions across carriers**: read `emissions.difference_percent` per flight; the recorded route shows -29 and 24 for two nonstops 10 USD apart. - **An agent that answers "when should I fly" questions**: connect it through MCP, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls the search instead of driving a browser. - **Comparing Google Flights with another fare source**: [Flight API: Google Flights and Kiwi Data as JSON](https://perceptlayer.com/blog/flight-api-comparison) puts the two side by side. - **Learning browser automation**: practise on a site built for it, not a live fare search. To check the fields for your own routes, run `one-way` with your airports in the playground on the [Google Flights API page](https://perceptlayer.com/apis/google-flights), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Google Flights **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-flights) ## Frequently asked questions ### Is scraping Google Flights allowed? That depends on Google's terms of service and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Fares, schedules and emissions estimates are not personal data, but keep any traveller details your own product collects separate from what you fetch. ### How much does a Google Flights API call cost? Each of the 9 Google Flights endpoints costs 1 credit per successful call. A one-way search for one route and one date is 1 credit whatever the number of flights returned, so tracking 5 routes across 30 dates once a day is 150 credits a day. Failed calls cost nothing and return `X-Credits-Used: 0`. ### Why doesn't arrival time minus departure time match the duration? The `departure_time` and `arrival_time` values are local clock times without a UTC offset. On the recorded JFK to LAX flight the clock shows 3 hours 24 minutes while `duration_minutes` is 384, because Los Angeles is three hours behind New York. Use the duration fields for elapsed time. ### How long does a flight search take? The recorded one-way search reported `response_time_ms` of 5598 in its `search_metadata`, so plan for searches measured in seconds. Set your client timeout well above that, because an abandoned request may still have succeeded and been billed. To run many searches quickly, keep several requests in flight within your account's rate limit. ### What happens when a call fails? You get an HTTP status and a JSON body with an error `code`, `message` and `request_id`, and no credits are debited. Invalid parameters return 422, a rate-limited call returns 429 with a `Retry-After` header, and `source_error` comes back as 502. The [errors docs](https://docs.perceptlayer.com/errors) list every code. google flights scraping flight prices fare tracking travel data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 29 Oct 2026 Perceptlayer 7 min read ## [Flight API: Google Flights and Kiwi Data as JSON](https://perceptlayer.com/blog/flight-api-comparison) Compare Google Flights and Kiwi.com flight search as JSON: price, stops, duration, CO2 or baggage per itinerary, date-range calls, 1 credit per route per date. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Booking.com Scraper or API: What You Get](https://perceptlayer.com/blog/booking-com-scraper-vs-api) A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 9 min read ## [Vrbo Scraper or API: What You Get](https://perceptlayer.com/blog/vrbo-scraper-vs-api) A Vrbo scraper vs 6 endpoints at 1 credit a call: a recorded Lake Tahoe search with stay\_total, nightly\_original and rating, and the cost per listing. --- title: "LinkedIn Jobs API: Job Listings as JSON | Perceptlayer" description: "Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job." url: https://perceptlayer.com/blog/linkedin-jobs-api --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # LinkedIn Jobs API: Job Listings as JSON 4 Nov 2026 Perceptlayer 7 min read A LinkedIn jobs API call returns public LinkedIn job listings as JSON. Two endpoints do the work: `GET /v1/linkedin/jobs-search` takes a `query`, and `GET /v1/linkedin/job` takes the `url` of one posting. Each successful call costs 1 credit and failed calls cost nothing. This post covers both endpoints' parameters, a cURL request, and a weekly hiring-signal job for a list of companies that costs 1 credit per company per week. ## Key takeaways - `GET /v1/linkedin/jobs-search` requires `query` (up to 2,048 characters) and takes 12 optional parameters, including `sort` ( `date`, `date:r` or `date:d`) and `dateRestrict`. - `GET /v1/linkedin/job` requires a posting `url`; `GET /v1/linkedin/company` takes a company `url` or `company_id`. - A hiring-signal job with one search per company per week costs 1 credit per company per week: 150 companies is 150 credits a week, 7,800 a year. - LinkedIn endpoints include restricted ones: accept the restricted-endpoint terms first, and keep the job to postings and companies, not people. - No response is recorded yet, so store raw JSON and check the fields in the playground before you parse anything. ## Which LinkedIn endpoints return jobs? The [LinkedIn API](https://perceptlayer.com/apis/linkedin) has 11 endpoints, and three of them matter for job data. [Jobs Search](https://perceptlayer.com/apis/linkedin/jobs-search) finds postings from a text query. [Job](https://perceptlayer.com/apis/linkedin/job) returns one posting from its URL. [Company](https://perceptlayer.com/apis/linkedin/company) returns a company page, which puts the employer behind a set of postings in context. All three are `GET` and cost 1 credit per successful call. | Endpoint | Starts from | Required | Credits | | --- | --- | --- | --- | | `GET /v1/linkedin/jobs-search` | A text query | `query` | 1 | | `GET /v1/linkedin/job` | A posting URL | `url` | 1 | | `GET /v1/linkedin/company` | A company URL or ID | none ( `url` or `company_id`) | 1 | | `GET /v1/linkedin/company-posts` | A company slug | `slug` | 1 | The API also has profile and post endpoints. This post doesn't use them: a hiring signal is about what companies advertise, and it needs nothing about individual people. [Company Posts](https://perceptlayer.com/apis/linkedin/company-posts) is the one extra worth knowing: it returns a company's posts from its `slug`. ## Which parameters does jobs-search take? `jobs-search` takes one required parameter, `query`, and twelve optional ones. The reference documents types, lengths and allowed values, and nothing else: no defaults, no page sizes and no description of what each optional parameter changes. Treat the table as the contract, and try any optional parameter in the playground before a job depends on it. | Parameter | Type | Required | Allowed values or limit | | --- | --- | --- | --- | | `query` | string | yes | up to 2,048 characters | | `num` | integer | no | none stated | | `start` | integer | no | none stated | | `page` | integer | no | none stated | | `hl` | string | no | up to 2 characters | | `lr` | string | no | none stated | | `gl` | string | no | up to 2 characters | | `cr` | string | no | none stated | | `safe` | string | no | `active`, `off` | | `dateRestrict` | string | no | none stated | | `sort` | string | no | `date`, `date:r`, `date:d` | | `filter` | integer | no | `0`, `1` | | `rights` | string | no | `cc_publicdomain`, `cc_attribute`, `cc_sharealike`, `cc_noncommercial`, `cc_nonderived` | The single-posting and company endpoints are smaller: | Endpoint | Parameter | Type | Required | | --- | --- | --- | --- | | `job` | `url` | string | yes | | `job` | `use_cache` | boolean | no | | `job` | `maximum_cache_age` | integer | no | | `company` | `url` | string | no | | `company` | `company_id` | string | no | | `company` | `use_cache` | boolean | no | | `company` | `maximum_cache_age` | integer | no | A value outside the allowed list, such as `sort=newest`, returns `invalid_parameters` (422) and costs nothing. ## How do you request LinkedIn job listings with cURL? Send a `GET` request with your key in the `X-API-Key` header and a URL-encoded `query`. The request below searches for data engineer postings. Keys start with `sk_live_`; where you can't set a header, pass the key as the `api_key` query parameter, as the [authentication docs](https://docs.perceptlayer.com/authentication) describe. ```bash curl "https://api.perceptlayer.com/v1/linkedin/jobs-search?query=data+engineer+berlin" \ -H "X-API-Key: $API_KEY" ``` To fetch one posting, pass its public URL, URL-encoded: ```bash curl -G "https://api.perceptlayer.com/v1/linkedin/job" \ --data-urlencode "url=$POSTING_URL" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for the LinkedIn endpoints, so this post doesn't show one. Run `jobs-search` with your own query in the playground on the [LinkedIn API page](https://perceptlayer.com/apis/linkedin) to see the response shape. Check there, too, whether search results carry posting URLs you can pass to `job`, before you write code that chains the two. ### What do the headers tell you? The headers are documented even where the body isn't. A successful response carries `X-Credits-Used`, what the call cost, and `X-Credits-Remaining`, your balance after it, plus `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`. An error returns an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. The [requests and responses docs](https://docs.perceptlayer.com/requests) cover the format. ## How do you build a weekly hiring signal for a list of companies? A hiring signal answers one question per company per week: did its advertised openings change? Run one `jobs-search` call per company on a fixed schedule, with a fixed query such as the company name plus a role family. Store each raw response with the company, the query and the date. The signal is the week-over-week change, so the query has to stay the same from week to week. Fixed inputs matter more than coverage. A company that adds ten engineering postings in a month shows up as a run of changed results for the same query. Change the query halfway through and you can't tell a hiring change from a search change. Job postings measure advertised demand, not hires, which [Job Posting Data for Labour-Market Research](https://perceptlayer.com/blog/job-posting-data-labour-market-research) covers in depth. ### A weekly collector in Python This script uses `requests` and the standard library. It runs one search per company, stores the body and the credit header in SQLite, and flags a company when its response differs from last week's. It hashes the whole body instead of reading fields, because no response is recorded yet; once you've seen real results in the playground, replace the hash with a count of postings. ```python import hashlib import json import os import sqlite3 import time from datetime import date import requests API = "https://api.perceptlayer.com/v1/linkedin/jobs-search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} COMPANIES = ["Acme Analytics", "Northwind Logistics", "Contoso Health"] ROLE = "data engineer" db = sqlite3.connect("hiring.db") db.execute( """CREATE TABLE IF NOT EXISTS runs ( run_date TEXT, company TEXT, query TEXT, status INTEGER, credits_used TEXT, body_hash TEXT, body TEXT, PRIMARY KEY (run_date, company) )""" ) def search(query): while True: resp = requests.get(API, headers=HEADERS, params={"query": query}, timeout=60) if resp.status_code == 429: time.sleep(int(resp.headers.get("Retry-After", "1"))) continue return resp today = date.today().isoformat() for company in COMPANIES: query = f"{company} {ROLE}" resp = search(query) body = json.dumps(resp.json(), sort_keys=True) body_hash = hashlib.sha256(body.encode()).hexdigest() if resp.ok else None previous = db.execute( "SELECT body_hash FROM runs WHERE company = ? AND run_date < ? " "AND body_hash IS NOT NULL ORDER BY run_date DESC LIMIT 1", (company, today), ).fetchone() db.execute( "INSERT OR REPLACE INTO runs VALUES (?, ?, ?, ?, ?, ?, ?)", (today, company, query, resp.status_code, resp.headers.get("X-Credits-Used"), body_hash, body), ) db.commit() if body_hash and previous and previous[0] != body_hash: print(f"{company}: results changed since last run") elif not resp.ok: print(f"{company}: HTTP {resp.status_code}, not billed") time.sleep(1) # stays inside the free tier's 1 request a second ``` A changed hash is a prompt to look, not a measurement: results can differ for reasons other than new postings. Its value is in cutting a list of 150 companies down to the handful worth opening this week. Failed calls store the error body and cost nothing; the [errors docs](https://docs.perceptlayer.com/errors) list the codes. ## What does a hiring signal cost per company per week? One `jobs-search` call per company per week costs 1 credit per company per week. The arithmetic scales directly with the list: 150 companies × 1 call × 1 credit = 150 credits a week, or 150 × 52 = 7,800 credits a year. Two role families per company doubles it. A monthly `company` call per employer for context adds 1 credit per company per month. | Job | Calls a week | Credits a week | Credits a year | | --- | --- | --- | --- | | 50 companies, 1 query each | 50 | 50 | 2,600 | | 150 companies, 1 query each | 150 | 150 | 7,800 | | 150 companies, 2 queries each | 300 | 300 | 15,600 | | 500 companies, 2 queries each | 1,000 | 1,000 | 52,000 | The 100 free credits on signup cover the first 2 weeks of the 50-company job, or a first run for 100 companies. The Starter pack's 10,000 credits covers either of the first two rows for a year. The last row is about 4,330 credits a month; the Build pack's 50,000 credits covers a little under a year of it, and purchased credits last 12 months. Opening the postings behind a changed result with `job` adds 1 credit each. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. ## What do the restricted-endpoint terms mean for job data? The LinkedIn API includes restricted endpoints, which work only after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard. Until then a call returns `restricted_endpoint` (403) and costs nothing. The terms don't permit collecting personal data without a lawful basis or using it to contact people, and that decides the shape of a hiring-signal job. Keep the job to postings and companies: how many roles a company advertises, in which functions and places, and how that changes over time. Don't use job data to find, track or profile individual people, such as recruiters named on a posting, and don't use it to message anyone. If a response includes a person's details, drop them before storage. Read LinkedIn's own terms before you build on its data, and get legal advice for commercial use. Data is collected from publicly available sources and returned as found at the time of the call. ## Where does LinkedIn fit among job sources? LinkedIn is one jobs source, and a hiring signal is sturdier with more than one. [Jobs API: Indeed, Glassdoor and Google Jobs Compared](https://perceptlayer.com/blog/jobs-api-comparison) covers three other sources with recorded responses, which helps when you need fields you can parse today. For pay, [Salary Data from Job Sites](https://perceptlayer.com/blog/salary-data-job-sites-bias) explains how to read posted ranges. The [web data hub](https://perceptlayer.com/blog/category/web-data) has more. To start, run `jobs-search` with one of your companies in the playground on the [LinkedIn API page](https://perceptlayer.com/apis/linkedin), then [get a free API key](https://perceptlayer.com/signup) and schedule the collector weekly. ## APIs in this post - [LinkedIn **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/linkedin) ## Frequently asked questions ### Is there a LinkedIn jobs API for public job listings? Perceptlayer's LinkedIn endpoints work with one API key: `GET /v1/linkedin/jobs-search` searches postings by `query`, and `GET /v1/linkedin/job` returns one posting by `url`. Each successful call costs 1 credit. They include restricted endpoints, so accept the restricted-endpoint terms in your dashboard before the first call. Every account gets 100 free credits on signup. ### How much does it cost to track hiring at a company? One search per company per week costs 1 credit per company per week, or 52 credits a company a year. A list of 150 companies is 150 credits a week and 7,800 a year. Failed calls cost nothing and return `X-Credits-Used: 0`, so a week with errors only charges for the searches that succeeded. ### Can I get the people who posted a job or work at a company? Not for this kind of job. The restricted-endpoint terms don't permit collecting personal data without a lawful basis or using it to contact people. Use LinkedIn job data for postings and companies in aggregate, such as advertised roles by function and location over time, and leave personal details out of what you store. ### How do I page through more jobs-search results? The reference lists `num`, `start` and `page` as optional integers but doesn't document what they do or any page size. Test them in the playground with a query you know well and compare the results before relying on them. Each page you request is a separate call and costs 1 credit. ### What happens when I hit the rate limit? The call returns `rate_limited` (429) with a `Retry-After` header giving the seconds to wait, and costs nothing. Limits are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second; paying accounts get at least 5. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. linkedin jobs job postings hiring signals company research ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 1 Oct 2026 Perceptlayer 8 min read ## [Job Posting Data for Labour-Market Research](https://perceptlayer.com/blog/job-posting-data-labour-market-research) Which Indeed posting fields support trend analysis, where postings mislead versus hires, and a weekly collection plan that costs 3,000 credits a month. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 27 Oct 2026 Perceptlayer 8 min read ## [Jobs API: Indeed, Glassdoor and Google Jobs Compared](https://perceptlayer.com/blog/jobs-api-comparison) Indeed returns postings with apply\_url and coordinates, Glassdoor returns ratings, reviews and pay percentiles, Google Jobs adds date filters. 1 credit a call. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 20 Sept 2026 Perceptlayer 7 min read ## [Salary Data from Job Sites: Reading Ranges Without Bias](https://perceptlayer.com/blog/salary-data-job-sites-bias) Glassdoor's salaries endpoint returns p10 to p90 total pay, a currency and a national count. How to read those ranges and the biases of self-reported pay. --- title: "TikTok Scraper or API: Hashtag, Sound and Trend Data" description: "A TikTok scraper next to 31 TikTok endpoints at 1 credit a call: trending hashtags by country, hashtag and sound posts, and 2 credits per hashtag tracked a day." url: https://perceptlayer.com/blog/tiktok-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # TikTok Scraper or API: Hashtag, Sound and Trend Data 4 Nov 2026 Perceptlayer 9 min read A TikTok scraper is a program that loads public TikTok pages, follows hashtags and sounds, and pulls the posts and counts out of what each page sends back, with you fixing it every time something changes. The alternative is a set of TikTok endpoints that return the same public data as JSON at 1 credit per successful call. For trend work (which hashtags are rising in a country, how much a sound is used, what's posted on a topic), the endpoints cost about 2 credits per hashtag tracked a day. This post compares the two job by job. ## Key takeaways - A trend job on TikTok needs four kinds of public data: trending hashtags by country, posts under a hashtag, posts using a sound, and posts matching a keyword. Each is its own endpoint at 1 credit. - `GET /v1/tiktok/trending-hashtags` takes a two-character `country_code` and an optional `time_range` of `7` or `30`. - Tracking 50 hashtags daily with `challenges-details` plus one page of `challenges-posts` is 50 × 2 × 30 = 3,000 credits a month, inside the Starter pack's 10,000. - All 31 TikTok endpoints are restricted: they work after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints), which don't permit collecting personal data without a lawful basis or using it to contact people. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a hashtag that returns an error doesn't touch your balance. ## Which TikTok data does a trend job need? A trend job needs aggregate signals, not people. The questions are what's rising in a market, how often a hashtag or sound is used, and what gets posted about a topic. That narrows TikTok to four objects: the trending list for a country, a hashtag (the endpoints call these challenges), a sound, and keyword search over posts. Two more help with analysis: a single public video and its transcript. Everything in this post stays inside that frame. The TikTok API in the catalogue also has user-level endpoints; this post leaves them out, because follower lists and individual tracking are a different job with a different legal footing. If your question is "who posted this" rather than "what is being posted", stop and read the terms before you build anything. | Object | Question it answers | Endpoint | Required | | --- | --- | --- | --- | | Trending list | What's trending in this country? | `GET /v1/tiktok/trending-hashtags` | `country_code` | | Hashtag search | Which hashtags exist for this topic? | `GET /v1/tiktok/challenges-search` | `keywords` | | Hashtag | How big is this hashtag, and what's posted under it? | `challenges-details`, `challenges-posts` | `challenge_id` or `challenge_name` | | Sound | What's posted with this sound? | `music-details`, `music-posts` | `url`, `music_id` | | Keyword feed | What's posted about this topic? | `GET /v1/tiktok/feed-search` | `keywords` | | One video | What does this public video say? | `GET /v1/tiktok/video`, `GET /v1/tiktok/transcript` | `url` (transcript: `url` or `video_id`) | ## What does each piece cost to build yourself? Every object in the table is a separate collector if you scrape it: its own pages to fetch, its own data to locate, its own paging to follow and its own way of breaking. The work below is general engineering for any large, script-heavy video platform, not a description of TikTok's systems. The endpoint side is what the catalogue lists. ### Trending hashtags by country A scraper has to fetch the trending view for each country you care about, which usually means sending requests that look like they come from that country, and then find the list inside the page or the data it loads. It has to do this on a fixed schedule, because a trend list only tells you something when you can compare it with earlier days. The endpoint is one call per country and window: `country_code` (up to 2 characters) and `time_range` of `7` or `30`. Ten countries checked daily is 10 × 30 = 300 credits a month. ### Hashtags and the posts under them A scraper resolves a hashtag to its page, reads whatever counts the page shows, then pages through its posts. Paging on a feed that loads as you scroll is the fragile part: the scraper has to reproduce whatever token or offset the page uses, and that tends to change without notice. The endpoints split the job. `challenges-search` finds hashtags from `keywords`, `challenges-details` describes one by `challenge_id` or `challenge_name`, and `challenges-posts` returns its posts with `count` and `cursor` for paging and an optional `region`. Here is the catalogue's example search: ```bash curl "https://api.perceptlayer.com/v1/tiktok/challenges-search?keywords=cosplay&count=10&cursor=0" \ -H "X-API-Key: $API_KEY" ``` ### Sounds and the posts that use them Sounds work like hashtags for a scraper: a page per sound, counts to read and a feed of posts to page through. The extra step is resolving a sound from a video, since a sound is usually something you notice in a video first. On the endpoints, `music-details` takes a sound's `url`, and `music-posts` takes a `music_id` with `count` and `cursor`. We have no recorded response for either, so check in the playground which value in the details response you pass as `music_id`. ### Keyword search, single videos and transcripts Search is the hardest page to scrape reliably, because results depend on filters and sorting the scraper has to drive through the interface. Transcripts are harder still: a scraper would have to find a caption track, or download audio and run speech recognition itself. `feed-search` takes `keywords` plus optional `region`, `publish_time`, `sort_type`, `count` and `cursor`. The integer values `publish_time` and `sort_type` accept aren't documented here, so test them in the playground before you rely on them. `video` takes a public video's `url` and an optional `hd` flag; `transcript` takes a `url` or `video_id` and an optional `language`. ## Which TikTok endpoints are restricted, and what do the terms allow? The TikTok API includes restricted endpoints, because social data can identify people. A restricted endpoint works once you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard; before that, a call returns `restricted_endpoint` (403) and costs nothing. The terms don't permit collecting personal data without a lawful basis, or using the data to contact people. In practice that means three habits for a trend job. Aggregate before you store: keep counts per hashtag, sound and country, not rows per person. Don't build lists of accounts from post data, and never use anything you collect for outreach. And keep the raw responses only as long as your analysis needs them. Data is collected from publicly available sources and returned as found at the time of the call. The same rules apply to a scraper you write yourself, and you'd also have to read TikTok's terms before running one. ## How do a TikTok scraper and the endpoints compare? A scraper costs engineering time for each object it collects and carries blocking and terms risk; the endpoints cost credits per call and remove fetching, parsing and paging code. The table compares them for a recurring trend job, such as a daily report on hashtags and sounds in five countries. | | DIY TikTok scraper | TikTok endpoints | | --- | --- | --- | | Setup | One collector per object: trending, hashtag, sound, search, video | One API key in the `X-API-Key` header | | Country targeting | Requests that appear to come from each country | `country_code` on `trending-hashtags`, `region` on posts and search | | Paging | Reproduce the page's own scroll tokens | `count` and `cursor` | | Transcripts | Find captions or run your own speech recognition | `GET /v1/tiktok/transcript` with an optional `language` | | When pages change | Your parser breaks, often silently | You read JSON; there's no parser of yours to fix | | Blocks and challenges | Yours to handle at volume | A failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting, proxies if you use them, your time | 1 credit per successful call | | Terms | TikTok's terms, plus privacy law | The restricted-endpoint terms, plus privacy law | ### What does a tracked hashtag cost per day? Cost follows calls, so price the job per item tracked. One hashtag checked daily with `challenges-details` and one page of `challenges-posts` is 2 calls × 1 credit = 2 credits a day. Fifty hashtags is 50 × 2 × 30 = 3,000 credits a month. Add the trending list for 5 countries daily (5 × 30 = 150 credits) and one page of `music-posts` for 20 sounds daily (20 × 30 = 600 credits). The whole report is 3,000 + 150 + 600 = 3,750 credits a month: above the 100 free credits on signup, and inside the Starter pack's 10,000. Each extra page of posts is another call, so decide up front how deep you page per hashtag. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how calls are debited. ## How would you collect a daily hashtag snapshot? Without a recorded response, the safe pattern is to store each response as it arrives and work out the fields later in the playground. The script below calls `challenges-details` for a list of hashtags, saves each raw body to a dated file, and logs the credits each call used. It reads only the headers and the error format the docs define. ```python import datetime import json import os import pathlib import time import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} HASHTAGS = ["cosplay", "booktok", "streetfood"] day = datetime.date.today().isoformat() out = pathlib.Path("snapshots") / day out.mkdir(parents=True, exist_ok=True) for name in HASHTAGS: while True: r = requests.get( f"{BASE}/v1/tiktok/challenges-details", params={"challenge_name": name}, headers=HEADERS, timeout=30, ) if r.status_code == 429: time.sleep(int(r.headers.get("Retry-After", "1"))) continue break if r.ok: (out / f"{name}.json").write_text(json.dumps(r.json())) print(name, "saved, credits used:", r.headers.get("X-Credits-Used")) else: print(name, "failed:", r.status_code, r.json()["error"]["code"]) time.sleep(1) # free accounts get 1 request a second ``` If every call fails with `restricted_endpoint`, accept the terms in the dashboard first. Whether `challenge_name` wants the name with or without a leading `#` isn't documented here; try both in the playground. Once you've seen the response, add a step that reads the counts you need into a table, and drop anything that identifies a person. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the per-account limit. ## Which route should you choose? Choose by what you're measuring and how often. The endpoints fit recurring, aggregate trend work; a scraper fits almost nothing here that the endpoints don't already cover. If you're a researcher, or building an app that creators sign in to, read [TikTok API: Official Options and Public Trend Data](https://perceptlayer.com/blog/tiktok-api-trend-data) for the official routes first. | Use case | Route | Why | | --- | --- | --- | | Daily trending hashtags in a few countries | `trending-hashtags` | One call per country; 10 countries daily is 300 credits a month | | Tracking a fixed list of hashtags | `challenges-details` and `challenges-posts` | 2 credits per hashtag per day at one page of posts | | Measuring a sound's spread | `music-details` and `music-posts` | Same pattern as hashtags, keyed by `music_id` | | Topic research across posts | `feed-search` | `keywords` with `region`, `publish_time` and `sort_type` | | Analysing what videos say | `video` and `transcript` | No speech recognition of your own | | Academic research, or an app creators sign in to | An official route | See the official-options post linked above | | Monitoring specific people or collecting followers | Neither | That's personal data; the terms don't permit it without a lawful basis, or for outreach | | A one-off look at a few videos | A browser | Neither route is worth setting up | For an agent that answers trend questions, add the MCP server as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe; it finds the TikTok endpoints with `search_endpoints` and spends credits only on successful calls. Other social sources are under [Social media](https://perceptlayer.com/verticals/social). To see the fields for your market, accept the terms, run `trending-hashtags` in the playground on the [TikTok API page](https://perceptlayer.com/apis/tiktok), then [get a free API key](https://perceptlayer.com/signup) for the scheduled job. ## APIs in this post - [TikTok **1 credit per call** · 31 endpoints](https://perceptlayer.com/apis/tiktok) ## Frequently asked questions ### Is scraping TikTok legal? It depends on the data, the purpose and where you operate. Public, aggregate signals such as hashtag and sound counts carry the least risk; data about identifiable people brings privacy law into play. Read TikTok's terms before running a scraper, don't get around any protections, and get legal advice for a commercial data product. ### Do I need to accept terms to use the TikTok endpoints? Yes, because all of them are restricted. Accept the restricted-endpoint terms in your dashboard; until then the calls return `restricted_endpoint` (403) and cost nothing. The terms don't permit collecting personal data without a lawful basis or using it to contact people, so keep TikTok work to public videos, hashtags, sounds and trends in aggregate. ### Can I get trending TikTok hashtags for one country? Yes. `GET /v1/tiktok/trending-hashtags` takes a two-character `country_code` and an optional `time_range` of `7` or `30`, for 1 credit per successful call. Follow a hashtag from the list with `challenges-details` and `challenges-posts`. `GET /v1/tiktok/regions` lists region codes. ### What does a TikTok call return when it fails? An HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`, plus `X-Credits-Used: 0`. Common codes are `restricted_endpoint` (403), `invalid_parameters` (422) for a missing `country_code` or `keywords`, and `rate_limited` (429), which carries a `Retry-After` header with the seconds to wait. ### Can I get a TikTok video's transcript without a scraper? Yes. `GET /v1/tiktok/transcript` takes a video's `url` or `video_id` and an optional `language` of up to 20 characters, for 1 credit per successful call. There's no recorded response in this post, so run it in the playground on the TikTok API page to see what comes back. tiktok scraping social media data hashtags trends ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Nov 2026 Perceptlayer 8 min read ## [Twitter Scraper or X API: Options for Public Data](https://perceptlayer.com/blog/twitter-scraper-vs-api) Scraping X, X's own developer API, or 20 X endpoints at 1 credit a call for public tweets, threads and trends: upkeep, terms and a verdict per use case. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Nov 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Instagram Scraper or API: Public Data Compared](https://perceptlayer.com/blog/instagram-scraper-vs-api) A DIY Instagram scraper versus 12 Instagram endpoints at 1 credit a call: hashtags, public posts, reels, upkeep, terms and a verdict per use case. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 24 Oct 2026 Perceptlayer 6 min read ## [TikTok API: Official Options and Public Trend Data](https://perceptlayer.com/blog/tiktok-api-trend-data) TikTok's Research API is for vetted researchers; Display and Content Posting APIs act for signed-in users. Trend endpoints cover hashtags at 1 credit. --- title: "Eventbrite Scraper or API: What You Get | Perceptlayer" description: "Compare an Eventbrite scraper with 22 endpoints at 1 credit a call: a recorded search with prices in minor units, sales_status and urgency flags." url: https://perceptlayer.com/blog/eventbrite-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Eventbrite Scraper or API: What You Get 3 Nov 2026 Perceptlayer 8 min read An Eventbrite scraper fetches listing pages, follows each event link, and parses dates, venue, price range and ticket state out of what each page sends back. You maintain all of it. The alternative is 22 Eventbrite endpoints that return the same event data as JSON at 1 credit per successful call. A recorded search returns events with typed prices, a `sales_status`, availability flags and an organiser `id` on every result. This post compares the two routes on that recording and gives a verdict per use case. ## Key takeaways - An events scraper fetches three kinds of page (listings, event detail, organiser) and has to parse dates, time zones, price ranges and sell-out state from each, then notice when a parse quietly returns blanks. - `GET /v1/eventbrite/search` returns `results[]` with `id`, `name`, `start_date`, `start_time`, `timezone`, `is_online_event`, `price.minimum`, `price.maximum`, `availability` and `sales`, plus a `pagination` block reporting `page_size: 20`. - Prices arrive in minor units with a string beside them: `"value": 2000` and `"major_value": "20.00"` in `GBP`, so you never parse a currency symbol. - At 20 events a call, refreshing a list of events through search costs 1 credit ÷ 20 = 0.05 credits per event; a per-event endpoint such as `event-tickets` costs 1 credit per event per check. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What does an Eventbrite scraper have to fetch and parse? An events scraper is a crawler over three page types, and each one needs its own parser. Listing pages give you a list of event links for a city, category or keyword. Event pages give you the details: title, start and end, time zone, venue or online flag, price range, and whether tickets are still on sale. Organiser pages tie events together. The description below is general engineering for any event-listing site, not a claim about how Eventbrite builds its pages. The hard parts are the fields that look simple. Dates and times are shown in the event's local time, often as formatted text, so you need the time zone from somewhere else on the page to store a correct timestamp. Prices appear as display strings with currency symbols and ranges ("Free" to a top tier), which you turn into numbers. Sell-out state can be a banner, a disabled button or a missing ticket list. Each of these breaks differently when the page layout changes, and a broken parse usually returns an empty field, not an error. Then there's the running cost. A crawler that refreshes a city's events every day makes many requests, has to pace itself, and has to handle slow responses and blocked requests from any large site. If you hit blocks or challenge pages, stop rather than work around them. Read Eventbrite's terms before you build a collector, and for the general upkeep picture see [Zillow Scraper or API](https://perceptlayer.com/blog/zillow-scraper-vs-api), which walks through the fetcher, parser and monitor split. ## What does one Eventbrite search call return? One search call returns a page of events with the detail-page fields already parsed: dates, time zone, online flag, price range, availability, sales window and the organiser. It costs 1 credit. The catalogue documents no parameters for this endpoint; the recorded request below passed `q=jazz` and `location=london`, so run your own query in the playground on the [Eventbrite API page](https://perceptlayer.com/apis/eventbrite) to see what comes back for it. ```bash curl "https://api.perceptlayer.com/v1/eventbrite/search?q=jazz&location=london" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the second event, with the organiser reduced to its id and follower count: ```json { "success": true, "data": { "results": [ … { "id": "1997452309628", "name": "Witch hunts and real lives", "url": "https://www.eventbrite.co.uk/e/witch-hunts-and-real-lives-tickets-1997452309628", … "start_date": "2026-10-30", "start_time": "14:00", "end_date": "2026-10-30", "end_time": "15:00", "timezone": "Europe/London", "language": "en-gb", "is_online_event": true, "is_cancelled": false, "tags": [ … { "tag": "EventbriteFormat/2", "prefix": "EventbriteFormat", "name": "Seminar or Talk" } ], "organizer": { "id": "2226699547", "profile_type": "organizer", … "num_followers": 33662 }, "price": { "minimum": { "currency": "GBP", "value": 0, "major_value": "0.00", "display": "0.00 GBP" }, "maximum": { "currency": "GBP", "value": 2000, "major_value": "20.00", "display": "20.00 GBP" } }, "availability": { "is_free": false, "is_sold_out": false, "has_available_tickets": true, "has_bogo_tickets": false }, "sales": { "sales_status": "on_sale", … "end_sales_date": { "timezone": "Europe/London", "utc": "2026-10-30T13:00:00Z", "local": "2026-10-30T13:00:00" } }, … } ], "pagination": { "page": 1, "page_size": 20, "page_count": 49, "total_results": 10000, "has_more": true }, … }, "meta": { "endpoint_family": "search", "billable": true } } ``` Compare that with the scraper's hard parts. The time zone sits next to the local start time, the sales cut-off comes as both `utc` and `local`, and the price range is an integer `value` with a `major_value` string beside it. The first event in the same response carries an `urgency.messages` list with `salesEndSoon` and `fewTickets`; the second has no `urgency` field at all, so treat it as optional. ## What should you check before you trust the results? Read a search response the way you'd read a scraper's first run: check the rows against what you asked for before you build on them. The recorded call passed `jazz` and `london`, yet both returned events are online talks, one in `America/New_York` and one in `Europe/London`, and neither is tagged as music. A scraper reading a listing page would show you the same mix; the difference is that the JSON lets you filter it in one line. Three checks are worth writing into any pipeline built on this endpoint: - **Filter on the fields, not the query.** Keep events by `timezone`, `is_online_event` and the `tags` entries with `prefix` set to `EventbriteCategory` or `EventbriteFormat`, so an online seminar doesn't land in a London jazz feed. - **Don't treat `total_results` as a count.** The recording reports `page_count: 49` and `page_size: 20`, which is 980 rows, next to `total_results: 10000`. Count the rows you actually receive. - **Handle optional blocks.** `urgency` appears on one event and not the other, and the organiser on the second event has social handles that the first doesn't. Read every nested block with a fallback. This Python sketch reads only fields that appear in the recording and writes one CSV row per event: ```python import csv import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/eventbrite/search", params={"q": "jazz", "location": "london"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) resp.raise_for_status() print("credits used:", resp.headers.get("X-Credits-Used")) rows = [] for ev in resp.json()["data"]["results"]: price = ev.get("price", {}) avail = ev.get("availability", {}) rows.append({ "id": ev["id"], "name": ev.get("name"), "start": f'{ev.get("start_date")} {ev.get("start_time")}', "timezone": ev.get("timezone"), "online": ev.get("is_online_event"), "min_price": price.get("minimum", {}).get("major_value"), "max_price": price.get("maximum", {}).get("major_value"), "currency": price.get("maximum", {}).get("currency"), "sold_out": avail.get("is_sold_out"), "sales_status": ev.get("sales", {}).get("sales_status"), "urgency": ",".join(ev.get("urgency", {}).get("messages", [])), "organizer_id": ev.get("organizer", {}).get("id"), }) with open("events.csv", "w", newline="") as f: writer = csv.DictWriter(f, fieldnames=list(rows[0])) writer.writeheader() writer.writerows(rows) ``` ## Which endpoints replace the pages a scraper would crawl? Each page type a scraper crawls has an endpoint, or several, keyed on the ids the search already returns. Search results carry an event `id` and an `organizer.id`, and the event endpoints take `eventId` while the organiser endpoints take `organizerId`, so the names match. Try a recorded `id` on the event endpoints in the playground before you build a chain on it. Every endpoint below is `GET` and costs 1 credit per successful call. | Page a scraper would fetch | Endpoint | Required parameter | | --- | --- | --- | | Listing or search page | `/v1/eventbrite/search`, `/v1/eventbrite/trending`, `/v1/eventbrite/city-browse` | none | | Event detail page | [`/v1/eventbrite/event`](https://perceptlayer.com/apis/eventbrite/event) | `eventId` | | Ticket tiers on the event page | [`/v1/eventbrite/event-tickets`](https://perceptlayer.com/apis/eventbrite/event-tickets) | `eventId` | | "Selling fast" or "sales end soon" banner | `/v1/eventbrite/event-urgency` | `eventId` | | "More events like this" | [`/v1/eventbrite/event-related`](https://perceptlayer.com/apis/eventbrite/event-related) | `eventId` | | Organiser profile and their other events | `/v1/eventbrite/organizer`, `/v1/eventbrite/organizer-events` | `organizerId` | | Recurring event dates | `/v1/eventbrite/series`, `/v1/eventbrite/series-events` | `seriesId` | | Category and format menus | [`/v1/eventbrite/categories`](https://perceptlayer.com/apis/eventbrite/categories), `/v1/eventbrite/subcategories`, `/v1/eventbrite/formats` | none | | Curated lists | [`/v1/eventbrite/collections`](https://perceptlayer.com/apis/eventbrite/collections), `/v1/eventbrite/collections-events` | none; `collectionId` | The search result already carries a lot of what the detail page would give you, including `availability`, `sales` and, where present, `urgency`. Check whether those fields answer your question before you spend a credit per event on the detail endpoints. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries breakage and blocking risk; the endpoints cost credits per call and hand you parsed fields. The table compares them for a recurring job, such as refreshing upcoming events in a few cities every day and flagging the ones that sell out. | | DIY events scraper | Eventbrite endpoints | | --- | --- | --- | | Setup | Crawler for listing, event and organiser pages; parsers; storage; monitoring | API key in the `X-API-Key` header | | Dates and time zones | Parse local display text, find the zone elsewhere | `start_date`, `start_time`, `timezone`; sales dates as `utc` and `local` | | Prices | Parse symbols and ranges from display text | `price.minimum` and `price.maximum` with `currency`, integer `value` and `major_value` | | Sell-out state | Infer from banners and buttons | `availability.is_sold_out`, `has_available_tickets`, `sales.sales_status` | | Online or in person | Read from the page layout | `is_online_event` boolean | | When the page changes | Your parser breaks, often silently | You read named JSON fields; there's no parser of yours to fix | | Blocks and slow pages | Yours to handle | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can crawl without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ## What does it cost to track an event? On the endpoints, cost follows calls, and the unit you track decides how many calls you make. A search call reports `page_size: 20`, so when search alone answers your question, each refresh costs 1 credit ÷ 20 = 0.05 credits per event. A per-event endpoint costs a full credit per event per check. Two worked plans, both refreshed daily over a 30-day month: | Plan | Calls a day | Credits a month | | --- | --- | --- | | A city feed: 10 searches of 20 events each | 10 calls × 1 credit = 10 | 10 × 30 = 300 | | Sell-out watch: `event-tickets` for 200 chosen events | 200 calls × 1 credit = 200 | 200 × 30 = 6,000 | The 100 free credits on signup cover the city feed's first 10 days; a full month of it, 300 credits, needs a pack. The sell-out watch needs one too: 6,000 credits sits inside the Starter pack's 10,000. Mixing the two, a search refresh for everything and `event-tickets` only for events whose `urgency.messages` include `fewTickets`, keeps most of the bill at the search rate. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## Which route should you choose? Choose by what you track and how often, because that decides whether upkeep or per-call cost dominates. For a look at a handful of events once, open Eventbrite in a browser and skip both routes. - **A city or category events feed** for a newsletter, app or map: use `search` on a schedule, filter on `timezone`, `is_online_event` and `tags`, and store `id`, dates, `price` and `sales_status`. It's 0.05 credits per event per refresh. - **Watching specific events for sell-outs or price tiers**: refresh them through search where you can, and call `event-tickets` or `event-urgency` with their `eventId` only when you need the tier detail. - **Market research on organisers** (how many events a venue or promoter runs): use `organizer-events` and `organizer-stats` with an `organizerId`, and store organisation-level figures, not personal contact details. - **An AI agent answering "what's on" questions**: give it the endpoints through MCP, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. `search_endpoints` and `get_endpoint` are free; `call_endpoint` spends credits on success only. - **Learning to scrape**: practise on a site built for it, not a ticketing platform. For other travel and leisure sources, the [travel APIs](https://perceptlayer.com/verticals/travel) page lists them, and [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) covers where people stay. To check the fields against your own city, run `search` in the playground on the [Eventbrite API page](https://perceptlayer.com/apis/eventbrite), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Eventbrite **1 credit per call** · 22 endpoints](https://perceptlayer.com/apis/eventbrite) ## Frequently asked questions ### Is scraping Eventbrite allowed? That depends on Eventbrite's terms of use and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Event facts such as dates, prices and sell-out state are lower risk than personal data; leave organisers' personal details and social handles out of what you store. ### How much does an Eventbrite API call cost? Every one of the 22 Eventbrite endpoints costs 1 credit per successful call. A search call reports `page_size: 20`, so a refresh through search costs 0.05 credits per event. Failed calls cost nothing and return `X-Credits-Used: 0`. New accounts get 100 free credits after verifying an email address, with no credit card. ### Why do search results include online events from other cities? The recorded search passed `q=jazz` and `location=london` and returned two online talks, one in the `America/New_York` time zone. The catalogue documents no parameters for search, so don't rely on the query alone. Filter the results on `timezone`, `is_online_event` and the `tags` entries before you publish or store them. ### Are Eventbrite prices returned as numbers? Yes. Each event's `price.minimum` and `price.maximum` carry a `currency`, an integer `value` in minor units, a `major_value` string and a `display` string. In the recording a top price of 20 pounds is `"value": 2000` and `"major_value": "20.00"`. Store the integer and the currency together. ### What happens when a call fails or I hit the rate limit? You get an HTTP status and a JSON body with an error `code`, `message` and `request_id`, and no credits are debited. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. Free accounts get 1 request a second. The [errors docs](https://docs.perceptlayer.com/errors) and [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover both. eventbrite scraping events data ticketing comparison ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. --- title: "Google Trends Scraper or API: What You Get | Perceptlayer" description: "A Google Trends scraper rebuilds what one call returns: timeline_data with weekly values plus average, max and min, for 1 credit per keyword refresh." url: https://perceptlayer.com/blog/google-trends-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Trends Scraper or API: What You Get 3 Nov 2026 Perceptlayer 9 min read A Google Trends scraper is code that sends a keyword, a region and a time window to Google Trends, finds the numbers behind the chart, and turns them into dated rows you can store. The alternative is the Google Trends endpoints, where one call to `GET /v1/google-trends/interest` returns those rows as JSON for 1 credit. The real difference is upkeep: a scraper is yours to fix, while the endpoint's cost is per keyword per refresh. This post sizes both, item by item. ## Key takeaways - The unit you track is a series: one keyword, one `geo`, one `time_range`. Each refresh of one series on the endpoint is 1 call × 1 credit = 1 credit. - The recorded `tesla` call ( `geo=US`, `time_range=1y`) returns `timeline_data[]` with `timestamp`, `date` and `value`, plus `interest_over_time` with `average: 49.13`, `max_value: 100` and `min_value: 39`. - The recorded points are a week wide ("Oct 19 – 25, 2025"), so refreshing a one-year series daily pays seven times for each week of data. - A scraper has five parts to maintain: input mapping, fetching, extraction, date normalisation and a monitor that notices silent breakage. - 200 keywords refreshed weekly is 200 × 4 = 800 credits a month, so the Starter pack's 10,000 covers a year of it. ## What is a Google Trends scraper actually collecting? It collects a short time series per keyword, not a page of text. Each point is a date and a number, and the numbers only make sense next to the other points in the same request. That shapes everything about the build: you're not saving pages, you're saving series, and each series is defined by the keyword, the place and the window you asked for. Change any of the three and you have a different series. The recorded response shows that shape. This request asks for a year of US interest in `tesla`: ```bash curl "https://api.perceptlayer.com/v1/google-trends/interest?q=tesla&geo=US&time_range=1y" \ -H "X-API-Key: $API_KEY" ``` Trimmed to the parts a tracker reads: ```json { "search_parameters": { "keyword": "tesla", "geo": "US", "time_range": "today+12-m", "hl": "en", "search_type": "web" }, "timeline_data": [ { "timestamp": 1760832000, "date": "Oct 19 – 25, 2025", "value": 40 }, { "timestamp": 1761436800, "date": "Oct 26 – Nov 1, 2025", "value": 39 }, … ], "interest_over_time": { "average": 49.13, "max_value": 100, "min_value": 39, … }, … } ``` Three things in this excerpt matter for a comparison. The request sent `time_range=1y` and `search_parameters` echoes it back as `today+12-m`, so the endpoint records the window it actually used. The `timestamp` values are 604,800 seconds apart, exactly one week. And no field is a search count: the series runs from `min_value: 39` to `max_value: 100`, with an `average` of `49.13`, so store values as an index and compare them only within one series. ## Which parts would you build and maintain yourself? A scraper for this data has five parts, and each one can fail without an error. You'd translate your inputs into whatever the page expects, fetch it, pull the chart's numbers out of the response, turn the date labels into something sortable, and watch the output for drift. The endpoint covers the first four; the fifth, checking that the data still looks sane, is yours on either route. | Part | What a scraper has to do | What the endpoint gives you | | --- | --- | --- | | Input mapping | Turn keyword, region, window and search type into the page's own request format | `q`, `geo`, `time_range` (1h, 4h, 1d, 7d, 30d, 90d, 1y, 5y, all), `hl`, `search_type` (web, images, news, youtube, shopping) | | Fetching | Send requests at a pace the site tolerates, handle slow or refused responses | One GET; errors come back as a status and a `code`, and cost 0 credits | | Extraction | Find the series inside the response and read each point | `timeline_data[]` with `timestamp`, `date`, `value` | | Dates | Parse display labels such as week ranges into dates | A Unix `timestamp` next to each `date` label | | Monitoring | Notice when a run returns no points, fewer points or a shifted scale | Still yours: check point counts and `max_value` per run | The fetching row is where most scrapers spend their life. Any large site has to separate people from automated traffic, so a job that pulls hundreds of series a day should expect slow responses, refusals and challenge pages. If you hit those, stop rather than reach for rotating proxies or CAPTCHA solvers; working around a site's protections isn't a fix we'd recommend. Read Google's terms before you build a collector of your own. Extraction is the quiet failure. When a page changes, a scraper often keeps running and writes empty or partial rows, and a series with a missing week looks plausible on a chart. That's why the monitoring row stays on your side whichever route you take. ## How do a scraper and the endpoints compare? For a recurring job, the trade is engineering hours against credits. A scraper has no per-call bill, but it has hosting, a fetch layer you defend and a parser you repair. The endpoints have a per-call cost and nothing to repair on the parsing side. The table assumes a job that refreshes a fixed keyword list on a schedule. | | DIY Google Trends scraper | Google Trends endpoints | | --- | --- | --- | | Setup | Request builder, fetch layer, parser, date handling, storage | API key in the `X-API-Key` header | | Series data | Whatever you extract from the page | `timeline_data[]` and `interest_over_time` with `average`, `max_value`, `min_value` | | Other views | A separate parser per view | Interest By Region, Related, Autocomplete and Trending Now, each 1 credit | | When the page changes | Rows go empty or wrong until you fix it | You read named JSON fields | | Blocks and challenges | Yours to handle | Not yours; a failed call returns an error `code` and `X-Credits-Used: 0` | | Throughput | As fast as the site tolerates | 1 request a second free (60 a minute), at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | | Audit trail | Whatever you log | `search_parameters` echoes keyword, geo, window, `hl` and `search_type` | The Region endpoint takes `region` ( `REGION` or `COUNTRY`), `date`, `cat`, `gprop`, `tz` and `hl`. Related takes the same `time_range` and `search_type` values as Interest, with `q` limited to 100 characters instead of 550. Trending Now needs only `geo` and adds `hours` (4, 24, 48 or 168) and `sort`. The [Google Trends API page](https://perceptlayer.com/apis/google-trends) lists every parameter, and each endpoint page, such as [Interest By Region](https://perceptlayer.com/apis/google-trends/interest-by-region), links to its playground. ## What does each tracked keyword cost? Cost follows refreshes: one series refreshed once is 1 credit, whatever the window. So the cost per tracked keyword is the number of refreshes a month times the endpoints you call for it. The cadence is the lever, and it should match the width of the points. A one-year series has weekly points, so a weekly refresh gets every new point and a daily refresh mostly re-reads weeks you already hold. | Plan (per keyword) | Calls a month | Credits a month | | --- | --- | --- | | Interest, `1y`, weekly | 4 | 4 | | Interest, `1y`, daily | 30 | 30 | | Interest + Region + Related, weekly | 12 | 12 | | Interest, `7d`, daily | 30 | 30 | Scaled to a list: - 200 keywords, Interest weekly: 200 × 4 = 800 credits a month, inside the Starter pack's 10,000 for a year. - 200 keywords, Interest daily: 200 × 30 = 6,000 credits a month, inside the Starter pack's 10,000. - 500 keywords, all three endpoints weekly: 500 × 12 = 6,000 credits a month, also inside the Starter pack. - 2,000 keywords, Interest daily: 2,000 × 30 = 60,000 credits a month, past the Build pack's 50,000 and inside the Growth pack's 200,000. Daily refreshes earn their cost with a short window such as `7d` or `1d`, where the points are narrower than a week; open the playground to see the point width for the window you pick. Throughput matters too: 2,000 calls at a free account's 60 a minute take about 34 minutes, and at a paid account's 300 a minute about 7. Purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) for how each call is debited. ## How do you check a refreshed series in code? Store the points you get and check the run before you trust it. The script below calls Interest for a short keyword list, writes each point to SQLite keyed on keyword, geo, window and `timestamp`, and flags a run that came back with no points. It reads only fields in the recorded response: `timeline_data[].timestamp`, `date`, `value`, and `interest_over_time.average` and `max_value`. ```python import os import sqlite3 import requests KEYWORDS = ["tesla"] GEO, WINDOW = "US", "1y" db = sqlite3.connect("trends.db") db.execute( """CREATE TABLE IF NOT EXISTS points ( keyword TEXT, geo TEXT, time_range TEXT, ts INTEGER, label TEXT, value INTEGER, PRIMARY KEY (keyword, geo, time_range, ts))""" ) for kw in KEYWORDS: resp = requests.get( "https://api.perceptlayer.com/v1/google-trends/interest", headers={"X-API-Key": os.environ["API_KEY"]}, params={"q": kw, "geo": GEO, "time_range": WINDOW}, timeout=30, ) resp.raise_for_status() data = resp.json() points = data.get("timeline_data", []) if not points: print(f"{kw}: no points returned, check before storing") continue db.executemany( "INSERT OR REPLACE INTO points VALUES (?, ?, ?, ?, ?, ?)", [(kw, GEO, WINDOW, p["timestamp"], p["date"], p["value"]) for p in points], ) summary = data.get("interest_over_time", {}) print(kw, len(points), "points, average", summary.get("average"), "max", summary.get("max_value"), "credits used", resp.headers.get("X-Credits-Used")) db.commit() ``` `INSERT OR REPLACE` matters here. Each refresh returns the whole window again, and the values are relative to that window, so the newest run should overwrite older copies of the same week rather than sit beside them. If you need to compare across windows, keep each `time_range` as its own series, as the primary key does. Wrap the call with a retry on 429 and 503 that waits for `Retry-After`; the [errors docs](https://docs.perceptlayer.com/errors) list every code. ## Which route fits which job? Pick by how many series you track and how long the job has to run, because those decide whether upkeep or credits dominate. For a few charts you'll look at once, the Google Trends site in a browser is enough, and neither route is worth building. - **A weekly keyword tracker for SEO or content planning**: use Interest with `time_range=1y` on a weekly schedule. At 4 credits per keyword a month, the 100 free credits on signup cover one refresh of 100 keywords, and the Starter pack's 10,000 covers 200 keywords for a year. - **Spotting what's rising today**: use Trending Now with `geo` and `hours=24`. A run costs one call, not one per keyword. - **Regional demand comparisons**: use Interest By Region with `region=REGION` or `COUNTRY`, one call per keyword per refresh. - **Keyword discovery around a seed term**: use Related and Autocomplete; each call is 1 credit and replaces a second parser in a scraper. - **An agent that answers "is interest in X growing?"**: give it the endpoints through the MCP server, where `search_endpoints` and `get_endpoint` are free and `call_endpoint` spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. - **A research project that needs a view the endpoints don't return**: that's the case for a scraper of your own. Read the terms first, run it slowly, and budget time for the monitoring part. For related search data, [Rank Tracking API: Track Google Positions as JSON](https://perceptlayer.com/blog/rank-tracking-api) covers positions rather than interest, and the [search engines APIs](https://perceptlayer.com/verticals/search) page lists the rest. To test your own keywords, run Interest in the playground on the [Google Trends API page](https://perceptlayer.com/apis/google-trends), then [get a free API key](https://perceptlayer.com/signup) when the series looks right. ## APIs in this post - [Google Trends **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-trends) ## Frequently asked questions ### Is scraping Google Trends allowed? That depends on Google's terms and the law where you operate, so read the terms and take legal advice for commercial use. Whatever you decide, don't work around blocks, challenges or other protections. Trend series are aggregate figures rather than personal data, but the terms still govern how you collect them, and the endpoint route doesn't change what you may do with the results. ### Are Google Trends values search volumes? Nothing in the recorded response is a count of searches. The `tesla` series runs from `min_value: 39` to `max_value: 100` with an `average` of `49.13`, which reads as an index within that one request. Compare values inside one series, and keep each keyword, `geo` and `time_range` combination as a separate series rather than mixing them. ### How much does it cost to track 100 keywords? Each successful call costs 1 credit. 100 keywords on Interest refreshed weekly is 100 × 4 = 400 credits a month; adding Region and Related makes it 100 × 12 = 1,200. The 100 free credits on signup cover one weekly refresh of the 100 keywords. The Starter pack's 10,000 covers the first plan for a year and the second for about eight months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Does a failed Google Trends call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Rate-limited (429) and unavailable (503) responses carry `Retry-After`. A request whose reply your client lost may still have succeeded and been billed. ### How fast can a keyword refresh run? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second, so 200 keywords take a little over three minutes. Paying accounts run at least 5 a second (300 a minute), and faster rates can be chosen at checkout. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. google trends scraping search interest keyword tracking ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 26 Sept 2026 Updated 26 Oct 2026 Perceptlayer 6 min read ## [Google Trends API in Python: Interest Over Time as JSON](https://perceptlayer.com/blog/google-trends-api-python) Call GET /v1/google-trends/interest from Python with requests and get weekly interest over time as JSON for 1 credit per call, with a recorded response. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. --- title: "Twitter Scraper or X API: Options for Public Data" description: "Scraping X, X's own developer API, or 20 X endpoints at 1 credit a call for public tweets, threads and trends: upkeep, terms and a verdict per use case." url: https://perceptlayer.com/blog/twitter-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Twitter Scraper or X API: Options for Public Data 3 Nov 2026 Perceptlayer 8 min read A Twitter scraper is a script that loads X in a browser, or replays the requests its web app makes, and reads tweets, threads and trends out of the result. It needs constant repair and runs into whatever limits X puts on automated traffic. You have two other routes: X's own developer API, on X's terms and prices, and 20 X endpoints that return public tweets, threads and trends as JSON at 1 credit a successful call, under restricted-endpoint terms. This post compares the three and gives a verdict per use case. ## Key takeaways - A DIY Twitter scraper needs a headless browser or replayed web requests plus session handling, and it breaks whenever X changes its pages or request formats. - X's own developer API is the official route; its access levels, limits and prices are set by X, so read them on X's developer pages before you compare costs. - The X API here has 20 `GET` endpoints, each 1 credit per successful call; failed calls cost nothing and return `X-Credits-Used: 0`. - `GET /v1/x/tweet-thread` and `GET /v1/x/tweet-conversation` take a tweet `id`; `GET /v1/x/trends` takes an optional `type` and `count`. - All 20 X endpoints are restricted: they work after you accept the restricted-endpoint terms, which don't permit collecting personal data without a lawful basis or using it to contact people. ## What does building a Twitter scraper involve? Building a Twitter scraper means automating a web app that was built for people, not scripts. You either drive a headless browser through X, wait for tweets to render and parse them out of the page, or you capture the requests the web app makes and replay them yourself. The second is faster, but it ties your code to internal request formats, tokens and sessions that you don't control and that can change at any time. The upkeep is the real cost. Markup and request formats change without notice, so a scraper that worked last month can return nothing today. Much of what you'd want to read may only appear after a login, and logged-in scraping puts an account at risk as well as the project. Large sites limit automated traffic, so at any volume you can expect blocks and challenge pages. When that happens, stop: rotating accounts, proxies or CAPTCHA solvers to get around a site's protections is not a fix we'd recommend. Then read the rules. X's own terms of service and developer terms are where X sets out what it allows for automated access and reuse of its content. Read them before you build anything that collects X data, and get legal advice if the project is commercial. ## What about X's own developer API? X's developer API is the official way to read and write X data, and for an app that posts, replies or acts on behalf of an X account, it's the route to take. You get X's documented objects, X's authentication, and X's rules about what you may store and display. Those rules, along with the access levels, request limits and prices, are set by X and change over time. This post doesn't quote X's tiers or prices. We couldn't verify the current figures on X's developer pages for this article, and a figure we can't check isn't worth printing. Read them on X's developer site, note the date you read them, and compare them with your call volume before you decide. If the official API covers the data you need at a cost that fits, use it. ## What do the X endpoints return? The X API at [/apis/x](https://perceptlayer.com/apis/x) returns public X data as JSON, one call per lookup. It has 20 endpoints, all `GET`, all 1 credit per successful call: tweets, their text, media, video and transcripts, threads, conversations, quotes and reposts, trends, search typeahead, notes, public communities and their posts, and profiles with their posts, media and articles. Data is collected from publicly available sources and returned as found at the time of the call. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | `/v1/x/tweet` | One tweet | `id` | none | | `/v1/x/tweet-text` | A tweet's text | `id` | none | | `/v1/x/tweet-thread` | A tweet's thread | `id` | none | | `/v1/x/tweet-conversation` | A tweet's conversation | `id` | `count`, `cursor`, `ranking_mode`, `about_account`, `lang` | | `/v1/x/tweet-quotes` | A tweet's quotes | `id` | `count`, `cursor` | | `/v1/x/tweet-transcript` | A tweet's transcript | `id` | none | | `/v1/x/trends` | Trends | none | `type`, `count` | | `/v1/x/search-typeahead` | Search typeahead | `q` | `result_type` | | `/v1/x/notes` | Notes | `id` | none | | `/v1/x/user-tweets` | An account's tweets | `handle` | `count`, `cursor`, `with_replies`, `groupthreads`, `since` | The [API page](https://perceptlayer.com/apis/x) lists all 20 with their parameters. A trends call needs nothing but your key in the `X-API-Key` header: ```bash curl "https://api.perceptlayer.com/v1/x/trends" \ -H "X-API-Key: $API_KEY" ``` A thread is one call with the tweet's `id`: ```bash curl "https://api.perceptlayer.com/v1/x/tweet-thread?id=$TWEET_ID" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for this API, so this post doesn't show one. Run the calls in the playground on the [X API page](https://perceptlayer.com/apis/x) to see the exact fields before you write a parser; the [trends endpoint page](https://perceptlayer.com/apis/x/trends) links to it. ### Which parameters do the endpoints take? Tweet endpoints take a string `id`. `user-tweets` takes a `handle` and optional `count` (an integer), `cursor` (up to 200 characters), `with_replies` and `groupthreads` (booleans) and `since` (up to 40 characters). `search-typeahead` takes a `q` of up to 512 characters and an optional `result_type`. `tweet-conversation` adds `ranking_mode`, `about_account` and `lang` (up to 10 characters). The reference doesn't document defaults, page sizes or allowed values for these strings, so test them in the playground before you depend on them. ## Which terms apply to the restricted endpoints? All 20 X endpoints are restricted, and the restricted-endpoint terms at [/legal/restricted-endpoints](https://perceptlayer.com/legal/restricted-endpoints) apply to them. They work once you accept those terms in the dashboard. The terms don't permit collecting personal data without a lawful basis, and they don't permit using data from these endpoints to contact people. That rules out lead lists, outreach and follower harvesting, whichever route you collect the data through. What fits is work on brands, public posts and topics in aggregate. Follow which topics trend. Archive the threads a company publishes about its product. Measure how a public announcement was received across its replies and quotes, without keeping who said what. When a response includes names, handles or profile details you don't need, drop them before you store anything. The errors list includes `restricted_endpoint` (403); the [errors docs](https://docs.perceptlayer.com/errors) cover it with the other codes. ## How do the three routes compare? The three routes trade control, permission and upkeep differently. A scraper gives you control and no per-call bill, and costs you repairs, blocks and terms risk. X's API gives you X's permission and documented objects, on X's prices and limits. The X endpoints give you JSON from stable paths for 1 credit a successful call, under the restricted-endpoint terms. | | DIY scraper | X's developer API | X endpoints | | --- | --- | --- | --- | | Setup | Headless browser or replayed requests, sessions, parsers | X's developer sign-up, per X's docs | API key in the `X-API-Key` header | | What you get | Whatever you parse from the page | X's documented objects | JSON from 20 documented endpoints | | Threads and replies | Parsed per page | Per X's documentation | `tweet-thread`, `tweet-conversation`, `tweet-quotes` by `id` | | Trends | Parsed from the page | Per X's documentation | `trends` with optional `type` and `count` | | Maintenance | High: pages and requests change | Low | Low: you maintain only your own code | | Speed | One browser or session per job | X's request limits | 1 request a second free, at least 5 a second on paid packs | | Terms | X's terms of service | X's developer terms | Restricted-endpoint terms; no personal data without a lawful basis | | Cost | Hosting and engineering time | X's published prices | 1 credit per successful call; failed calls cost 0 | ### What does a brand monitor cost? On the X endpoints, cost follows calls. A brand team that checks `trends` 5 times a day makes 5 × 30 = 150 calls a month. Adding one `user-tweets` call a day for each of 10 brand accounts in its category is 10 × 30 = 300 more. That's 450 credits a month, or 15 a day, so the 100 free credits every account gets once after verifying an email address, with no credit card, cover the first 6 days. Now add reception analysis: for 60 announcements a month, one `tweet-conversation` call and one `tweet-quotes` call each is 60 × 2 = 120 credits, bringing the month to 570. If you fetch further pages with `cursor`, each one is another credit. After the free credits, the Starter pack's 10,000 covers a year of this monitor, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) for how billing works. ## Which route should you choose? Choose by what you'll do with the data, because that decides whose terms apply and what you maintain. The verdicts below assume brand, topic or aggregate work. If your plan involves contacting people or building lists of individuals, none of these routes is the answer. - **An app that posts, replies or acts for an X account**: use X's developer API. None of the endpoints here post or reply, so the official API is the route for that. - **Trend and topic monitoring**: use `trends` on a schedule, and `search-typeahead` with a `q` to see which terms and topics come up for a keyword. - **Tracking what brands publish**: use `user-tweets` with each brand's `handle`, and `tweet-thread` to keep long announcements whole. Store tweet text and counts, not follower details. - **How a public announcement landed**: use `tweet-conversation` and `tweet-quotes` with the announcement's `id`, and score the replies in aggregate. Drop authors' identities before you store the text. - **Video content analysis**: use `tweet-transcript` with the tweet's `id` to work with a transcript instead of the video. - **A one-off question from an AI agent**: connect the MCP server at `https://perceptlayer.com/mcp`; `search_endpoints` and `get_endpoint` are free and `call_endpoint` spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. For the same trade-off on other sites, read [YouTube Data API Quota: Limits, Costs and Alternatives](https://perceptlayer.com/blog/youtube-data-api-quota) and [TikTok API: Official Options and Public Trend Data](https://perceptlayer.com/blog/tiktok-api-trend-data), or browse the [social media APIs](https://perceptlayer.com/verticals/social). To check the fields first, run `trends` in the playground on the [X API page](https://perceptlayer.com/apis/x), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [X (Twitter) **1 credit per call** · 22 endpoints](https://perceptlayer.com/apis/x) ## Frequently asked questions ### Is scraping Twitter legal? It depends on your jurisdiction, what you collect and how you use it, and X's own terms set out what X allows for automated access. Public posts about brands and topics are lower risk than data about individuals, which is personal data in many places. Read X's terms, get legal advice for commercial use, and don't get around logins, blocks or challenges. ### How much does the official X API cost? X sets its own access levels, limits and prices, and they change, so read them on X's developer pages and note the date. This post doesn't quote them because we couldn't verify the current figures. The X endpoints described here cost 1 credit per successful call, and [pricing](https://perceptlayer.com/pricing) shows what credits cost. ### Can I collect followers or contact people from X data? No. The restricted-endpoint terms don't permit collecting personal data without a lawful basis or using data from these endpoints to contact people, so lead generation, outreach and follower harvesting are out. Use the X endpoints for brands, public posts and topics in aggregate, and drop names and handles you don't need before storing results. ### Does a failed X call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status, a JSON error with a `code`, `message` and `request_id`, and `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the per-account limits and the `RateLimit-Remaining` header. ### Can I see an X response before writing code? Yes. The [X API page](https://perceptlayer.com/apis/x) has a playground: pick an endpoint such as `trends` or `tweet-thread`, fill in its parameters and run a real call with your key to see the JSON. Do this before you write a parser, since this post doesn't include a recorded response. twitter x scraping social media data trends ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Nov 2026 Perceptlayer 9 min read ## [TikTok Scraper or API: Hashtag, Sound and Trend Data](https://perceptlayer.com/blog/tiktok-scraper-vs-api) A TikTok scraper next to 31 TikTok endpoints at 1 credit a call: trending hashtags by country, hashtag and sound posts, and 2 credits per hashtag tracked a day. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Pinterest Scraper or API: What You Get](https://perceptlayer.com/blog/pinterest-scraper-vs-api) A DIY Pinterest scraper versus 6 Pinterest endpoints at 1 credit a call: pin search, board pins, upkeep, terms and the credits per search term tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Telegram Scraper or API: What You Get](https://perceptlayer.com/blog/telegram-scraper-vs-api) A DIY Telegram scraper versus 4 Telegram channel endpoints at 1 credit a call: channel posts, in-channel search, upkeep, terms and cost per channel. --- title: "Capterra Scraper or API: What You Get | Perceptlayer" description: "A Capterra scraper vs 1-credit endpoints: a recorded products page with uuid, vendor, category_ids and review_count, and the cost of a daily review-count watch." url: https://perceptlayer.com/blog/capterra-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Capterra Scraper or API: What You Get 2 Nov 2026 Perceptlayer 8 min read A Capterra scraper crawls category listings, product pages and review pages, then parses product names, vendors, categories and review counts out of the HTML. You own the crawl order, the parsers and the fixes each time a page changes. The alternative is the Capterra endpoints, which return the same catalogue as JSON at 1 credit per successful call: a recorded products page returned each product's `uuid`, `vendor`, `category_ids`, `languages` and `review_count`. This post sets the two side by side, prices a daily review-count watch in credits, and gives a verdict for each kind of job. ## Key takeaways - A Capterra scraper is really three crawlers: category listings, product pages and paged reviews, each with its own parser to maintain. - `GET /v1/capterra/products` returns `products[]` with `uuid`, `name`, `vendor`, `category_ids`, `languages`, `published_on` and `review_count`, plus `page`, `limit` and `has_more` for paging. - At the recorded `limit=10`, a daily snapshot of 500 products is 50 calls × 1 credit = 50 credits a day, or 0.1 credits per product per day. - Storing `review_count` per `uuid` each day tells you which products are gaining reviews, so you only page through reviews for the ones that changed. - All 10 Capterra endpoints cost 1 credit per successful call; failed calls cost nothing and return `X-Credits-Used: 0`. ## Which Capterra data do you actually need? Capterra data comes in three layers, and the right tool depends on which one you need. The catalogue layer is which products exist, who makes them, which categories they sit in and how many reviews each has. The product layer is one product's detail page. The review layer is the individual reviews, with ratings and text, paged per product. Most scraping projects start by wanting reviews and end up needing the catalogue first, because you can't page a product's reviews until you know the product. A market map, a competitor list or a lead into a category is catalogue work. Sentiment analysis or feature-request mining is review work. Comparing two named tools is product work. Separating these early tells you how many requests a run needs and which parser matters most. This post leans on the catalogue layer, because that's where the recorded response is. ## What would a Capterra scraper have to build? A Capterra scraper needs a crawler and a parser for each layer, plus the bookkeeping that ties them together: which product a review belongs to, which category a product came from, and what changed since the last run. That's more moving parts than a single-page scraper, and each part fails on its own schedule. ### The catalogue crawl The scraper walks category pages, follows their pagination and collects every product link. It has to decide how to identify a product across runs (a URL slug can change; an internal ID buried in the page may not be visible at all) and how to handle a product that appears in several categories without counting it twice. ### The product parser For each product it reads the name, the vendor, the categories and the review count. The review count is usually a display string next to a star rating, so the parser turns text into an integer and has to notice when that text moves or changes format. ### The review pager Reviews are paged per product, often with sort and filter controls. Pulling them means following those pages and parsing each review block into a rating, a date and text. Review pages can also show details about the person who wrote each review, so you have to decide what to drop before it reaches storage. Around all three sits the usual upkeep for any large site: monitoring for runs that silently return fewer rows, slowing down when responses slow or turn into challenge pages, and stopping rather than routing around blocks. Read Capterra's terms of use before you build a collector, and treat reviewer details as personal data. ## What does the products endpoint return? `GET /v1/capterra/products` returns one page of the product catalogue, with each product's identity, vendor, categories and review count already as typed fields. It also tells you whether another page follows, so a loop knows when to stop. The recorded request asked for the first 10 products sorted by popularity, at 1 credit: ```bash curl "https://api.perceptlayer.com/v1/capterra/products?page=1&limit=10&sortBy=popularity" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the first product and the paging fields: ```json { "success": true, "data": { "products": [ { "uuid": "9985c8b6-47d0-4328-b13d-a6d200b6686a", "name": "Planview ProjectAdvantage", "vendor": "Planview", … "published_on": [ "Capterra", "GetApp" ], "category_ids": [ "13920971-cae5-47eb-8b98-47e5fb597970", "49d5abf4-bb03-4aed-a0fd-ce02288db64c" ], "languages": [ "de", "en" ], "review_count": 72 }, … ], "page": 1, "limit": 10, "has_more": true }, "meta": { "endpoint_family": "products", "duration_ms": 664, "attempts": 1, "source": "catalogue" } } ``` The second recorded product is Health Cloud from Salesforce, with `languages` of `["en"]` and a `review_count` of 71. Note what a scraper would have had to work for: `uuid` is a UUID rather than a slug, `category_ids` lists every category in one array, and `review_count` is already an integer. ### Which other endpoints replace the scraper's other parts? The other nine endpoints line up with the scraper's crawlers. The `category_ids` field on each product has the same name as the `categoryIds[]` filter on the products endpoint, so the names match; test a recorded category ID in the playground before you rely on it. The recording doesn't show which identifier the `id` parameter on the detail and review endpoints expects, so check whether a `uuid` works there in the playground first. | Scraper part | Endpoint | Parameters you'll use first | | --- | --- | --- | | Catalogue crawl | `GET /v1/capterra/products` | `page`, `limit`, `sortBy` ( `name` or `popularity`), `categoryIds[]`, `exclude[]` | | Category listings | `GET /v1/capterra/categories-products` | `id`, `slug`, `page`, `sort` | | Category tree | `GET /v1/capterra/categories` | `type` ( `targets` or `super_industries`) | | Finding one product | `GET /v1/capterra/products-search` | `q`, `page`, `limit` | | Product parser | `GET /v1/capterra/products-detail` | `id`, `slug` | | Review pager | `GET /v1/capterra/products-reviews` | `id`, `page`, `sort`, `countries[]`, `company_size[]`, `time_used[]`, `overall_rating_ge` | | One review | `GET /v1/capterra/products-reviews-detail` | `id`, `reviewId` | | Side-by-side page | `GET /v1/capterra/compare` | `product_a`, `product_b` | The review endpoint's filters are the ones a scraper would otherwise click through: `sort` takes `most_helpful` or `most_recent`, `time_used[]` takes values such as `LessThan6Months` or `MoreThan2Years`, and `company_size[]` takes letter codes `A` to `I`. The [Capterra API page](https://perceptlayer.com/apis/capterra) lists every endpoint and parameter. ## How do a scraper and the endpoints compare? A scraper trades credits for engineering time and terms risk; the endpoints trade engineering time for credits per call. Neither is free, and the balance shifts with how often you run. The table compares them for a recurring catalogue-and-reviews job, such as watching one software category every day. | | DIY Capterra scraper | Capterra endpoints | | --- | --- | --- | | Setup | Three crawlers, three parsers, ID matching, monitoring | API key in the `X-API-Key` header | | Product identity | Slugs or IDs dug out of pages | `uuid` on every product | | Categories | Re-crawl each category and de-duplicate | `category_ids[]` per product; `categoryIds[]` filter | | Review counts | Parse a display string | `review_count` as an integer | | Review filters | Drive the page's controls | `sort`, `countries[]`, `company_size[]`, `time_used[]`, `overall_rating_ge` | | Reviewer details | Arrive in the HTML; you strip them | Still your job: keep only the fields you need | | When pages change | Parsers break, columns go empty | Named JSON fields; no parser of yours to fix | | Blocks | Yours to handle | A failed call returns an error code and costs 0 | | Speed | As fast as the site tolerates | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### What does a product cost to track? On the endpoints, a catalogue snapshot costs one credit per page of products. At the recorded `limit=10`, following 500 products is 500 ÷ 10 = 50 calls, so 50 calls × 1 credit = 50 credits a day, or 0.1 credits per product per day. Over 30 days that's 1,500 credits. `limit` is a parameter, so a larger value means fewer calls per snapshot; check what your calls return before you plan on it. Reviews cost one credit per page per product, so only page the products whose `review_count` went up. If 20 of the 500 gain reviews on a typical day and one page each covers the new ones, that's another 20 calls × 1 credit = 20 credits. The full watch is 70 credits a day, 2,100 over 30 days: above the 100 free credits on signup, inside the Starter pack's 10,000. The [credits docs](https://docs.perceptlayer.com/credits) explain how calls are debited and [pricing](https://perceptlayer.com/pricing) shows what credits cost. ## How do you spot which products gained reviews? Snapshot `review_count` per `uuid` each day and compare it with yesterday's file. The script below pages the products endpoint until `has_more` is false, writes a dated CSV, and prints every product whose count rose. It reads only fields from the recorded response. ```python import csv import datetime import os import requests API = "https://api.perceptlayer.com/v1/capterra/products" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def snapshot(max_pages=50): rows, page = [], 1 while page <= max_pages: r = requests.get(API, headers=HEADERS, timeout=30, params={"page": page, "limit": 10, "sortBy": "popularity"}) r.raise_for_status() data = r.json()["data"] for p in data["products"]: rows.append({"uuid": p["uuid"], "name": p["name"], "vendor": p["vendor"], "review_count": p["review_count"]}) if not data["has_more"]: break page += 1 return rows def load(path): if not os.path.exists(path): return {} with open(path, newline="") as f: return {row["uuid"]: int(row["review_count"]) for row in csv.DictReader(f)} today = datetime.date.today() yesterday = load(f"capterra-{today - datetime.timedelta(days=1)}.csv") rows = snapshot() with open(f"capterra-{today}.csv", "w", newline="") as f: writer = csv.DictWriter(f, fieldnames=["uuid", "name", "vendor", "review_count"]) writer.writeheader() writer.writerows(rows) for row in rows: before = yesterday.get(row["uuid"]) if before is not None and row["review_count"] > before: print(f'{row["name"]} ({row["vendor"]}): {before} -> {row["review_count"]}') ``` `max_pages=50` caps a run at 50 credits, the 500-product watch priced above. To narrow the watch to one market, add `categoryIds[]` with the category IDs you care about. A 429 carries a `Retry-After` header; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover pacing. ## Which route fits your job? Pick by layer and by frequency, since those decide whether parser upkeep or per-call credits dominate. A daily job across hundreds of products favours the endpoints; a one-time look at three tools favours reading them on the site and building nothing. - **Market map of a software category**: use `products` with `categoryIds[]`, or `categories-products`, and store `uuid`, `name`, `vendor` and `category_ids`. One pass costs one credit per page. - **Review-count watch across a category**: the snapshot script above, at 0.1 credits per product per day at `limit=10`. - **Review text for sentiment or feature mining**: `products-reviews` with `sort=most_recent`, only for products whose count rose. Drop reviewer names and other personal details before storage. - **A head-to-head of two tools**: `compare` with `product_a` and `product_b`, one credit per pair. - **Reviews across several sites**: the [reviews APIs](https://perceptlayer.com/verticals/reviews) list the other review sources on the same key; [Trustpilot Scraper or API](https://perceptlayer.com/blog/trustpilot-scraper-vs-api) and [Google Play Scraper or API](https://perceptlayer.com/blog/google-play-scraper-vs-api) make the same comparison for consumer and app reviews. - **An agent answering "which tool should we use" questions**: add the MCP server and let it call `products-search` and `compare`, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. - **Learning to scrape**: practise on a sandbox site, not a review platform. To check the fields for your own category, run `products` in the playground on the [Capterra API page](https://perceptlayer.com/apis/capterra), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Capterra **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/capterra) ## Frequently asked questions ### Is scraping Capterra allowed? That depends on Capterra's terms of use and the law where you operate, so read the terms and take legal advice for commercial use. Don't get around blocks, challenges or other protections. Product facts such as names, vendors and review counts carry less risk than review content; reviews can include personal data, so leave reviewers' names and other personal details out of what you store. ### How many products come back from one call? The recorded call asked for `limit=10` and the response echoed `limit: 10` with `has_more: true`. Page size beyond that isn't documented here, so read `limit` and `has_more` on your own calls and loop with `page` until `has_more` is false. Each page is one call and one credit. ### Can I filter the catalogue to one category? Yes. `GET /v1/capterra/products` takes a `categoryIds[]` list, and every product in the recorded response carries a `category_ids` array, so the names match. `GET /v1/capterra/categories-products` takes a category `id` and pages a category's products. Test a category ID in the playground before building on it. ### Does a failed Capterra call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Codes include `not_found` (404), `invalid_parameters` (422) and `rate_limited` (429), which carries a `Retry-After` header. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ### How fast can a daily Capterra snapshot run? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second, so the 50-call snapshot above finishes in under a minute. Paying accounts run at least 5 requests a second (300 a minute). The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. capterra software reviews scraping b2b software market research ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Jul 2026 Perceptlayer 7 min read ## [Capterra API: Software Reviews and Comparisons as JSON](https://perceptlayer.com/blog/capterra-api-software-reviews) Find a product with products-search, pull its reviews filtered by country, company size and time used, and compare two products, at 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 10 Nov 2026 Perceptlayer 8 min read ## [Patreon Scraper or API: What You Get](https://perceptlayer.com/blog/patreon-scraper-vs-api) A DIY Patreon scraper versus 3 restricted Patreon endpoints at 1 credit a call: creator, posts and search, the upkeep, the terms and a verdict per use case. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "Facebook Marketplace API: Listings as JSON | Perceptlayer" description: "Search public Facebook Marketplace listings by query and location at 1 credit a call: three endpoints, their parameters and a weekly price-research job." url: https://perceptlayer.com/blog/facebook-marketplace-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Facebook Marketplace API: Listings as JSON 2 Nov 2026 Perceptlayer 7 min read A Facebook Marketplace API call returns public Marketplace listings as JSON without a browser or a parser. Three endpoints cover it: `marketplace-search` takes a `query` and a `location`, `marketplace-browse` takes a `location`, and `marketplace-item` takes a `listing_id`. Each successful call costs 1 credit, and failed calls cost nothing. This post covers the parameters, a cURL request, a weekly price-research job in Python and what that job costs. ## Key takeaways - `GET /v1/facebook/marketplace-search` takes an optional `query` (up to 200 characters) and an optional `location` (up to 120 characters). - `GET /v1/facebook/marketplace-browse` takes only an optional `location`; `GET /v1/facebook/marketplace-item` requires a `listing_id`. - Every one of the three costs 1 credit per successful call. A failed call returns `X-Credits-Used: 0`. - A weekly job of 10 queries in 4 locations is 40 calls × 1 credit = 40 credits a week, about 2,080 credits a year. - These are restricted endpoints: accept the restricted-endpoint terms first, and use them for listings and prices, not for collecting data on sellers. ## Which endpoints return Marketplace listings? Three of the 21 endpoints on the [Facebook API](https://perceptlayer.com/apis/facebook) deal with Marketplace, and they split the job by how you start. Search starts from what you want to find, browse starts from where you are, and item starts from a listing you already know. All three are `GET`, all three cost 1 credit per successful call, and all three return JSON. | Endpoint | Starts from | Required | Optional | Credits | | --- | --- | --- | --- | --- | | [`GET /v1/facebook/marketplace-search`](https://perceptlayer.com/apis/facebook/marketplace-search) | A search term and a place | none | `query`, `location` | 1 | | [`GET /v1/facebook/marketplace-browse`](https://perceptlayer.com/apis/facebook/marketplace-browse) | A place | none | `location` | 1 | | [`GET /v1/facebook/marketplace-item`](https://perceptlayer.com/apis/facebook/marketplace-item) | One listing | `listing_id` | none | 1 | The other Facebook endpoints cover pages, groups, events, posts and profiles. This post leaves them out: a price-research job needs listings, and nothing about the people who post them. ## Which parameters do the Marketplace endpoints take? The parameter list is short, and the reference documents types and lengths only. Every parameter is a string. Nothing else is documented about them, such as defaults, page sizes or how a location string is matched, so test the exact `location` values you plan to use in the playground before you schedule a job around them. | Endpoint | Parameter | Type | Required | Limit | | --- | --- | --- | --- | --- | | `marketplace-search` | `query` | string | no | up to 200 characters | | `marketplace-search` | `location` | string | no | up to 120 characters | | `marketplace-browse` | `location` | string | no | up to 120 characters | | `marketplace-item` | `listing_id` | string | yes | none stated | A request that breaks these rules, such as a `query` longer than 200 characters, comes back as `invalid_parameters` (422) and costs nothing. Values in a query string need URL encoding: a space becomes `+` or `%20`. The [requests and responses docs](https://docs.perceptlayer.com/requests) cover the general request format. ## How do you search Marketplace listings with cURL? Send a `GET` request to the search endpoint with your key in the `X-API-Key` header. The request below asks for bike listings in San Francisco. Keys start with `sk_live_`, and you can also pass the key as the `api_key` query parameter where you can't set headers, as the [authentication docs](https://docs.perceptlayer.com/authentication) describe. ```bash curl "https://api.perceptlayer.com/v1/facebook/marketplace-search?query=bike&location=San+Francisco" \ -H "X-API-Key: $API_KEY" ``` To see what's listed in an area without a search term, call browse with just a location: ```bash curl "https://api.perceptlayer.com/v1/facebook/marketplace-browse?location=San+Francisco" \ -H "X-API-Key: $API_KEY" ``` And to fetch one listing, pass its ID: ```bash curl "https://api.perceptlayer.com/v1/facebook/marketplace-item?listing_id=$LISTING_ID" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for these endpoints yet, so this post doesn't show one. Run the search in the playground on the [Facebook API page](https://perceptlayer.com/apis/facebook) to see the response shape for your query and location before you write code that reads specific fields. Check there, too, whether search results carry an ID in the form `marketplace-item` expects. ### What comes back on every call? Whatever the body holds, the headers are documented. A successful response carries `X-Credits-Used`, the credits that call cost, and `X-Credits-Remaining`, your balance after it. Rate headers come with it: `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`. Errors return an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. ## What does a price-research job look like? A price-research job asks the same questions every week and keeps every answer. Pick a fixed set of product queries and locations, run `marketplace-search` for each pair on a schedule, and store each raw response with the query, the location, the date and the credits it used. Fixed inputs matter more than volume: the same query in the same place, week after week, is what makes asking prices comparable over time. Store the raw JSON rather than parsed fields. With no recorded response to build against, the safe first version keeps everything and decides what to extract later, once you've looked at real responses in the playground. That also means a change in the response shape never loses data: you still have the full body to re-read. ### A weekly collector in Python This script uses `requests` and the standard library. It runs each query in each location once, saves the response body and the credit headers to SQLite, and waits out a 429 using `Retry-After`. It reads no fields from the body, so it works whatever the listings look like. ```python import json import os import sqlite3 import time from datetime import date import requests API = "https://api.perceptlayer.com/v1/facebook/marketplace-search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} QUERIES = ["road bike", "standing desk", "espresso machine", "iphone 15"] LOCATIONS = ["San Francisco", "Oakland", "San Jose"] db = sqlite3.connect("marketplace.db") db.execute( """CREATE TABLE IF NOT EXISTS runs ( run_date TEXT, query TEXT, location TEXT, status INTEGER, credits_used TEXT, body TEXT, PRIMARY KEY (run_date, query, location) )""" ) def search(query, location): params = {"query": query, "location": location} while True: resp = requests.get(API, headers=HEADERS, params=params, timeout=60) if resp.status_code == 429: time.sleep(int(resp.headers.get("Retry-After", "1"))) continue return resp today = date.today().isoformat() for query in QUERIES: for location in LOCATIONS: resp = search(query, location) if resp.ok: body = json.dumps(resp.json()) else: body = json.dumps(resp.json().get("error", {})) db.execute( "INSERT OR REPLACE INTO runs VALUES (?, ?, ?, ?, ?, ?)", (today, query, location, resp.status_code, resp.headers.get("X-Credits-Used"), body), ) db.commit() time.sleep(1) # stays inside the free tier's 1 request a second print(db.execute( "SELECT status, COUNT(*) FROM runs WHERE run_date = ? GROUP BY status", (today,), ).fetchall()) ``` The primary key on date, query and location means a rerun on the same day overwrites rather than duplicates. Failed rows keep the error body, so you can see which pairs failed and why, and they cost nothing. The [errors docs](https://docs.perceptlayer.com/errors) list every code the job might store. ### What should the job do with errors? Treat each error code as an instruction. `invalid_parameters` (422) means a query or location breaks the documented limits, so fix the input. `source_error` (502) and `temporarily_unavailable` (503) are worth one retry later; a 503 carries `Retry-After`. `insufficient_credits` (402) means the balance is empty, and the job should stop rather than loop. `restricted_endpoint` (403) means the terms haven't been accepted on that account yet. ## What does the weekly job cost? Cost follows calls, and each search is 1 credit. The script above runs 4 queries × 3 locations = 12 calls a week, so 12 credits a week and 624 credits a year. A larger set of 10 queries in 4 locations is 40 calls × 1 credit = 40 credits a week, or 40 × 52 = 2,080 credits a year. The 100 free credits on signup cover the first 8 weeks of the smaller job and the first 2 weeks of the larger one. After that both need purchased credits, and the Starter pack's 10,000 covers either for a year. | Job | Calls a week | Credits a week | Credits a year | | --- | --- | --- | --- | | 4 queries × 3 locations | 12 | 12 | 624 | | 10 queries × 4 locations | 40 | 40 | 2,080 | | 50 queries × 20 locations | 1,000 | 1,000 | 52,000 | | 50 queries × 20 locations, plus 200 item lookups | 1,200 | 1,200 | 62,400 | The last two rows are a different scale. 1,000 calls a week is about 4,330 credits a month: the Starter pack's 10,000 credits covers a little over two months of it. Purchased credits last 12 months, and there's no subscription. At 1,000 calls a week, the free tier's 1 request a second gets through a run in under 17 minutes; paying accounts run at least 5 a second. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## What do the restricted-endpoint terms mean here? The Facebook API has restricted endpoints, and they work only after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard. Until then a call returns `restricted_endpoint` (403) and costs nothing. The terms don't permit collecting personal data without a lawful basis, or using it to contact people. That shapes what a Marketplace job should keep. Keep the job about listings and prices in aggregate: what a used road bike asks in Oakland this month, how asking prices for a model move over a quarter, how many listings a category has in a city. Don't build records of individual sellers, follow particular people across listings, or use anything you collect to message anyone. If a response contains seller details, drop them before storage, or keep only what the analysis needs. Read Facebook's own terms before you build on its data, and get legal advice for commercial use. Data is collected from publicly available sources and returned as found at the time of the call, so a listing can sell or change between your call and your analysis. ## How does this fit with other classifieds data? Marketplace is one source of second-hand asking prices, and a price study usually needs more than one. [Craigslist Scraper or API: Watching New Postings](https://perceptlayer.com/blog/craigslist-scraper-vs-api) covers polling a classifieds search for new postings, and [eBay Scraper or API: Prices Without the Parsing](https://perceptlayer.com/blog/ebay-scraper-vs-api) covers a marketplace where sold prices sit next to asking prices. The same key reaches all of them, and the [API guides](https://perceptlayer.com/blog/category/api-guides) list the rest. For an agent that answers questions such as "what do standing desks go for in San Jose", connect the MCP server instead of writing a collector; the [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover the setup. To start, run `marketplace-search` with your own query and location in the playground on the [Facebook API page](https://perceptlayer.com/apis/facebook), then [get a free API key](https://perceptlayer.com/signup) for the scheduled job. ## APIs in this post - [Facebook **1 credit per call** · 21 endpoints](https://perceptlayer.com/apis/facebook) ## Frequently asked questions ### Is there a Facebook Marketplace API for listings? Yes, as endpoints in the Perceptlayer catalogue. `GET /v1/facebook/marketplace-search` searches by `query` and `location`, `GET /v1/facebook/marketplace-browse` lists by `location`, and `GET /v1/facebook/marketplace-item` returns one listing by `listing_id`. Each successful call costs 1 credit. They're restricted endpoints, so accept the restricted-endpoint terms in your dashboard first. ### How much does a Facebook Marketplace search cost? Each successful call costs 1 credit, whichever of the three endpoints you use. Failed calls cost nothing and return `X-Credits-Used: 0`. A weekly job of 10 queries in 4 locations is 40 credits a week. Every account gets 100 free credits after verifying an email, with no credit card. ### Can I filter Marketplace results by price or category? Not through documented parameters. Search takes only `query` and `location`, and browse takes only `location`. To study one price range, run a narrow query, store the full response and filter on your side after checking the fields in the playground. Keeping one fixed `query` per product makes the weeks comparable. ### What happens when I hit the rate limit? The call returns `rate_limited` (429) with a `Retry-After` header giving the seconds to wait, and it costs nothing. Limits are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second (60 a minute); paying accounts get at least 5 a second. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. ### Can I use Marketplace data to contact sellers? No. The restricted-endpoint terms don't permit collecting personal data without a lawful basis or using it to contact people. Use Marketplace data for listings and prices in aggregate, such as typical asking prices by city or category over time, and leave seller details out of what you store. facebook marketplace marketplace listings classifieds price research second-hand prices ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Oct 2026 Perceptlayer 8 min read ## [Craigslist Scraper or API: Watching New Postings](https://perceptlayer.com/blog/craigslist-scraper-vs-api) Compare a Craigslist scraper with four endpoints at 1 credit a call: a recorded Portland bike search with 821 results, bumped\_at times and a 3-call sweep. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Sept 2026 Perceptlayer 7 min read ## [Kleinanzeigen API: Search German Classifieds as JSON](https://perceptlayer.com/blog/kleinanzeigen-api-search-json) Search Kleinanzeigen ads by query, city, category and price range with one GET call. Parameters, a real response and the cost: 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 26 Oct 2026 Perceptlayer 8 min read ## [Craigslist API: Get Classified Postings as JSON](https://perceptlayer.com/blog/craigslist-api-postings-json) Search Craigslist postings by site, category and price as JSON, then poll for new ones. A real response, the parameters and the credit cost. --- title: "Instagram Scraper or API: Public Data Compared" description: "A DIY Instagram scraper versus 12 Instagram endpoints at 1 credit a call: hashtags, public posts, reels, upkeep, terms and a verdict per use case." url: https://perceptlayer.com/blog/instagram-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Instagram Scraper or API: Public Data Compared 2 Nov 2026 Updated 10 Nov 2026 Perceptlayer 8 min read An Instagram scraper is a script that loads Instagram pages in a browser or replays the app's requests, then reads posts, hashtags and reels out of what comes back. It breaks when the site changes, and it runs into whatever limits the site puts on automated traffic. The alternative covered here is a set of 12 Instagram endpoints that return public posts, hashtag results and reels as JSON at 1 credit a successful call, under restricted-endpoint terms. This post compares the two and gives a verdict per use case, for brand and topic work in aggregate. ## Key takeaways - A DIY Instagram scraper needs a headless browser or reverse-engineered requests, session handling and parsers, and it needs fixing every time the site's pages or requests change. - The Instagram API has 12 `GET` endpoints, each 1 credit per successful call; failed calls cost nothing and return `X-Credits-Used: 0`. - `GET /v1/instagram/hashtags-search` and `GET /v1/instagram/search-popular` take a `q` of up to 100 characters, which suits topic and hashtag tracking. - All 12 Instagram endpoints are restricted: they work after you accept the restricted-endpoint terms, which don't permit collecting personal data without a lawful basis or using it to contact people. - Tracking 20 hashtags once a day is 20 × 30 = 600 credits a month. The 100 free credits on signup cover the first 5 days, and the Starter pack's 10,000 covers a year of it. ## What does building an Instagram scraper involve? Building an Instagram scraper means writing and maintaining browser automation or request replay against a site that wasn't built to be read by scripts. You load a profile, hashtag or post page, wait for its scripts to render the content, and parse captions, counts and media links out of the result. Or you watch the requests the page makes and replay them yourself, which is faster but ties your code to request formats you don't control. Either way the hard part is keeping it running. Page markup and internal request formats change without notice, so a scraper that returned clean rows last week can return empty ones today. Large sites limit automated traffic, and a scraper that runs at any volume tends to start seeing login prompts, blocks or challenge pages. When that happens, stop. Getting around a site's protections with rotating accounts, proxies or CAPTCHA solvers is not a fix we'd recommend, and it moves your project from "fragile" to "against the rules". Then read the rules themselves. Instagram's own terms, and Meta's terms for developers, are where the platform sets out what it allows. Read them before you build anything that collects Instagram data, and get legal advice if the project is commercial. ### What does a scraper cost to run? A scraper has no per-call bill, but it isn't free. You pay for the servers that run a browser per job, the time to rewrite selectors after each change, and the monitoring that tells you the output has quietly gone empty. That cost is small for a one-off script and grows with every hashtag, account and schedule you add. ## What do the Instagram endpoints return? The Instagram API at [/apis/instagram](https://perceptlayer.com/apis/instagram) returns public Instagram data as JSON, one call per lookup. It has 12 endpoints, all `GET`, all 1 credit per successful call. They cover hashtag and keyword search, single posts and their comments, reels for an audio track, and an account's posts, reels and tagged posts. Data is collected from publicly available sources and returned as found at the time of the call. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | `/v1/instagram/hashtags-search` | Hashtag search results | `q` | none | | `/v1/instagram/search-popular` | Popular search results | `q` | none | | `/v1/instagram/post` | One post | none | `url`, `shortcode` | | `/v1/instagram/post-comments` | A post's comments | `shortcode` | `max_id` | | `/v1/instagram/audio-reels` | Reels using an audio track | `audio_id` | `max_id` | | `/v1/instagram/user-posts` | An account's posts | `username` | `max_id` | | `/v1/instagram/user-reels` | An account's reels | none | `username`, `user_id`, `max_id` | Five more endpoints return account details ( `user`, `user-v2`, `user-basic`, `user-embed`) and highlights ( `user-highlights`). The [API page](https://perceptlayer.com/apis/instagram) lists all 12 with their parameters. A hashtag search is one request with your key in the `X-API-Key` header: ```bash curl "https://api.perceptlayer.com/v1/instagram/hashtags-search?q=nature" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for this API, so this post doesn't show one. Run the call in the playground on the [Instagram API page](https://perceptlayer.com/apis/instagram) to see the exact fields before you write a parser. The [hashtag search endpoint page](https://perceptlayer.com/apis/instagram/hashtags-search) links straight to it. ### Which parameters do the endpoints take? Every parameter is a string. `q` takes up to 100 characters on both search endpoints. `username` takes up to 30 characters, and so does `user_id` where an endpoint accepts it. `shortcode` on `post-comments` takes up to 20 characters, and `audio_id` up to 40. Several endpoints take an optional `max_id`; the reference doesn't document page sizes or defaults, so check its behaviour in the playground. The [post endpoint](https://perceptlayer.com/apis/instagram/post) accepts either a `url` or a `shortcode`, and `post-comments` takes a `shortcode`: the parameter names match. ## Which terms apply to the restricted endpoints? All 12 Instagram endpoints are restricted, and the restricted-endpoint terms at [/legal/restricted-endpoints](https://perceptlayer.com/legal/restricted-endpoints) apply to them. They work once you accept those terms in the dashboard. The terms don't permit collecting personal data without a lawful basis, and they don't permit using data from these endpoints to contact people. That rules out lead lists, outreach and follower harvesting, whatever tool you use to collect the data. What fits is work on brands, public posts and topics in aggregate. Count how often a hashtag appears over time. Track what a brand's own account publishes. Measure the tone of comments on a campaign post as a whole, without storing who wrote each one. When a response includes people's names, handles or profile details you don't need, drop them before you store anything. The errors list includes `restricted_endpoint` (403); the [errors docs](https://docs.perceptlayer.com/errors) cover it with the other codes. ## How do a scraper and the endpoints compare? A scraper gives you control and no per-call bill, and costs you maintenance, blocks and terms risk. The endpoints give you JSON from a stable path with a credit per call, and the restricted-endpoint terms decide what you may do with it. Neither suits every job, so the table sets them side by side on the points that decide most projects. | | DIY Instagram scraper | Instagram endpoints | | --- | --- | --- | | Setup | Headless browser or request replay, session handling, parsers | API key in the `X-API-Key` header | | What you get | Whatever you parse from the page | JSON from 12 documented endpoints | | Hashtags and topics | Parsed from hashtag pages | `hashtags-search` and `search-popular` with `q` | | Reels | Parsed per page | `user-reels` per account, `audio-reels` per `audio_id` | | Maintenance | High: markup and requests change | Low: you maintain only your own code | | Blocks | Risk of login prompts and challenge pages at volume | No sessions to manage; a failed call returns an error code and costs 0 | | Speed | One browser or session per job | 1 request a second free, at least 5 a second on paid packs | | Terms | Instagram's and Meta's terms | Restricted-endpoint terms; no personal data without a lawful basis | | Cost | Hosting and engineering time | 1 credit per successful call; failed calls cost 0 | ### What does a hashtag tracker cost? On the endpoints, cost follows calls. A brand team that tracks 20 campaign and category hashtags with one `hashtags-search` call each per day makes 20 × 30 = 600 calls a month, which is 600 credits. At 20 credits a day, the 100 free credits you get after verifying an email address, with no credit card, cover the first 5 days. Add one `user-posts` call a day for each of 10 brand accounts in the category, and the month grows by 10 × 30 = 300 credits, to 900. Add comments for 200 campaign posts at one call each and you reach 1,100 credits a month, which the Starter pack's 10,000 covers for about nine months. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) for how each call is billed. ## Which route should you choose? Choose by what you'll do with the data and how often, because that decides which terms apply and what upkeep you take on. The verdicts below assume brand, topic or aggregate work, the uses the restricted-endpoint terms allow. If your plan involves contacting people or building lists of individuals, neither route is the answer. - **Hashtag and topic trends for a brand or a category**: use `hashtags-search` and `search-popular` on a daily schedule. You store counts and posts per day, and you don't maintain a browser. - **Monitoring a brand's own account, or competitor brands' public accounts**: use `user-posts` and `user-reels` with the brand's `username`. Store post-level figures and captions, not follower details. - **Campaign sentiment on public posts**: use `post-comments` with each post's `shortcode`, then score the comments in aggregate. Drop commenters' identities before you store the text. - **Tracking a sound used in reels**: use `audio-reels` with the track's `audio_id` to follow the reels that use it over time. - **A one-off question from an AI agent**: connect the MCP server at `https://perceptlayer.com/mcp`, where `search_endpoints` and `get_endpoint` are free and `call_endpoint` spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. - **Learning how scraping works**: write a scraper against a practice site, not Instagram, and read [Google Maps Scraper or Places Data API](https://perceptlayer.com/blog/google-maps-scraper-vs-api) for how the same trade-off plays out on another site. For other social sources, [TikTok API: Official Options and Public Trend Data](https://perceptlayer.com/blog/tiktok-api-trend-data) covers TikTok and the [social media APIs](https://perceptlayer.com/verticals/social) list the rest. To check the fields first, run `hashtags-search` with your own hashtag in the playground on the [Instagram API page](https://perceptlayer.com/apis/instagram), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Instagram **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/instagram) ## Frequently asked questions ### Is scraping Instagram legal? It depends on your jurisdiction, what you collect and how you use it, and Instagram's own terms set out what the platform allows. Public posts about brands and topics are lower risk than data about individuals, which is personal data in many places. Read Instagram's terms, get legal advice for commercial use, and don't get around blocks, logins or challenges. ### Can I collect Instagram data about individual people? Not for lead generation, outreach or follower harvesting. The restricted-endpoint terms don't permit collecting personal data without a lawful basis or using data from these endpoints to contact people. Use the Instagram endpoints for brands, public posts and topics in aggregate, and drop names and handles you don't need before you store results. ### How many credits does an Instagram call cost? Each of the 12 Instagram endpoints costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`, and every successful response carries `X-Credits-Used` and `X-Credits-Remaining`. Every account gets 100 free credits after verifying an email address; larger prepaid packs start at 10,000 credits. ### What happens when I hit the rate limit? You get a 429 `rate_limited` error with a `Retry-After` header giving the seconds to wait, and the call costs nothing. Free accounts get 1 request a second, paying accounts at least 5 a second, and the limit is shared by all of an account's keys. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the `RateLimit-Remaining` and `RateLimit-Reset` headers. ### Can I see an Instagram response before writing code? Yes. The [Instagram API page](https://perceptlayer.com/apis/instagram) has a playground: pick an endpoint, fill in its parameters and run a real call with your key to see the JSON it returns. Do this before you write a parser, since this post doesn't include a recorded response and the fields are best read from a real call. instagram scraping social media data hashtags brand monitoring ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Threads Scraper or API: What You Get](https://perceptlayer.com/blog/threads-scraper-vs-api) A DIY Threads scraper versus 8 Threads endpoints at 1 credit a call: keyword search, topic tags, brand posts, upkeep, terms and the cost per tag tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Nov 2026 Perceptlayer 8 min read ## [Facebook Scraper or API: What You Get](https://perceptlayer.com/blog/facebook-scraper-vs-api) A Facebook scraper vs 21 restricted Facebook endpoints at 1 credit a call: pages, events and Marketplace for brand and market work, and the cost per page. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Nov 2026 Perceptlayer 9 min read ## [TikTok Scraper or API: Hashtag, Sound and Trend Data](https://perceptlayer.com/blog/tiktok-scraper-vs-api) A TikTok scraper next to 31 TikTok endpoints at 1 credit a call: trending hashtags by country, hashtag and sound posts, and 2 credits per hashtag tracked a day. --- title: "Autotrader Scraper or API: What You Get | Perceptlayer" description: "An Autotrader UK scraper vs a 1-credit search call: a recorded BMW search near SW1A 1AA with 42,916 results, advert_id, price.amount and year as JSON." url: https://perceptlayer.com/blog/autotrader-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Autotrader Scraper or API: What You Get 1 Nov 2026 Perceptlayer 8 min read An Autotrader scraper loads search result pages for a postcode, then turns each car card's text (title, price, mileage, location) into fields you can store and compare. You maintain the fetching, the parsing and the clean-up of every value. The alternative is the AutoTrader UK endpoints, which return the same search as JSON at 1 credit per successful call: a recorded BMW search near SW1A 1AA came back with 42,916 results across 2,146 pages. This post compares the two routes field by field, prices a used-car watch in credits, and gives a verdict per job. ## Key takeaways - A scraper has to turn display text such as `£2,700` and `Crawley (27 miles)` into numbers; `GET /v1/autotrader-uk/search` returns them already split as `price.amount`, `price.currency`, `distance.value` and `distance.unit`. - Each listing carries an `advert_id`, while the recorded `fpa_link` includes a `searchId` shared by every row of the search, so key your table on `advert_id`, not the link. - The recorded search reports `page_count: 2146` and `total_results: 42916`, so reading every BMW near the postcode once is 2,146 calls × 1 credit = 2,146 credits. - Six endpoints cover search, a single listing by `advert_id`, a dealer by `retailer_id`, a dealer's stock, facets and taxonomy, all at 1 credit each. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a run that hits errors doesn't drain the balance. ## What does an Autotrader scraper have to do? An Autotrader scraper has four jobs: build search URLs for a postcode and filters, fetch each results page, parse every car card into fields, and do it again on a schedule without losing track of which car is which. The fetch and the parse are the visible work. The upkeep is in the last two: knowing when a page layout changed and quietly emptied a column, and matching today's rows to yesterday's. Car listings add their own parsing work. A results card mixes a make and model title, a trim line, a price string, a seller badge and a location with a distance in brackets. Each of those is a string you have to split, strip and convert, and each conversion is a place a small layout change breaks your data without raising an error. Volume brings the usual problems for any large marketplace. A scraper that pulls thousands of pages a day should expect slow responses, challenge pages and blocked requests, and the right response to those is to slow down or stop, not to route around them. Read Autotrader's terms of use before you build a collector, and keep sellers' personal details out of anything you store. ## What does one recorded search return? One call to the search endpoint returns a page of listings and a pagination block that tells you how big the whole result set is. The recorded request asked for BMWs near SW1A 1AA, priced as a total rather than monthly, sorted by relevance: ```bash curl "https://api.perceptlayer.com/v1/autotrader-uk/search?postcode=SW1A1AA&price_search_type=total&make=BMW&page=1&sort=relevance" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the first listing and the pagination block: ```json { "success": true, "data": { "listings": [ { "advert_id": "202610227244889", "type": "NATURAL_LISTING", "title": "BMW X5", "sub_title": "3.0d SE Exclusive Edition Auto 4WD Euro 4 5dr", "attention_grabber": "12 MONTHS MOT | EXTENSIVE HIST", "price": { "amount": 2700, "currency": "GBP", "display": "£2,700" }, "vehicle_location": "Crawley (27 miles)", "distance": { "value": 27, "unit": "miles" }, … "number_of_images": 16, "seller_type": "PRIVATE", "fpa_link": "/car-details/202610227244889?sort=relevance&searchId=07b3f6d8-f090-4951-ba5f-0a9b8fc1bfa6", … "position": 1, "tracking_context": { "price": 2700, "make": "BMW", "model": "X5", "year": 2005, "condition": "used", "price_indicator": "NOANALYSIS" } }, … ], "pagination": { "page": 1, "page_count": 2146, "total_results": 42916, "has_more": true } }, "meta": { "duration_ms": 1129, "endpoint_family": "search" } } ``` The second recorded listing is a 2014 BMW 5 Series at `price.amount` 2200, 2 miles away in London, also a `PRIVATE` seller. Both rows carry the same `searchId` inside `fpa_link`, which is why that link is a poor key: it describes the search, not just the car. ## Which fields would a scraper have to rebuild? Most of the work a scraper's parser does is already done in the JSON, and the table below shows where. The left column is what you would read off a results card; the right column is the field the recorded search returns for it. Where the JSON keeps both a number and a display string, store the number and ignore the string. | On the page | Scraper work | Field in the recorded search | | --- | --- | --- | | Car identity | Pull an ID out of the link | `advert_id` ( `"202610227244889"`) | | "BMW X5" | Read the title | `title`, plus `tracking_context.make` and `tracking_context.model` | | Trim and engine line | Read the second line | `sub_title` | | "£2,700" | Strip `£` and commas, convert to int | `price.amount` (2700), `price.currency` ( `GBP`) | | "Crawley (27 miles)" | Split town from distance | `vehicle_location`, `distance.value`, `distance.unit` | | Year of the car | Find it in the title or spec line | `tracking_context.year` (2005) | | Private or trade | Read a badge | `seller_type` ( `PRIVATE`) | | Photo count and URLs | Collect image tags | `number_of_images`, `images[]` | | Seller's headline | Read the banner text | `attention_grabber` | | Rank in results | Count cards | `position` | Two fields need care. The `images[]` URLs contain a literal `{resize}` segment, so test what you substitute there before you build on it. And both recorded rows have `type: NATURAL_LISTING` and `price_indicator: NOANALYSIS`; check what other values your own searches return before you filter on either. ### Where do the other five endpoints fit? The search result's `advert_id` has the same name as the required parameter on `GET /v1/autotrader-uk/listing`, so the names match; try a recorded `advert_id` in the playground to see the full listing before you depend on it. `GET /v1/autotrader-uk/dealer` takes a `retailer_id`, and `GET /v1/autotrader-uk/dealer-listings` takes a `postcode` and a `retailer_id` with the same filters as search. `GET /v1/autotrader-uk/facets` takes a `postcode` and a `facets[]` list (for example `make`, `mileage`, `price` or `fuel_type`), and `GET /v1/autotrader-uk/taxonomy` takes a `postcode` and an optional `make`. The [AutoTrader UK API page](https://perceptlayer.com/apis/autotrader-uk) lists every parameter. ## How do a scraper and the endpoints compare? The scraper costs engineering time and carries blocking and terms risk; the endpoints cost credits per page and leave you only the storage and the logic. For a recurring job, such as watching one make's prices within a distance of a postcode, the comparison looks like this. | | DIY Autotrader scraper | AutoTrader UK endpoints | | --- | --- | --- | | Setup | URL builder, fetcher, card parser, number clean-up, monitoring | API key in the `X-API-Key` header | | Filters | Rebuild the site's query string yourself | `make`, `model`, `body_type`, `transmission`, `seller_type`, `fuel_type[]`, price, year and mileage ranges, `distance` | | Prices | Parse `£` strings | `price.amount` as an integer, `price.currency` | | Identity across runs | Extract an ID, hope the link format holds | `advert_id` on every listing | | Result size | Count pages as you go | `pagination.total_results`, `page_count`, `has_more` | | When the layout changes | Fields go empty until you fix the parser | You read named JSON fields; no parser of yours to fix | | Blocks and challenges | Yours to handle | A failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second on paid packs | | Cost | Hosting and your time | 1 credit per successful call | ### What does tracking a car cost per day? Cost follows calls, and one search call returns a page of cars. The recording reports 42,916 results across 2,146 pages, which works out at about 20 listings a page (42,916 ÷ 2,146); check the count on your own calls, since page size isn't documented. Reading the whole BMW set once is 2,146 calls × 1 credit = 2,146 credits. At the free rate of 1 request a second that takes about 36 minutes; at 5 a second, about 7. Most watches are narrower. Add `model`, `max_price` and a `distance` and the set shrinks; suppose it comes to 3,000 cars, or 150 pages. A daily run is then 150 calls × 1 credit = 150 credits, about 0.05 credits per car per day, and 4,500 credits over 30 days. That's more than the 100 free credits on signup and fits inside the Starter pack's 10,000. The [credits docs](https://docs.perceptlayer.com/credits) explain how calls are debited, and [pricing](https://perceptlayer.com/pricing) shows what credits cost. ## How would you watch prices with the search endpoint? A price watch needs three things: a loop over pages until `has_more` is false, a table keyed on `advert_id`, and a comparison with the last price you stored. The script below reads only fields from the recorded response and uses `requests` and the standard library's `sqlite3`. ```python import os import sqlite3 import requests API = "https://api.perceptlayer.com/v1/autotrader-uk/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PARAMS = {"postcode": "SW1A1AA", "price_search_type": "total", "make": "BMW", "sort": "relevance"} db = sqlite3.connect("autotrader.db") db.execute("""CREATE TABLE IF NOT EXISTS cars ( advert_id TEXT PRIMARY KEY, title TEXT, year INTEGER, price INTEGER, seller_type TEXT, distance INTEGER)""") def run(max_pages=5): page = 1 while page <= max_pages: r = requests.get(API, headers=HEADERS, params={**PARAMS, "page": page}, timeout=30) r.raise_for_status() data = r.json()["data"] for car in data["listings"]: new_price = car["price"]["amount"] row = db.execute("SELECT price FROM cars WHERE advert_id = ?", (car["advert_id"],)).fetchone() if row and row[0] != new_price: print(car["advert_id"], car["title"], row[0], "->", new_price) db.execute("INSERT OR REPLACE INTO cars VALUES (?, ?, ?, ?, ?, ?)", ( car["advert_id"], car["title"], car["tracking_context"]["year"], new_price, car["seller_type"], car["distance"]["value"])) db.commit() if not data["pagination"]["has_more"]: break page += 1 run() ``` `max_pages` caps the run at 5 credits while you test. Raise it once you've seen your own page counts, and read the `X-Credits-Remaining` header if you want the script to stop before the balance runs low. A 429 response carries `Retry-After`; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover pacing a longer run. ## Which route should you choose? Choose by how often you need the data and how many cars you follow, since that decides whether parser upkeep or per-page credits dominate. For a handful of cars you'll check once, use the website in a browser and build nothing. - **Daily price watch on one make or model near a postcode**: use `search` with filters and store `advert_id`, `price.amount` and the run date, as in the script above. At about 20 cars a page that's roughly 0.05 credits per car per day. - **One-off market snapshot** (how many BMWs, at what prices, within a distance): one full pass, priced by `page_count`, for example 2,146 credits for the recorded search. - **Following one dealer's stock**: use `dealer-listings` with the dealer's `retailer_id`, and `dealer` for the dealer record. - **Counts by make, mileage or price band** without reading every listing: try `facets` with the `facets[]` values you need in the playground first. - **A pricing model across several countries' marketplaces**: start from the [cars APIs](https://perceptlayer.com/verticals/cars), which list the other car sources that answer to the same key. - **Learning to scrape**: build against a practice site, not a live marketplace. - **An agent answering used-car questions**: add the MCP server so it calls `search` directly, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. For the same comparison on another listings site, [Zillow Scraper or API](https://perceptlayer.com/blog/zillow-scraper-vs-api) covers property listings and [eBay Scraper or API](https://perceptlayer.com/blog/ebay-scraper-vs-api) covers marketplace prices. To check the fields against your own postcode, run `search` in the playground on the [AutoTrader UK API page](https://perceptlayer.com/apis/autotrader-uk), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [AutoTrader UK **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/autotrader-uk) ## Frequently asked questions ### Is scraping Autotrader allowed? That depends on Autotrader's terms of use and the law where you operate, so read the terms and take legal advice for commercial use. Don't get around blocks, challenges or other protections. Listing facts such as make, model, year and price carry less risk than personal data; leave private sellers' details out of anything you keep, and store only the fields your job needs. ### How many results does one search call return? The recorded BMW search returned `total_results: 42916` across `page_count: 2146`, which is about 20 listings per page. Page size isn't documented, so read `pagination` on your own calls. Loop with `page` until `has_more` is false, and narrow a large set with `model`, price, year, mileage or `distance` filters. ### Can I get monthly finance prices instead of cash prices? Search, dealer listings and facets take `price_search_type`, which accepts `total` or `monthly`. The recorded call used `total` and returned `price.amount` in `GBP`. Run the same search with `monthly` in the playground to see what comes back before you store it, since only the total-price response is recorded here. ### Does a failed Autotrader call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Common codes are `invalid_parameters` (422) for a bad value and `rate_limited` (429), which carries a `Retry-After` header. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ### How do I track the same car across runs? Key your records on `advert_id`. It appears on every listing and is the required parameter of the listing endpoint. Don't key on `fpa_link`: in the recorded response it includes a `searchId` query value shared by every row of that search, so the link describes the search as well as the car. autotrader used cars scraping car listings uk ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Aug 2026 Updated 10 Nov 2026 Perceptlayer 6 min read ## [AutoTrader UK API: Get Used Car Listings as JSON](https://perceptlayer.com/blog/autotrader-uk-api-listings-json) Search UK used car listings by postcode, make and price with one GET call. Real BMW response, 6 endpoints, 1 credit per call, failed calls free. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Oct 2026 Perceptlayer 7 min read ## [Cars.com API: Used Car Listings and Price Evaluations](https://perceptlayer.com/blog/cars-com-api-listings-price-evaluation) Search Cars.com listings with its six required parameters (zip, radius\_miles, stock\_type, sort, page, page\_size), then listing, dealer and price-eval calls. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [AutoScout24 API: Search European Car Listings as JSON](https://perceptlayer.com/blog/autoscout24-api-car-listings-json) Search AutoScout24 listings as JSON: make\_id and price filters, a recorded BMW response, and what a monthly price sweep costs in credits. --- title: "Google Reviews Scraper or API: What You Get | Perceptlayer" description: "A Google reviews scraper versus the reviews endpoint: rating, timestamp, review_text and a nextPage token per call, at 1 credit per business checked." url: https://perceptlayer.com/blog/google-reviews-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Reviews Scraper or API: What You Get 1 Nov 2026 Perceptlayer 9 min read A Google reviews scraper is code that loads a business's reviews, steps through them page by page and pulls the rating, date and text out of what comes back. You build and maintain the fetching, the parsing and the checks that tell you it broke. The alternative is `GET /v1/google-maps/reviews`, which takes a `business_id` and returns reviews as JSON with `rating`, `timestamp`, `review_text` and a `nextPage` token, at 1 credit per successful call. This post compares the two and gives a verdict per use case. ## Key takeaways - A reviews scraper has four parts you maintain: a fetcher, a pager that walks through every review, a parser for rating, date and text, and a monitor that notices when a run quietly returns less. - `GET /v1/google-maps/reviews` needs only `business_id` and also takes `page`, `pages`, `search` (up to 100 characters), `sort` (one of 1, 2, 3, 4), `limit`, `hl` and `gl`. - Each recorded review item carries `review_id`, `rating`, a 13-digit `timestamp`, `review_text` and `review_language` as arrays, and `is_google_review`; the response ends with a `nextPage` token. - Checking 200 businesses once a day for new reviews is 200 × 30 = 6,000 credits a month, or 30 credits per business tracked. - Store the review content and `review_id`; leave reviewer names, photos and profile links out of what you keep. ## What does a Google reviews scraper have to do? A reviews scraper does more than fetch one page. It has to find the business, load its reviews, keep loading until it has every review or every new one, turn each review into fields, and store them without duplicates. Each step is code you own, and each one can break without an error, so a scraper also needs checks that compare today's run with yesterday's. ### Fetching and paging Review lists on most large sites aren't one static page. They come in batches, often loaded by scripts as the reader scrolls or clicks, so a scraper typically needs a headless browser or has to work out which background requests carry the data. Then it has to page: keep requesting the next batch until there are no more, and remember where it stopped. A business with thousands of reviews means many requests per run, and a run that stops halfway leaves a gap you have to detect. ### Parsing Each review has to become a row: a rating, a date, the text, a language, an identifier you can deduplicate on. Pages show these for people, not programs. Ratings may be drawn as icons, dates may be written for reading rather than sorting, and long text may be cut short until expanded. Every one of those needs its own parsing rule, and the rules depend on markup that the site can change whenever it ships a new layout. ### Keeping it running The ongoing cost is upkeep. Layouts change, so selectors stop matching and fields come back empty. Any large site has to separate people from automated traffic, so a scraper that runs daily at volume should expect slow responses, challenge pages and blocks. When that happens, stop and reconsider: getting around a site's protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. Read the site's terms before you collect anything at scale. [Google Maps Scraper or Places Data API](https://perceptlayer.com/blog/google-maps-scraper-vs-api) covers scraping the wider Maps data; this post stays on reviews. ## What does the reviews endpoint return? The reviews endpoint returns one page of a business's reviews as JSON, with each review's fields already named. You pass the business's `business_id` and get back `items[]` and a `nextPage` token. There's no browser, no selector and no date parsing: your code reads named fields, not page markup. Each successful call costs 1 credit; a failed one costs nothing. This is the recorded request: ```bash curl "https://api.perceptlayer.com/v1/google-maps/reviews?business_id=0x60188b88b7d8f7ab%3A0x2133080e9923eaac" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to two reviews, with reviewer names, photos and profile links left out: ```json { "items": [ { "review_source": "Google", "review_id": "Ci9DQUlRQUNvZENodHljRjlvT25kVUxXTmpaamhNWjFac016WTVSMjlqUVRCb1VYYxAB", "rating": 5, "timestamp": 1779471094452, … "review_text": [ "A must do! Easy access via Yamanote line > Shibuya > exit Hachiko exit and walk to the 41 or 42 bus (suica card OK) then four stops to Sugekari Elem Sch > once …" ], "review_language": [ "en" ], … "is_google_review": true }, { "review_source": "Google", "review_id": "Ci9DQUlRQUNvZENodHljRjlvT2tveFgyNWpZMVo1UTFsdldsWnlYM05CVVVoS2VHYxAB", "rating": 5, "timestamp": 1780515949145, … "review_text": [ "My visit to Starbucks Reserve Tokyo was one of the highlights of my trip to Japan. The building itself is stunning, with a unique design, spacious interior, and…" ], … } ], "nextPage": "CjEIARIpCgoAP7_LADY2____EhBrFsVuDgXaYeq0lg4AAAAAGgn92PQCY8g0lvwYACIA" } ``` | Field | Type in the recording | What you do with it | | --- | --- | --- | | `review_id` | string | Primary key; deduplicate on it | | `rating` | number | Store; average and trend per business | | `timestamp` | 13-digit number | Read as milliseconds since the Unix epoch, the two recorded values are 22 May and 3 June 2026 | | `review_text` | array of strings | Join and store for search or sentiment work | | `review_language` | array of strings | Route text to the right language model or filter | | `review_source`, `is_google_review` | string, boolean | Keep if you mix sources | | `nextPage` | string | Token for the next page | The response also carries reviewer fields and image links. You don't need them to track a business's reviews, and reviewer names and profile links are personal data, so drop them before you store anything. ### Which parameters does it take? The reviews endpoint has one required parameter and seven optional ones. The API documents their types and allowed values, not their defaults, so the table lists only what's documented. Test `sort` and `limit` in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps) before you fix them in a job. | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `business_id` | string | yes | None beyond the type | | `page` | string | no | Up to 4096 characters | | `pages` | integer | no | None beyond the type | | `search` | string | no | Up to 100 characters | | `sort` | integer | no | One of 1, 2, 3, 4 | | `limit` | integer | no | None beyond the type | | `hl` | string | no | None beyond the type | | `gl` | string | no | None beyond the type | `page` is a string of up to 4096 characters, which fits a token like the recorded `nextPage`. Check in the playground that passing one returns the next page before you write a loop that relies on it. ### Where do the business\_id and single reviews come from? `GET /v1/google-maps/simple-search` takes a `query`, and each item in its recorded response carries a `business_id`, the same name the reviews endpoint takes. For one business you already know, [Business Details](https://perceptlayer.com/apis/google-maps/business-details) also takes a `business_id`. To fetch one review again, `GET /v1/google-maps/review` takes `review_id` and `business_id`, the names that appear in the reviews response. Each is 1 credit per successful call. ## How do a scraper and the reviews endpoint compare? A scraper costs engineering time and has no per-call bill; the endpoint costs credits and has almost no code to maintain. The table sets them side by side for the job most people build a reviews scraper for: collecting and refreshing reviews for a list of businesses. | | DIY reviews scraper | `GET /v1/google-maps/reviews` | | --- | --- | --- | | Setup | Browser automation or request reverse-engineering, parsers, storage | API key in the `X-API-Key` header | | Fields | Whatever your parser extracts | `review_id`, `rating`, `timestamp`, `review_text`, `review_language`, `review_source`, `is_google_review` | | Dates | Parsed from page text | `timestamp` as a number | | Paging | Your own scroll or request logic | `nextPage` token in the response, `page` parameter on the request | | Filters | Whatever the page offers | `search`, `sort`, `limit`, `hl`, `gl` | | When the layout changes | Selectors break; fields come back empty | Your code reads JSON fields, not markup | | Throughput | Limited by browsers you run and blocks you hit | 1 request a second free; at least 5 a second paid | | Cost | Hosting, proxies if you use them, your time | 1 credit per successful call; failed calls cost 0 | | Failure signal | Often silent: fewer rows than yesterday | HTTP status and a JSON error `code` | ### What does tracking reviews cost per business? Cost follows calls, so the unit to plan with is calls per business per check. A daily check that reads the first page of each business is one call per business per day. A full backfill reads every page once, so it costs as many credits as the business has pages of reviews; run one in the playground to see how many reviews a page holds for your businesses. | Plan | Arithmetic | Credits a month | | --- | --- | --- | | 30 businesses, first page daily | 30 × 30 days × 1 credit | 900 | | 200 businesses, first page daily | 200 × 30 days × 1 credit | 6,000 | | 200 businesses, first two pages daily | 200 × 2 × 30 days × 1 credit | 12,000 | | 1,000 businesses, first page weekly | 1,000 × 4 weeks × 1 credit | 4,000 | The 100 free credits you get after verifying an email address cover the first three days of the first plan. The first, second and fourth plans fit the Starter pack's 10,000 credits; the third fits the Build pack's 50,000. Per business tracked daily, that's 30 credits a month. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. ### How does a daily check store only new reviews? The check reads the first page for each business and inserts reviews it hasn't seen, keyed on `review_id`. This script uses Python's `sqlite3` and reads only fields from the recorded response. It waits on 429 and 503 using the `Retry-After` header. ```python import os import sqlite3 import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/google-maps/reviews" BUSINESSES = ["0x60188b88b7d8f7ab:0x2133080e9923eaac"] db = sqlite3.connect("reviews.db") db.execute("""CREATE TABLE IF NOT EXISTS reviews ( review_id TEXT PRIMARY KEY, business_id TEXT, rating REAL, ts INTEGER, language TEXT, text TEXT)""") def fetch(business_id, attempts=3): for _ in range(attempts): r = requests.get(URL, params={"business_id": business_id}, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json() raise RuntimeError(f"gave up on {business_id}") for business_id in BUSINESSES: data = fetch(business_id) new = 0 for item in data.get("items", []): cur = db.execute( "INSERT OR IGNORE INTO reviews VALUES (?, ?, ?, ?, ?, ?)", (item.get("review_id"), business_id, item.get("rating"), item.get("timestamp"), ",".join(item.get("review_language", [])), " ".join(item.get("review_text", []))), ) new += cur.rowcount db.commit() print(business_id, "new reviews:", new) time.sleep(1) ``` No reviewer field is stored. The one-second pause keeps a free account within 1 request a second. If a business gets more new reviews a day than one page holds, raise the check to two pages or run it more often. Requests have no idempotency key, so a client timeout can hide a call that succeeded and was billed; keep the timeout generous. The [errors docs](https://docs.perceptlayer.com/errors) list every error code. ## Which should you choose? Choose by how often you need the reviews and how many businesses you track, because those two numbers decide whether upkeep or credits dominate. The verdicts below assume you need the data more than once. - **Reputation monitoring for a set of locations** (an agency, a chain, a franchise): use the reviews endpoint with a daily or weekly check per `business_id`. Store `review_id`, `rating`, `timestamp` and `review_text`, and alert on new low ratings. - **A research or sentiment dataset** (thousands of businesses, one pass): use the endpoint for the backfill. Cost is one credit per page, and `review_language` lets you split text by language before analysis. - **An AI agent that answers questions about a place**: give it the endpoints through MCP. `search_endpoints` and `get_endpoint` are free, and `call_endpoint` spends credits only on success; the [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. - **A handful of businesses, checked by hand now and then**: read the reviews in a browser. Neither a scraper nor an API is worth setting up. - **Learning how scraping works**: build a scraper against a practice site, and read the target site's terms before pointing it anywhere real. - **Reviews from other platforms**: the same comparison applies; [Yelp Scraper or API](https://perceptlayer.com/blog/yelp-scraper-vs-api) and [Trustpilot Scraper or API](https://perceptlayer.com/blog/trustpilot-scraper-vs-api) cover those. To see the fields for your own businesses, run `simple-search` with your query in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps), then `reviews` with a `business_id` from the result. When the output fits, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### How much does a Google reviews call cost? Each successful call to `GET /v1/google-maps/reviews` costs 1 credit and returns one page of reviews for one business. A failed call costs nothing and returns `X-Credits-Used: 0`. Checking 200 businesses daily is 200 × 30 = 6,000 credits a month. Every account gets 100 free credits after verifying an email address; the pricing page lists what packs cost. ### Can I get all reviews for a business, not just the first page? The response ends with a `nextPage` token, and the endpoint takes a `page` string of up to 4096 characters and a `pages` integer. Test in the playground how these return later pages for your business before you build a loop. Each page you fetch is one more call at 1 credit, so a full backfill costs one credit per page of reviews. ### Should I store reviewer names? No. The reviews response includes reviewer names, photos and profile links, but tracking a business's reputation needs only the review content: `review_id`, `rating`, `timestamp`, `review_text` and `review_language`. Reviewer names and profile links are personal data, so drop them before storage and don't use reviews to contact the people who wrote them. ### What is the timestamp field in a review? In the recorded response, `timestamp` is a 13-digit number such as `1779471094452`. Read as milliseconds since the Unix epoch, that's 22 May 2026, and the other recorded value is 3 June 2026. Divide by 1000 to get seconds for most date libraries. Check a few against reviews you can see on the page before relying on the conversion. ### What happens when a reviews request fails? You get an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, and no credits are spent. A `rate_limited` (429) or `temporarily_unavailable` (503) response carries a `Retry-After` header with the seconds to wait. `invalid_parameters` (422) points at your parameters, such as a malformed `business_id`, and `source_error` (502) is worth retrying later. google reviews scraping review monitoring google maps sentiment data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 29 Oct 2026 Perceptlayer 8 min read ## [Google Play Scraper or API: Reviews and App Data](https://perceptlayer.com/blog/google-play-scraper-vs-api) A Google Play scraper vs one 1-credit call: the recorded Spotify reviews response with rating, likes, iso\_date, a star histogram and a page token. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Google Maps Scraper or Places Data API: What You Get](https://perceptlayer.com/blog/google-maps-scraper-vs-api) Compare building a Google Maps scraper with the official Places API and place endpoints at 1 credit a call: fields, upkeep, terms and a verdict per use case. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "LinkedIn Scraper or API: What You Can Get | Perceptlayer" description: "Compare a DIY LinkedIn scraper with company, job and public post endpoints at 1 credit a call: setup, upkeep, terms and a verdict per use case." url: https://perceptlayer.com/blog/linkedin-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # LinkedIn Scraper or API: What You Can Get 1 Nov 2026 Perceptlayer 8 min read A LinkedIn scraper is a program that loads LinkedIn pages in a browser and reads company details, job postings or posts off the screen. It breaks when the page changes, and if it runs inside a logged-in session it acts under an account and that account's terms. The other route is a set of LinkedIn endpoints that return company pages, jobs and public posts as JSON at 1 credit per successful call, under restricted-endpoint terms. This post compares the two and gives a verdict per use case, for company and job data, not people. ## Key takeaways - A DIY LinkedIn scraper needs a headless browser and parsing code, and a scraper that runs logged in ties your data collection to one account. - `GET /v1/linkedin/company` takes a company `url` or `company_id`, and `GET /v1/linkedin/company-posts` takes a company `slug`; each costs 1 credit per successful call. - `GET /v1/linkedin/jobs-search` takes a `query`, and `GET /v1/linkedin/job` takes a job posting's `url`, so you can follow hiring by company or role. - The LinkedIn endpoints are restricted: they work after you accept the restricted-endpoint terms, which don't permit processing personal data without a lawful basis or using it to contact people without consent where consent is required. - Tracking 100 companies' pages and posts weekly is 100 × 2 × 4 = 800 credits a month, so the Starter pack's 10,000 covers a year of it. ## What does building a LinkedIn scraper involve? A LinkedIn scraper is browser automation, not a single HTTP request. You need a headless browser such as Playwright or Selenium, a script that opens each company page, job or post, waits for it to render and reads the text into fields, and a store for the results. Every one of those steps is code you own, and every change to the page's markup is a change you make in your parser. The first decision is whether the scraper runs logged out or logged in. Logged out, it sees only what a visitor without an account sees, which may not include the fields you want. Logged in, it runs inside a session tied to an account, so every page it loads is a page that account loaded. That puts your data pipeline and the account in the same basket: if the account is restricted, the pipeline stops, and the use you made of it sits under the agreement the account holder accepted. Then there's volume. A browser per job takes memory and time, so a scraper that tracks hundreds of companies a week needs scheduling, retries and monitoring before it's reliable. Large sites also limit automated traffic. If your scraper starts seeing blocks or challenge pages, stop: rotating proxies or solving challenges to get past a site's protections isn't something we'd recommend. Read LinkedIn's own User Agreement before you automate anything against the site, and get legal advice for commercial use. Whether a scraper is permitted is a question for those terms and the law where you operate, not for this post. ## What do the LinkedIn endpoints return? The LinkedIn API has 11 endpoints, all `GET`, each costing 1 credit per successful call. For company and job data, the ones that matter are company pages, company posts, job search, single jobs, public post search, single posts, post transcripts, and the ads search and ad detail pair. Each returns JSON with named fields; there's no recorded sample for this API yet, so run a call in the playground on the [LinkedIn API page](https://perceptlayer.com/apis/linkedin) to see the exact fields before you build on them. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | [`/v1/linkedin/company`](https://perceptlayer.com/apis/linkedin/company) | Company | none | `url`, `company_id`, `use_cache`, `maximum_cache_age` | | [`/v1/linkedin/company-posts`](https://perceptlayer.com/apis/linkedin/company-posts) | Company posts | `slug` | none | | [`/v1/linkedin/jobs-search`](https://perceptlayer.com/apis/linkedin/jobs-search) | Jobs search | `query` | `num`, `start`, `page`, `hl`, `gl`, `dateRestrict`, `sort` and more | | [`/v1/linkedin/job`](https://perceptlayer.com/apis/linkedin/job) | Job | `url` | `use_cache`, `maximum_cache_age` | | `/v1/linkedin/posts-search` | Posts search | `query` | `num`, `start`, `page`, `hl`, `gl`, `dateRestrict`, `sort` and more | | [`/v1/linkedin/post`](https://perceptlayer.com/apis/linkedin/post) | Post | `url` | `use_cache`, `maximum_cache_age` | | [`/v1/linkedin/post-transcript`](https://perceptlayer.com/apis/linkedin/post-transcript) | Post transcript | none | `url`, `activity_id` | | [`/v1/linkedin/ads-search`](https://perceptlayer.com/apis/linkedin/ads-search) | Ads search | `keyword` | `countries[]`, `dateOption`, `startdate`, `enddate`, `accountOwner`, `pagination_token` | | [`/v1/linkedin/ads-detail`](https://perceptlayer.com/apis/linkedin/ads-detail) | Ads detail | `ad_id` | none | A company lookup is one request with the company page's URL: ```bash curl "https://api.perceptlayer.com/v1/linkedin/company?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fmicrosoft%2F" \ -H "X-API-Key: $API_KEY" ``` A job search takes a `query`, and `sort` accepts `date`, `date:r` or `date:d`: ```bash curl "https://api.perceptlayer.com/v1/linkedin/jobs-search?query=data+engineer+berlin&sort=date" \ -H "X-API-Key: $API_KEY" ``` Ad research works the same way, with a `keyword` and an optional `dateOption` of `last-30-days` or `custom-date-range`: ```bash curl "https://api.perceptlayer.com/v1/linkedin/ads-search?keyword=analytics+platform" \ -H "X-API-Key: $API_KEY" ``` Several endpoints take a `use_cache` boolean and a `maximum_cache_age` integer. The API documents their types and nothing more, so test how they behave in the playground before you rely on them for freshness. ## Which terms apply to the LinkedIn endpoints? The LinkedIn endpoints are restricted endpoints, because they return social media content. They work only after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard. The error codes include `restricted_endpoint` (403) for these endpoints. The terms add to the main terms of service and set out what you confirm when you use social or personal data. In short, you confirm that you have a lawful basis for processing any personal data you receive and collect only what you need for that purpose. You confirm you won't use the data to identify, track or contact individuals without their consent where consent is required. You keep personal data only as long as you need it, keep it secure and act on access, correction, deletion and objection requests. And you respect content creators' rights and the platform terms that legally apply to you. That's why this post is about companies, jobs and public posts in aggregate. Lead lists of people, outreach sequences and profile enrichment are out of scope here, and the restricted-endpoint terms don't support them. Data is collected from publicly available sources and returned as found at the time of the call; that something is public doesn't by itself give you the right to reuse it. ## How do a scraper and the endpoints compare? A scraper gives you control over exactly which page elements you read and no per-call bill, at the cost of browser upkeep, account risk and terms you have to interpret yourself. The endpoints give you JSON with named fields and no browser, at 1 credit per successful call and under restricted-endpoint terms. Neither route makes personal data fair game. | | DIY scraper, logged out | DIY scraper, logged in | LinkedIn endpoints | | --- | --- | --- | --- | | Setup | Headless browser, parsers | Headless browser, parsers, an account session | API key in the `X-API-Key` header; accept restricted-endpoint terms | | What you get | What a logged-out visitor sees | What the account sees | Company, company posts, jobs, public posts, transcripts, ads as JSON | | Maintenance | High: selectors and flows break | High, plus session handling | Low: no browser or parser to maintain | | Account risk | None tied to an account | Collection depends on one account | None tied to a LinkedIn account | | Speed | One browser per job | One browser per job | 1 request a second free, at least 5 a second paid | | Errors | Whatever the page shows | Whatever the page shows | HTTP status and a JSON `code`, `message`, `request_id` | | Cost | Your hosting and time | Your hosting, time and the account | 1 credit per successful call; failed calls cost 0 | ### What does tracking 100 companies cost? On the endpoints, cost follows calls. Tracking 100 competitor companies weekly, with one `company` call and one `company-posts` call each, is 100 × 2 × 4 weeks × 1 credit = 800 credits a month. The 100 free credits you get after verifying an email address cover a first weekly run for 50 companies; the Starter pack's 10,000 covers all 100 for a year. Add hiring signals: 20 `jobs-search` queries a day is 20 × 30 × 1 credit = 600 credits a month, and fetching 50 job postings a week with `job` is 50 × 4 × 1 credit = 200 credits. The three together come to 1,600 credits, inside the Starter pack's 10,000. Failed calls return `X-Credits-Used: 0`, so retries after a 429 or 503 only cost the call that succeeds. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ## Which route should you choose? Choose by what you'll collect and why, because that decides which terms apply and what the job costs to run. The verdicts below assume a recurring job about companies, roles or topics; for a one-off look at five company pages, open them in a browser. - **Competitor monitoring** (what rivals post and how their company pages change): use `company` and `company-posts` on a weekly schedule. Store the company-level fields you need. - **Hiring trends by company, role or city**: use `jobs-search` with your queries and `job` for the postings you keep. Count postings by role and location; you don't need the people behind them. The [API guides](https://perceptlayer.com/blog/category/api-guides) cover other job and company sources. - **What's being said about a topic**: use `posts-search` and `post`, and analyse posts in aggregate: volume, themes, which companies post. Leave authors' names and profile links out of what you store. - **Video posts you want as text**: use `post-transcript` with a post `url` or `activity_id`. - **Ad research**: use `ads-search` with a `keyword` and filters such as `countries[]` and a date range, then `ads-detail` with an `ad_id`. - **Lead generation or outreach to individuals**: neither route. The restricted-endpoint terms don't support it, and a scraper doesn't make it permitted. - **Learning how scraping works**: build a scraper against a practice site, not LinkedIn. If LinkedIn offers an official integration that covers your use case, such as managing your own company page, read its terms and use it: data you're granted directly is the clearer path. For the same scraper-or-endpoint question on another site, see [Google Maps Scraper or Places Data API](https://perceptlayer.com/blog/google-maps-scraper-vs-api). To compare before you decide, accept the restricted-endpoint terms in your dashboard, then run `company` with a company page URL in the playground on the [LinkedIn API page](https://perceptlayer.com/apis/linkedin). When the fields fit, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [LinkedIn **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/linkedin) ## Frequently asked questions ### Is scraping LinkedIn legal? It depends on where you operate, what you collect and how you use it, so read LinkedIn's own User Agreement before you automate anything against the site. Company and job information is lower risk than personal data; profiles and names are personal data in many jurisdictions. Get legal advice for commercial use, and don't get around blocks or challenges. ### Can I get LinkedIn company data without a scraper? Yes. `GET /v1/linkedin/company` takes a company page `url` or a `company_id` and returns the company's data as JSON, and `GET /v1/linkedin/company-posts` takes a company `slug` and returns its posts. Each successful call costs 1 credit. Both are restricted endpoints, so accept the restricted-endpoint terms in your dashboard first. ### Why does a LinkedIn call return a 403? The LinkedIn endpoints are restricted, and the error codes include `restricted_endpoint` (403). Accept the restricted-endpoint terms in your dashboard and the call works with the same key. Like every error, the response has an HTTP status and a JSON body with `code`, `message` and `request_id`, and it costs nothing. The errors docs list every code. ### Can I use LinkedIn data for lead generation? Not through these endpoints. The restricted-endpoint terms require a lawful basis for any personal data you process and rule out using it to identify, track or contact individuals without consent where consent is required. Use the LinkedIn endpoints for company pages, job postings, public posts in aggregate and ads, and keep people's names and profile links out of what you store. ### Can an AI agent read LinkedIn company pages? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the LinkedIn endpoints with `search_endpoints`, reads their parameters with `get_endpoint` (both free) and runs them with `call_endpoint`, which spends credits only on success and reports the credits used and remaining. The restricted-endpoint terms still apply to what the agent collects. linkedin scraping company data job postings restricted endpoints ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Indeed Scraper or API: Postings, Companies, Salaries](https://perceptlayer.com/blog/indeed-scraper-vs-api) An Indeed scraper parses five kinds of page; 9 Indeed endpoints return them as JSON at 1 credit a call. A recorded Berlin search is 0.05 credits a posting. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. --- title: "Extract Data From a Website: Pages, Sites and APIs" description: "Three ways to extract data from a website: one page as markdown or JSON, every URL on a site with map, or structured records. 1 credit per call." url: https://perceptlayer.com/blog/extract-data-from-website --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Extract Data From a Website: Pages, Sites and APIs 31 Oct 2026 Updated 10 Nov 2026 Perceptlayer 8 min read To extract data from a website, pick the route by what you need back. For one page, call `GET /v1/web-scraper/scrape` with the `url` and `response_type` set to `markdown` or `json`. For the URLs of a whole site, call `GET /v1/web-scraper/map` first, then scrape the pages you keep. For a site with its own endpoints, such as Google Maps, call those and get named fields instead of page text. Every successful call costs 1 credit; failed calls cost nothing. ## Key takeaways - `GET /v1/web-scraper/scrape` takes a required `url` (up to 2048 characters) and optional `response_type` ( `json` or `markdown`), `javascript` and `include_html`, for 1 credit per successful call. - `GET /v1/web-scraper/map` takes a `url` plus optional `limit`, `search` (up to 200 characters) and `include_subdomains`, so a whole site costs 1 credit to map and 1 credit per page you then scrape. - A site with dedicated endpoints skips parsing: the recorded `GET /v1/google-maps/reviews` response returns `items[]` with `rating`, `timestamp`, `review_text` and `review_language`, plus a `nextPage` token. - Mapping a site and scraping 500 of its pages is 1 + 500 = 501 credits, inside the Starter pack's 10,000. The 100 free credits you get after verifying an email address cover a map and 99 pages. ## Which route fits the data you want? The right route depends on the shape of the answer you need, not on the site. If you want the text of one page, for a model or a search index, scrape that page. If you want to know what pages a site has before you decide what to read, map it. If the site is one where you want records, such as places, reviews or listings, check whether it has dedicated endpoints, because named JSON fields save you writing and maintaining a parser. | You need | Endpoint | Required parameters | Cost per successful call | | --- | --- | --- | --- | | One page as markdown or JSON | `GET /v1/web-scraper/scrape` | `url` | 1 credit | | The URLs of a site | `GET /v1/web-scraper/map` | `url` | 1 credit | | Places on Google Maps | `GET /v1/google-maps/simple-search` | `query` | 1 credit | | Reviews of one place | `GET /v1/google-maps/reviews` | `business_id` | 1 credit | The catalogue covers 480 websites through 2,782 endpoints, all returning JSON, so it's worth a look on the [all APIs page](https://perceptlayer.com/apis) before you build anything generic. When the site you need isn't there, the two Web Scraper endpoints work on any URL you can pass in. ## How do you extract one page as markdown or JSON? Send the page's address, URL-encoded, in `url` to the scrape endpoint and choose the output with `response_type`. Markdown suits text you'll read or feed to a model, since it keeps headings, lists and links. JSON suits code that processes the result. The call fetches and converts in one request, so you don't run an HTML parser yourself. ```bash curl "https://api.perceptlayer.com/v1/web-scraper/scrape?url=https%3A%2F%2Fexample.com&response_type=markdown" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `url` | string | yes | Up to 2048 characters | | `response_type` | string | no | One of `json`, `markdown` | | `javascript` | boolean | no | No further detail documented | | `include_html` | boolean | no | No further detail documented | We haven't recorded a response from this endpoint, so this post doesn't show one. Run the request in the playground on the [Scrape endpoint page](https://perceptlayer.com/apis/web-scraper/scrape) with a URL you care about and look at the output for both `response_type` values before you write code that reads it. The parameter names suggest what `javascript` and `include_html` switch on; the playground shows what they change for your page. Keys start with `sk_live_` and go in the `X-API-Key` header, or in the `api_key` query parameter where you can't set headers. For what to strip from page text before it reaches a model, see [Website to Markdown: Clean Page Text for LLMs](https://perceptlayer.com/blog/website-to-markdown-for-llms); this post doesn't repeat it. ## How do you find every URL on a site? Call the map endpoint with the site's address to get the site's URLs in one call, which gives you the list you scrape from. Three optional parameters shape that list. Their names suggest what they do: `search` (up to 200 characters) for a term the URLs should match, `limit` for how many come back, and `include_subdomains` for whether hosts such as `docs.example.com` count. The API documents only their types, so confirm the effect of each in the playground. ```bash curl "https://api.perceptlayer.com/v1/web-scraper/map?url=https%3A%2F%2Fexample.com&search=docs&limit=100" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `url` | string | yes | Up to 2048 characters | | `limit` | integer | no | No further constraint documented | | `search` | string | no | Up to 200 characters | | `include_subdomains` | boolean | no | No further constraint documented | There's no recorded map response either, so check the output in the playground on the [Map endpoint page](https://perceptlayer.com/apis/web-scraper/map) before you parse it. Mapping first has a cost benefit: for one credit you see the URL list, so you can decide how many pages to scrape before you spend anything on them. ### How do you scrape the pages you kept? Once you have the URLs you want, one per line in a text file, the loop is short. This script reads `urls.txt`, scrapes each page as markdown, and writes the response body to a file. It reads no fields from the response, because the response shape isn't recorded here; it saves what comes back so you can inspect it. It waits on 429 and 503 using `Retry-After`. ```python import os import pathlib import time import requests API_KEY = os.environ["API_KEY"] SCRAPE = "https://api.perceptlayer.com/v1/web-scraper/scrape" out = pathlib.Path("pages") out.mkdir(exist_ok=True) urls = [u.strip() for u in open("urls.txt") if u.strip()] for i, url in enumerate(urls): for attempt in range(3): r = requests.get( SCRAPE, params={"url": url, "response_type": "markdown"}, headers={"X-API-Key": API_KEY}, timeout=90, ) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue break if r.ok: (out / f"{i:05d}.txt").write_text(r.text) print(url, "credits used:", r.headers.get("X-Credits-Used")) else: print(url, "failed:", r.status_code, r.text[:200]) time.sleep(1) ``` The one-second pause keeps a free account within its 1 request a second. Paying accounts run at least 5 requests a second, so you can shorten it. [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) covers the do-it-yourself version of this loop, for when you'd rather fetch pages from your own machine. ## When should you use a site's dedicated endpoints instead? Use dedicated endpoints when you want records with the same fields every time, not page text. A scraped page gives you whatever the page says, in the order it says it, and you still have to find the rating or the date inside it. A dedicated endpoint returns those values as named JSON fields. Google Maps is a good example: it has 11 endpoints, including search, business details, photos and reviews, each 1 credit per call. The usual path is a search, then a lookup for each place you keep. `simple-search` takes a `query` and its recorded items each carry a `business_id`, and the reviews endpoint takes a parameter with the same name. This is the recorded reviews request: ```bash curl "https://api.perceptlayer.com/v1/google-maps/reviews?business_id=0x60188b88b7d8f7ab%3A0x2133080e9923eaac" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed, with reviewer names and profile links left out: ```json { "items": [ { "review_source": "Google", "review_id": "Ci9DQUlRQUNvZENodHljRjlvT25kVUxXTmpaamhNWjFac016WTVSMjlqUVRCb1VYYxAB", "rating": 5, "timestamp": 1779471094452, … "review_text": [ "A must do! Easy access via Yamanote line > Shibuya > exit Hachiko exit and walk to the 41 or 42 bus (suica card OK) then four stops to Sugekari Elem Sch > once …" ], "review_language": [ "en" ], … "is_google_review": true }, … ], "nextPage": "CjEIARIpCgoAP7_LADY2____EhBrFsVuDgXaYeq0lg4AAAAAGgn92PQCY8g0lvwYACIA" } ``` Compare that with scraping the same reviews from a page: no selectors, no guessing which line is the date, and `review_text` and `review_language` come back as arrays. The reviews endpoint also takes `sort` (one of 1, 2, 3 or 4), `search` (up to 100 characters), `limit`, `pages` and a string `page` parameter; see the [Google Maps API page](https://perceptlayer.com/apis/google-maps) for all 11 endpoints. [Google Maps Scraper or Places Data API](https://perceptlayer.com/blog/google-maps-scraper-vs-api) compares this route with building a scraper. ### How do you turn reviews into rows? This script reads only fields that appear in the recorded response and writes one CSV row per review. The 13-digit `timestamp` values in the recording convert to May and June 2026 when read as milliseconds since the Unix epoch, which is how the script treats them. ```python import csv import datetime import os import requests r = requests.get( "https://api.perceptlayer.com/v1/google-maps/reviews", params={"business_id": "0x60188b88b7d8f7ab:0x2133080e9923eaac"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60, ) r.raise_for_status() data = r.json() with open("reviews.csv", "w", newline="") as f: w = csv.writer(f) w.writerow(["review_id", "rating", "date", "language", "text"]) for item in data.get("items", []): ts = item.get("timestamp") date = datetime.datetime.fromtimestamp(ts / 1000, datetime.timezone.utc).date() if ts else "" w.writerow([ item.get("review_id"), item.get("rating"), date, ",".join(item.get("review_language", [])), " ".join(item.get("review_text", [])), ]) print("nextPage:", data.get("nextPage")) ``` The script prints `nextPage` rather than following it. The endpoint's `page` parameter is a string of up to 4096 characters, which fits a token like this one; test in the playground that passing it returns the next page before you loop on it. [API Pagination: Cursors, Pages and Offsets](https://perceptlayer.com/blog/api-pagination-patterns) covers cursor loops in general. ## What does extracting data from a website cost? Cost follows calls, not bytes: each successful call costs 1 credit, whether a page converts to a short paragraph or a long document. A failed call costs nothing and returns `X-Credits-Used: 0`, and every successful response reports `X-Credits-Used` and `X-Credits-Remaining`, so a job can log its own spend. | Job | Arithmetic | Credits | | --- | --- | --- | | Read 30 pages a day for a month | 30 × 30 days × 1 credit | 900 | | Map a site, scrape 500 pages | 1 + 500 × 1 credit | 501 | | Map a docs site, scrape 20,000 pages | 1 + 20,000 × 1 credit | 20,001 | | A weekly search plus reviews for 300 places | (300 + 1) × 4 weeks × 1 credit | 1,204 | The 100 free credits on signup cover a test run: a map and 99 pages, or the first three days of the reading job. The first two jobs and the reviews job each fit the Starter pack's 10,000 credits, and the docs crawl fits the Build pack's 50,000. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. ### What should a job do when a call fails? Every error returns an HTTP status and a JSON body with `code`, `message` and `request_id`. A `rate_limited` (429) or `temporarily_unavailable` (503) response carries `Retry-After` with the seconds to wait. Treat `invalid_parameters` (422) as a bug in your input, often a `url` that's malformed or too long, and `source_error` (502) as a page to retry later. Requests have no idempotency key, so a client timeout can hide a call that succeeded and was billed; keep timeouts generous. The [errors docs](https://docs.perceptlayer.com/errors) list every code. Before any of this runs at volume, read the terms of the site you're extracting from and pace your requests. Then start small: run `map` on the site you need in the playground on the [Web Scraper API page](https://perceptlayer.com/apis/web-scraper), scrape two of its pages, and [get a free API key](https://perceptlayer.com/signup) when the output fits. ## APIs in this post - [Web Scraper **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/web-scraper) - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### How much does it cost to extract data from a website? Each successful call costs 1 credit: one page scraped, one site mapped, or one page of reviews. Failed calls cost nothing and return `X-Credits-Used: 0`. Mapping a site and scraping 500 of its pages is 501 credits. Every account gets 100 free credits after verifying an email address, with no credit card. The pricing page lists what packs cost. ### Can I extract data from a whole website at once? Not in one call. Map the site with `GET /v1/web-scraper/map` to get its URLs, check the list and keep the URLs you need, then scrape each page with `GET /v1/web-scraper/scrape`. That's 1 credit for the map and 1 per page. Pace the loop to your account's request rate and read the site's terms first. ### Should I get a page as markdown or JSON? Choose markdown when a person or a language model will read the text, because it keeps headings, lists and links. Choose JSON when code will process the result. Both come from the same `GET /v1/web-scraper/scrape` call through `response_type`, at the same 1 credit, so run both in the playground on a page you care about and compare. ### Why use dedicated endpoints instead of scraping the page? Dedicated endpoints return named fields, so you don't write or maintain a parser. The recorded Google Maps reviews response, for example, has `rating`, `timestamp`, `review_text` and `review_language` per review, plus a `nextPage` token. A scraped page gives you the same information as text that your code has to find again every time the page layout changes. ### How fast can I extract pages? Request rates are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second, 60 a minute; paying accounts run at least 5 a second, 300 a minute, depending on the pack. Responses carry `RateLimit-Remaining` and `RateLimit-Reset`, and a 429 carries `Retry-After`. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the details. web scraping data extraction markdown sitemaps google maps ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 18 Oct 2026 Perceptlayer 6 min read ## [Web Scraping in JavaScript with Node.js](https://perceptlayer.com/blog/web-scraping-javascript-node) Web scraping in JavaScript with Node 22: fetch and cheerio for static pages, Playwright when a page renders in the browser, or one API call at 1 credit a page. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 18 Oct 2026 Perceptlayer 7 min read ## [Web Scraping with Python: Requests, Parsing and When to Stop](https://perceptlayer.com/blog/web-scraping-python-guide) A web scraping Python tutorial: requests and BeautifulSoup for a practice site, robots.txt checks, a 2-second delay, CSV output, and when an API costs less. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 8 Aug 2026 Updated 10 Nov 2026 Perceptlayer 11 min read ## [Scraper or API: What Maintaining a Scraper Really Involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost) What a scraper costs to keep running: selector fixes, proxies, retries and monitoring, set against an API at 1 credit per successful call. --- title: "Google Scholar Scraper or API: What You Get | Perceptlayer" description: "A Google Scholar scraper vs search endpoints at 1 credit a call: a recorded machine learning search with cited_by.total, and the cost per paper tracked." url: https://perceptlayer.com/blog/google-scholar-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Scholar Scraper or API: What You Get 31 Oct 2026 Perceptlayer 8 min read A Google Scholar scraper is a program that loads Scholar result pages and pulls each paper's title, link, publication line and "cited by" count out of the HTML. You write and maintain the fetching, the parsing and the checks that tell you when either breaks. The alternative is a set of Google Scholar endpoints that return the same result data as named JSON fields at 1 credit a call. This post compares the two on a recorded "machine learning" search limited to 2020 onwards, works out the cost per paper tracked, and gives a verdict per use case. ## Key takeaways - A Scholar scraper has three parts to maintain: a fetcher for result pages, a parser for each result block, and a monitor that notices empty or missing fields. - `GET /v1/google-scholar/search` takes `q`, `hl`, `start`, `num`, `as_ylo`, `as_yhi`, `scisbd`, `cites` and `cluster`, and returns `organic_results` with `title`, `result_id`, `link`, `snippet`, `publication_info.summary` and, where present, `inline_links.cited_by.total`. - The recorded search for `q=machine learning&num=10&as_ylo=2020` reported `total_results: 38300` and returned `pagination.next_start: 10` with `has_next: true`, for 1 credit. - At 10 results a call, a result costs 0.1 credits to fetch; checking 200 papers' citation counts once a week is 200 × 4 = 800 credits a month. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What does building a Google Scholar scraper involve? A Google Scholar scraper is a fetcher, a parser and a monitor, and each needs upkeep. The fetcher builds a result-page URL from a query, a year range and a page offset, and requests it. The parser splits the page into result blocks and reads the title, the link, the snippet, the line with authors, venue and year, any PDF links, and the "cited by" count with its link. The monitor compares each run with the last one, because a broken parser usually returns fewer fields rather than an error. Each part has its own failure modes, and they're the same ones any HTML scraper has. Page markup changes when a site ships changes, and a selector that found the citation count last month can return nothing today. A scraper that sends many requests in a short time from one address should expect slow replies or refused requests from most sites, so it needs pacing and backoff. When requests are refused, stop: getting around a site's protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. Then there's what you're allowed to do with the pages. Read Google Scholar's terms before you build a collector, and the terms of any publisher whose PDFs you download. For the general case of when a scraper is worth writing, [Scrape Google Search Results with Python](https://perceptlayer.com/blog/scrape-google-search-results-python) walks through a similar fetch-and-parse job on regular search pages. ## What do the Google Scholar endpoints return? The Google Scholar API on Perceptlayer has five `GET` endpoints, all 1 credit per successful call. Search does the work a scraper would: one call returns a page of results with each field already named. The other four take an author's `user` value or a `q` for the author, author-citation, co-author and cite lookups; only search has a recorded response in this post. | Endpoint | What it's for | Parameters | | --- | --- | --- | | [`GET /v1/google-scholar/search`](https://perceptlayer.com/apis/google-scholar/search) | Papers matching a query | `q`, `hl`, `start`, `num`, `as_ylo`, `as_yhi`, `scisbd`, `cites`, `cluster`, all optional | | [`GET /v1/google-scholar/author`](https://perceptlayer.com/apis/google-scholar/author) | An author profile | `user` required; `hl`, `num`, `start`, `sort` ( `title` or `pubdate`) | | [`GET /v1/google-scholar/author-citation`](https://perceptlayer.com/apis/google-scholar/author-citation) | An author's citation, by `citation_id` | `user` and `citation_id` required; `hl` | | [`GET /v1/google-scholar/author-co-authors`](https://perceptlayer.com/apis/google-scholar/author-co-authors) | An author's co-authors | `user` required; `hl` | | [`GET /v1/google-scholar/cite`](https://perceptlayer.com/apis/google-scholar/cite) | Cite lookup for a query | `q` required; `hl` | `as_ylo`, `as_yhi`, `start` and `num` are integers (the recorded call sets `as_ylo=2020`, and the two results shown are from 2022 and 2023), and `scisbd` accepts `0`, `1` or `2`. Nothing else about these parameters, such as defaults or maximum page size, is documented, so set every value you depend on. The [Google Scholar API page](https://perceptlayer.com/apis/google-scholar) has each endpoint's playground. ### A real search: machine learning since 2020 This request asks for 10 results for "machine learning" in English, from 2020 onwards: ```bash curl "https://api.perceptlayer.com/v1/google-scholar/search?q=machine+learning&hl=en&num=10&as_ylo=2020" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the fields a tracker keeps, with authors' names cut from the publication lines: ```json { "success": true, "data": { "search_parameters": { … "q": "machine learning", "hl": "en", "start": 0, "num": 10, "as_ylo": "2020", "scisbd": 0 }, "search_information": { "query_displayed": "machine learning", "total_results": 38300, … }, "organic_results": [ { "position": 1, "title": "Machine learning", "result_id": "WHD7vRZpYhIJ", "link": "https://api.taylorfrancis.com/content/chapters/edit/download?identifierName=doi&identifierValue=10.1201/9780429171529-36&type=chapterpdf", … "publication_info": { "summary": "… - Computing Handbook, 2022 - api.taylorfrancis.com", … }, "resources": [ { "file_format": "PDF" }, … ] }, { "position": 2, "title": "Machine learning", "result_id": "K_YKyl3arXoJ", "link": "https://pubs.acs.org/infocus/book-supplement/2643/pdf/if-2023-x00006_toc/", … "publication_info": { "summary": "… - 2023 - ACS Publications", … }, "inline_links": { "cited_by": { "total": 292, "link": "https://scholar.google.com/scholar?cites=8839961739954681387&as_sdt=2005&sciodt=0,5&hl=en", "cites_id": "8839961739954681387" }, … } } ], "pagination": { "current": 1, "start": 0, "num": 10, "next_start": 10, "has_next": true, … } }, … } ``` Four details matter for anyone replacing a scraper. Both results have the title "Machine learning", so `result_id` is what tells them apart; store it as the key. Not every result has `inline_links.cited_by`: the first has none, the second has `total: 292`, so treat it as optional. `publication_info.summary` is one string holding authors, venue, year and source, so a year still has to be read out of it, just as a scraper would. And the `as_ylo` value comes back as the string `"2020"`, though it was sent as an integer. ### Following pages and citations `pagination.next_start` is `10` and the endpoint takes a `start` parameter, so the names match; send the next request with `start=10` to get the following page. In the same way, `cited_by.cites_id` carries the same value as the `cites=` part of `cited_by.link`, and the search endpoint takes a `cites` parameter. The names match, so try a `cites` search with that value in the playground before you build on it. Each extra page or citing-papers search is another call at 1 credit. ## How do a scraper and the endpoints compare? A scraper costs engineering time and carries terms and blocking risk; the endpoints cost credits per call and take the parsing off your hands. Neither is free. The table compares them for a recurring job, such as checking a topic for new papers every week or tracking citation counts for a fixed list of papers. | | DIY Scholar scraper | Google Scholar endpoints | | --- | --- | --- | | Setup | Fetcher, HTML parser, storage, monitoring | API key in the `X-API-Key` header | | What you get | Whatever you can parse from each result block | `organic_results` with `title`, `result_id`, `link`, `snippet`, `publication_info`, optional `resources` and `inline_links.cited_by` | | When the markup changes | Your parser breaks and you fix it | You read named JSON fields; there's no parser of yours to fix | | Refused requests | Yours to handle with pacing and backoff | A failed call returns an error code and costs 0 | | Year filter | Build the URL yourself | `as_ylo` and `as_yhi` | | Paging | Follow page links | `start`, with `pagination.next_start` and `has_next` in the response | | Citation counts | Parse the "cited by" text | `inline_links.cited_by.total` as a number | | Speed | As fast as you can fetch without being refused | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | | Freshness | Whatever the page showed when you fetched it | Returned as found at the time of the call | ### What does a paper cost to track? On the endpoints, cost follows calls, not papers. The recorded search used `num=10` and returned a page of results, so a result costs 1 ÷ 10 = 0.1 credits to fetch when you read whole pages. Tracking a topic means fetching its first few pages on a schedule: the first 50 results weekly is 5 calls × 4 weeks = 20 credits a month per query. Tracking citation counts for specific papers is different, because you need each paper's own result. If you search for each one by its title and pick out its `result_id` from the results, that's 1 call per paper per check: 200 papers × 4 weekly checks × 1 credit = 800 credits a month. The 100 free credits on signup, granted once with a verified email, cover the first 100 checks; the Starter pack's 10,000 covers 12 months of weekly checks (12 × 800 = 9,600). Checking those 200 papers daily is 200 × 30 = 6,000 credits a month, inside the Starter pack's 10,000. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. A scraper has no per-call charge, but it isn't free either. Its cost is the hours spent fixing parsers and handling refused requests, and those hours land when the scraper breaks, not when you planned them. ## Which route should you choose? Choose by how often you need the data and how much of it, because that decides whether upkeep or per-call cost dominates. The verdicts below assume structured results are what you need; for reading a few papers once, use Google Scholar in a browser and skip both. - **A one-off literature search** of a few dozen queries: use the search endpoint and save the JSON. A few dozen credits is less than an afternoon writing a parser. - **Weekly topic monitoring** for new papers: run search with the `as_ylo` value you want, as the recorded call does with 2020, and store `result_id`, `title`, `link` and `publication_info.summary`; flag any `result_id` you haven't seen before. At 10 results a call, 5 pages a week is 20 credits a month per topic. - **Citation tracking for a fixed list of papers**: store each paper's `result_id`, search its title on a schedule, find that `result_id` in `organic_results`, and record `inline_links.cited_by.total` with the date. Weekly checks of 200 papers are 800 credits a month. - **Building a corpus of hundreds of thousands of records**: neither route is a good fit. Per-call cost adds up, and a scraper at that volume carries more risk. Look for a bulk bibliographic dataset whose licence covers your use. - **Author-level analysis**: try the [author endpoint](https://perceptlayer.com/apis/google-scholar/author) in the playground with a `user` value first, since this post has no recorded author response. Keep authors' personal details out of anything you publish. - **An agent answering research questions**: give it the Scholar endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls search instead of loading pages. - **Learning how scraping works**: build a scraper against a practice site, not a production search engine. If you're comparing other search-engine sources, [Google Patents API: Search Patents and Get Details](https://perceptlayer.com/blog/google-patents-api-search-details) covers a similar search-then-detail flow, and the [search engines APIs](https://perceptlayer.com/verticals/search) page lists the rest. To check the fields against your own topic, run search with your query in the playground on the [Google Scholar API page](https://perceptlayer.com/apis/google-scholar), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Google Scholar **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-scholar) ## Frequently asked questions ### Is scraping Google Scholar allowed? That depends on Google Scholar's terms, the terms of any publisher whose files you download, and the law where you work, so read the terms and get legal advice for commercial use. Don't get around blocks or other protections. Paper metadata such as titles and citation counts is lower risk than personal data; keep authors' personal details out of anything you store or publish. ### Can I get citation counts without a scraper? Yes, where a result has one. `GET /v1/google-scholar/search` returns `inline_links.cited_by.total` on results that carry it; in the recorded "machine learning" search, the second result has `total: 292` and the first has no `cited_by` block. Each successful search call costs 1 credit and returns a page of results. ### How many results come back from one search call? The recorded call asked for `num=10` and its `pagination` block echoed `num: 10` with `next_start: 10` and `has_next: true`, against `total_results: 38300`. Nothing else about page size is documented, so set `num` yourself and page with `start`. Each page is one call at 1 credit. ### Does a failed Scholar call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ### How fast can I run a weekly Scholar pull? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so its 100 free checks take under two minutes. Paying accounts run at least 5 requests a second (300 a minute), so 200 citation checks take under a minute. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. google scholar scraping citations academic search research data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Google Scholar API: Search Papers and Citations as JSON](https://perceptlayer.com/blog/google-scholar-api) Search Google Scholar as JSON: the search endpoint's parameters, a recorded response with citation counts, and a flat 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. --- title: "Price Monitoring Tool: Build One on Product APIs" description: "Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check." url: https://perceptlayer.com/blog/price-monitoring-tool-build --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Price Monitoring Tool: Build One on Product APIs 31 Oct 2026 Perceptlayer 9 min read A price monitoring tool checks the same products on the same shops every day, stores each price with its seller and date, and tells you when a price falls. You can build a small one in about 115 lines of Python on three product endpoints: Google Shopping, Walmart and idealo. Each check is one search call at 1 credit, matched to your product by its ID in the results. This tutorial builds the watchlist, the fetcher, a SQLite history and a drop alert, then works out the cost per product per day. ## Key takeaways - The tool makes one search call per product per source per day: `GET /v1/google-shopping/search`, `GET /v1/walmart/search` or `GET /v1/idealo/search`, each 1 credit per successful call. - Match by ID, not by position: `product_id` in Google Shopping's `shopping_results`, `us_item_id` in Walmart's `data.results`, and `id` in idealo's `results`. - Store the seller with every price: `source` on Google Shopping, `seller_name` on Walmart, and `cheapest_offer.shop_name` on idealo. - A product watched on all three sources costs 3 credits a day: 100 products × 3 × 30 days = 9,000 credits a month, inside the Starter pack's 10,000. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a day with errors costs less, not more. ## What does the price monitoring tool do? The tool runs once a day. For each entry in a watchlist, it searches one source with a query, finds the entry's product in the results by its ID, and writes a row with the date, source, product ID, price, currency and seller to a SQLite database. Then it compares today's price with the last stored price and with the lowest price in the last 30 days, and raises an alert when the drop passes a threshold you set. That's deliberately narrower than an agent. There's no language model choosing what to search; the watchlist decides. If you want a tracker that an agent drives, or one that picks the lowest match from free-text results, [Build a Price Tracking Agent in Python with Live Data](https://perceptlayer.com/blog/price-tracking-agent-python) covers that design with Google Shopping and eBay. This tool trades flexibility for predictability: the same calls every day, a fixed credit bill, and rows you can compare day to day. ## Which endpoints does it call? It calls one search endpoint on each source, because each search result already carries a price, a seller and an ID you can match on. All three are `GET` requests at 1 credit per successful call. The parameters below are the ones the tool sets; each API page lists the rest, and nothing about defaults is documented, so the tool sets every value it relies on. | Source | Endpoint | Query parameter | Other parameters the tool can set | ID to match | Seller field | | --- | --- | --- | --- | --- | --- | | [Google Shopping](https://perceptlayer.com/apis/google-shopping) | `/v1/google-shopping/search` | `q` | `gl`, `hl`, `location`, `device` | `product_id` | `source` | | [Walmart](https://perceptlayer.com/apis/walmart) | `/v1/walmart/search` | `query` | `country` ( `us` or `ca`), `sort`, `min_price`, `max_price` | `us_item_id` | `seller_name` | | [idealo](https://perceptlayer.com/apis/idealo) | `/v1/idealo/search` | `query` | `category_id`, `sort`, `price_min`, `price_max` | `id` | `cheapest_offer.shop_name` | Walmart and idealo also have detail endpoints that take an ID: [`/v1/walmart/product`](https://perceptlayer.com/apis/walmart/product) takes `us_item_id`, and [`/v1/idealo/offers`](https://perceptlayer.com/apis/idealo/offers) takes `product_id`. The names match the IDs in the search results. We don't have recorded responses for those two, so this tool stays on search, and you can try the detail endpoints in the playground if you need more per product. ## What does each source return? Each search returns a list of products with a price and a seller, in a slightly different shape per source. The excerpts below are from recorded responses, trimmed to the fields the tool reads. Prices are what each page showed when the call was recorded. Google Shopping, for `q=iphone 15&gl=us&hl=en`: ```json { "shopping_results": [ { "position": 2, "title": "Apple iPhone 15 128GB", "source": "Best Buy", … "product_id": "4379032623638529631", "link": "https://www.google.com/shopping/product/4379032623638529631", "price": "$441.00", "extracted_price": 441, … } ], "pagination": { "current_page": 1, "start": 0, "next_start": 10 } } ``` Walmart, for `query=air fryer`: ```json { "success": true, "data": { "results": [ { "us_item_id": "14678059894", "title": "Chefman Air Fryer 1500W, 6 Quart, 4 Functions with Touch Controls, Stainless Steel", "price": 59.98, "currency": "USD", … "seller_name": "Walmart.com", "availability_status": "IN_STOCK", … "out_of_stock": false, "sponsored": true } ], … } } ``` idealo, for `query=air fryer`: ```json { "success": true, "query": "air fryer", "results": [ { "id": "204292458", "type": "PRODUCT", "title": "Philips NA221/00", … "price": 76.3, "price_formatted": "76,30 €", "currency": "EUR", "offer_count": 13, … "cheapest_offer": { … "shop_name": "proshop.de", … "shipping_costs": "4,99 €", "shipping_is_free": false }, … } ], … } ``` Three differences shape the code. Google Shopping has no currency field, so the tool stores the `price` string next to `extracted_price`. Walmart nests results under `data` and flags `sponsored` items, which is one more reason to match by ID instead of taking the first result. idealo's `price` is the product's price across shops, and its seller is the shop in `cheapest_offer`, with `shipping_costs` as a display string. ## How do you build the tool? You build it in five steps: a key and one package, a watchlist, a fetcher that respects the limits, one extractor per source, and a store with a drop check. The complete script is in step 5. It uses Python's standard `sqlite3`, `json` and `datetime` modules plus `requests`. ### Step 1: Get a key and install requests [Get a free API key](https://perceptlayer.com/signup); it starts with `sk_live_` and goes in the `X-API-Key` header. Every account gets 100 free credits after verifying an email. Then install the one package and export the key: ```bash pip install requests export API_KEY=sk_live_your_key ``` The [quick start](https://docs.perceptlayer.com/quickstart) and [authentication docs](https://docs.perceptlayer.com/authentication) cover the key in more detail. ### Step 2: Write the watchlist Each watchlist entry is one product on one source: a label, the source, the search parameters and the ID to match. Use a query specific enough that the product appears on the first page of results, such as the model name. The IDs below are from the recorded responses; replace them with your own after a test search in each API's playground. ```python WATCHLIST = [ {"label": "iPhone 15 128GB", "source": "google_shopping", "params": {"q": "iphone 15", "gl": "us", "hl": "en"}, "id": "4379032623638529631"}, {"label": "Chefman 6 qt air fryer", "source": "walmart", "params": {"query": "air fryer", "country": "us"}, "id": "14678059894"}, {"label": "Philips NA221/00", "source": "idealo", "params": {"query": "air fryer"}, "id": "204292458"}, ] ``` ### Step 3: Fetch with retries and a pause The fetcher sends the request with the key, waits for the seconds in `Retry-After` on a 429 or 503, and raises on other errors. Requests have no idempotency key, so a client timeout can hide a call that succeeded and was billed; a 60-second timeout keeps that rare. The main loop pauses one second between calls, which keeps a free account within its 1 request a second. ### Step 4: Extract the matched product from each source One small function per source walks the result list, finds the entry whose ID matches, and returns the price, currency, seller and a raw note. It reads only fields that appear in the recorded responses, with `.get`, so a missing field becomes `None` instead of a crash. When the ID isn't on the page, it returns `None` and the tool records nothing for that day. ### Step 5: Store each day and check for drops The complete script below puts steps 3 to 5 together. The `prices` table has one row per day, source and product ID; `INSERT OR REPLACE` means a second run on the same day overwrites the first rather than adding a duplicate. ```python import datetime import json import os import sqlite3 import time import requests API_KEY = os.environ["API_KEY"] BASE = "https://api.perceptlayer.com" PATHS = { "google_shopping": "/v1/google-shopping/search", "walmart": "/v1/walmart/search", "idealo": "/v1/idealo/search", } DROP = 0.05 # alert on a fall of 5% or more WATCHLIST = [ {"label": "iPhone 15 128GB", "source": "google_shopping", "params": {"q": "iphone 15", "gl": "us", "hl": "en"}, "id": "4379032623638529631"}, {"label": "Chefman 6 qt air fryer", "source": "walmart", "params": {"query": "air fryer", "country": "us"}, "id": "14678059894"}, {"label": "Philips NA221/00", "source": "idealo", "params": {"query": "air fryer"}, "id": "204292458"}, ] def fetch(path, params, attempts=3): for _ in range(attempts): r = requests.get(BASE + path, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json(), int(r.headers.get("X-Credits-Used", "0")) raise RuntimeError(f"gave up on {path} {params}") def google_shopping(data, wanted): for item in data.get("shopping_results", []): if item.get("product_id") == wanted: return item.get("extracted_price"), None, item.get("source"), item.get("price") return None def walmart(data, wanted): for item in data.get("data", {}).get("results", []): if item.get("us_item_id") == wanted: return (item.get("price"), item.get("currency"), item.get("seller_name"), item.get("availability_status")) return None def idealo(data, wanted): for item in data.get("results", []): if item.get("id") == wanted: offer = item.get("cheapest_offer") or {} return (item.get("price"), item.get("currency"), offer.get("shop_name"), offer.get("shipping_costs")) return None EXTRACT = {"google_shopping": google_shopping, "walmart": walmart, "idealo": idealo} db = sqlite3.connect("prices.db") db.execute("""CREATE TABLE IF NOT EXISTS prices ( day TEXT, source TEXT, item_id TEXT, label TEXT, price REAL, currency TEXT, seller TEXT, note TEXT, PRIMARY KEY (day, source, item_id))""") today = datetime.date.today().isoformat() month_ago = (datetime.date.today() - datetime.timedelta(days=30)).isoformat() spent = 0 for entry in WATCHLIST: src, wanted = entry["source"], entry["id"] try: data, credits = fetch(PATHS[src], entry["params"]) except (requests.RequestException, RuntimeError) as err: print(f"ERROR {entry['label']} on {src}: {err}") continue spent += credits hit = EXTRACT[src](data, wanted) if hit is None or hit[0] is None: print(f"MISS {entry['label']} not on the first page of {src}") time.sleep(1) continue price, currency, seller, note = hit last = db.execute( "SELECT price FROM prices WHERE source=? AND item_id=? AND day=? AND day {price} ({seller})") if low is not None and price < low: print(f"LOW {entry['label']} is below its 30-day low of {low}") with open("alerts.jsonl", "a") as f: f.write(json.dumps({"day": today, "source": src, "id": wanted, "label": entry["label"], "was": last[0], "now": price, "seller": seller}) + "\n") else: print(f"OK {entry['label']} on {src}: {price} {currency or ''} ({seller})") time.sleep(1) print(f"credits used this run: {spent}") ``` Alerts go to the terminal and to `alerts.jsonl`, one JSON object per line, so you can forward them to email or chat with whatever you already use. Schedule the script once a day with cron, for example `15 7 * * * cd /opt/prices && python3 monitor.py`. ## What does the result look like? After the first run, the database holds one row per watchlist entry that was found, and no alerts, because there's no earlier price to compare with. With the values in the recorded responses, those rows would be: | day | source | item\_id | price | currency | seller | note | | --- | --- | --- | --- | --- | --- | --- | | first run | google\_shopping | 4379032623638529631 | 441 | | Best Buy | $441.00 | | first run | walmart | 14678059894 | 59.98 | USD | Walmart.com | IN\_STOCK | | first run | idealo | 204292458 | 76.3 | EUR | proshop.de | 4,99 € | From the second day on, each run compares with the last stored row. If the Walmart item fell from 59.98 to 56.00, that's a 6.6% drop, past the 5% threshold, so the tool prints a `DROP` line and appends it to `alerts.jsonl`. The seller column matters as much as the price: on Google Shopping and idealo, a lower price can come with a different seller, and that's worth knowing before you act on the alert. For other ways to use the history, [Build an ETL Pipeline in Python for Web Data](https://perceptlayer.com/blog/etl-pipeline-python-web-data) and [Save API JSON to Parquet in Python](https://perceptlayer.com/blog/save-api-json-to-parquet-python) cover the storage side. ## What does price monitoring cost per product per day? The cost is 1 credit per watchlist entry per day, because each entry is one search call. A product you watch on one source costs 1 credit a day; on all three, 3 credits a day. Failed calls cost nothing, and a retry that succeeds is billed once. The script prints the credits each run used, read from `X-Credits-Used`. | Watchlist | Arithmetic | Credits a month | | --- | --- | --- | | 30 products, 1 source | 30 × 1 × 30 days × 1 credit | 900 | | 100 products, 3 sources | 100 × 3 × 30 days × 1 credit | 9,000 | | 500 products, 2 sources | 500 × 2 × 30 days × 1 credit | 30,000 | | 500 products, 2 sources, twice a day | 500 × 2 × 2 × 30 days × 1 credit | 60,000 | The 100 free credits on signup cover the first plan's first 3 days, enough to test the tool. A Starter pack's 10,000 covers 11 months of the first plan or one month of the second, the third the Build pack's 50,000, and the fourth needs the Growth pack's 200,000 or two Build packs. Purchased credits last 12 months, with no subscription. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. Run time follows the rate limit, which is per account and counted per minute. At the free 1 request a second, 30 entries take about 30 seconds; a paying account runs at least 5 a second. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. ## How do you keep the monitor honest? A price monitor is only useful if each row means the same thing every day. Keep the parameters for each entry fixed, especially `gl`, `hl` and `country`, because a different market is a different price. Compare each source only with its own history: Walmart returns `USD`, idealo `EUR`, and Google Shopping a display string, so don't rank them against each other without converting first; [Normalise Prices Across Currencies and Sources in Python](https://perceptlayer.com/blog/normalize-prices-multiple-currencies) shows one way. Watch the `MISS` lines too. A product that drops off the first page isn't necessarily gone; your query may have become too broad. Tighten the query, or add `page` (Walmart, idealo) or `start` (Google Shopping, whose `pagination.next_start` has the same name) and accept one more credit per extra page. Data is collected from publicly available sources and returned as found at the time of the call, so store the date with every price, as the table does. To start, run a search for one of your products in the playground on the [Walmart API page](https://perceptlayer.com/apis/walmart) or the [idealo API page](https://perceptlayer.com/apis/idealo), copy its ID into the watchlist, and run the script. For more on the fields these sources return, see the [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces). ## APIs in this post - [Google Shopping **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/google-shopping) - [Walmart **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/walmart) - [Idealo **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/idealo) ## Frequently asked questions ### How much does it cost to monitor one product? One credit per source per day, because each check is one search call at 1 credit. A product watched on Google Shopping, Walmart and idealo costs 3 credits a day, or 90 credits over 30 days. Failed calls cost nothing and return `X-Credits-Used: 0`. The pricing page shows what credits cost. ### Why match products by ID instead of taking the first result? Result order changes, and some results are promoted: the recorded Walmart search marks both of its first two items with `sponsored: true`. Matching `product_id`, `us_item_id` or `id` makes sure each day's row describes the same product. Check over a few runs that the ID stays the same for your products before you build history on it. ### Does the tool include shipping costs? Only where the response has them. idealo's `cheapest_offer` carries `shipping_costs` as a display string, such as `4,99 €`, and `shipping_is_free`, which the tool stores in the `note` column. The recorded Google Shopping and Walmart search results have no shipping field, so the tool stores the item price alone for those sources. ### Can I monitor prices in other countries? Partly. Google Shopping takes `gl` and `hl` for country and language, and `location` for a place. Walmart's `country` accepts `us` or `ca`. The recorded idealo search returned German results in `EUR`. Each country is a separate watchlist entry and a separate call at 1 credit, so keep currencies apart in your comparisons. ### What happens when a call fails during a run? The tool prints an `ERROR` line for that entry and moves on, and no credits are debited for the failure. The fetcher waits for the seconds in `Retry-After` on a 429 or 503 before trying again. Other errors return an HTTP status and a JSON body with `code`, `message` and `request_id`; the errors docs list every code. price monitoring ecommerce data walmart idealo google shopping python ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 8 Aug 2026 Updated 2 Nov 2026 Perceptlayer 7 min read ## [News Data for Event Detection: Signals and Noise](https://perceptlayer.com/blog/news-data-event-detection) Turn news search results into event signals: drop duplicate URLs, cluster syndicated titles, count distinct sources in a window, and compare with a baseline. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Google Shopping Scraper or API: What You Get](https://perceptlayer.com/blog/google-shopping-scraper-vs-api) A Google Shopping scraper vs one GET at 1 credit: the recorded iphone 15 search with source, extracted\_price and product\_id, and the cost per item tracked. --- title: "Hotel API: Expedia, Booking.com and Google Hotels" description: "Expedia, Booking.com and Google Hotels hotel endpoints compared on recorded Paris searches: price as numbers or strings, hotel IDs, 1 credit per call." url: https://perceptlayer.com/blog/hotel-api-comparison --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Hotel API: Expedia, Booking.com and Google Hotels 30 Oct 2026 Perceptlayer 8 min read A hotel API returns hotels for a place and dates as JSON, with prices, ratings and an ID you can use for room-level calls. Perceptlayer has three: Expedia, Booking.com and Google Hotels, every endpoint at 1 credit per successful call. They differ most in how prices arrive. Expedia gives plain numbers with a `currency` field, Google Hotels gives both a display string and a number, and Booking.com gives strings you have to parse. This post compares their recorded Paris responses and the cost of tracking a hotel's price per night. ## Key takeaways - Every hotel endpoint on all three sources costs 1 credit per successful call; failed calls cost nothing and return `X-Credits-Used: 0`. - Expedia's `hotels-search` returns `total_price` and `price_per_night` as numbers plus `currency`; in the recording, 690 for three nights and 230 a night. - Google Hotels returns `rate_per_night.lowest` as a string ("€136") and `extracted_lowest` as a number (136), with the same pair for `total_rate`. - Booking.com's `prices` returns `price` as a string ("$351.05") and `review_score` as a string ("8.8"); its `rooms` price is a long text string with several figures in it. - Recorded chains: Expedia `property_id` 564660 goes from search into `hotels-rooms`; Booking.com's hotel `url` gives the `country` and `slug` used by `rooms`. ## Which hotel endpoints does each source have? Each source has a search, a way to resolve a place name, and one or more per-hotel endpoints, but the split differs. Expedia has 4 endpoints, Booking.com 11 and Google Hotels 3. All are `GET` except Booking.com's `bulk-prices`, which is a `POST` that takes a `searches` list. | Job | Expedia | Booking.com | Google Hotels | | --- | --- | --- | --- | | Resolve a place | `destinations` ( `query`) | `destinations` ( `q`) | `autocomplete` ( `q`) | | Hotels for a place and dates | `hotels-search` | `search`, `prices`, `bulk-prices` | `search` | | One hotel's details | `hotels-detail` ( `property_id`) | `hotel`, `facilities`, `photos` | none listed | | Rooms and rate plans | `hotels-rooms` ( `property_id`) | `rooms` | none listed | | Reviews | none listed | `reviews`, `review-scores` | `reviews` ( `property_token`) | | Credits per call | 1 | 1 | 1 | Booking.com's per-hotel endpoints take a hotel `url`, or a `country` and `slug`. Expedia keys everything on `property_id`. Google Hotels uses a `property_token`. ## How do the three hotel APIs compare? The three sources answer the same question with different inputs and different shapes, and the table below sets them side by side. The parameter names come from the catalogue; the response fields and page sizes are what appeared in the recorded Paris searches, not a guarantee of every response. | | Expedia | Booking.com | Google Hotels | | --- | --- | --- | --- | | Search endpoint | `GET /v1/expedia/hotels-search` | `GET /v1/booking/prices` | `GET /v1/google-hotels/search` | | Place input | `region_id` (required), `region_name` | `ss` (required), `dest_id`, `dest_type` | `q` (required) | | Date parameters | `check_in`, `check_out` | `checkin`, `checkout` | `check_in_date`, `check_out_date` | | Guests | `adults`, `children` | `group_adults`, `group_children`, `no_rooms` | `adults`, `children`, `children_ages[]` | | Price in response | Numbers: `total_price`, `price_per_night`, plus `currency` | String: `price` | String and number: `rate_per_night.lowest`, `extracted_lowest` | | Rating in response | `guest_rating` (number), `guest_rating_label` | `review_score` (string) | `overall_rating` (number), `reviews`, `reviews_breakdown` | | ID for the next call | `property_id` | `url` | `property_token` | | Hotels in the recorded call | 10 per call with `limit=10`, `total_results` 500 | `total_prices` 25 | `current_from` 1 to `current_to` 20 | | Paging | `offset`, `next_offset` | not shown in the recording | `next_page_token` | | Other parameters | `sort`, `limit`, `offset` | `lang`, `currency` | `min_price`, `max_price`, `hotel_class`, `rating`, `free_cancellation`, `sort_by` and more | Google Hotels has the longest parameter list on search. Expedia has the cleanest price fields. Booking.com has the most per-hotel endpoints. ## How does each source give the price? Price format decides how much parsing code you write, so look at it before anything else. Expedia returns numbers, Google Hotels returns a string and a number side by side, and Booking.com returns strings only. All three recordings are for Paris; the excerpts below are trimmed with `…`. ### Expedia: numbers and a currency field ```bash curl "https://api.perceptlayer.com/v1/expedia/hotels-search?region_id=2734®ion_name=Paris%2C+France&check_in=2026-11-20&check_out=2026-11-23&adults=2&limit=10" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "region_id": "2734", "check_in": "2026-11-20", "check_out": "2026-11-23", "hotels": [ { "property_id": "564660", "position": 1, "name": "Mercure Paris Centre Tour Eiffel", "guest_rating": 8, "guest_rating_label": "Very good", "review_count": 1000, "total_price": 690, "price_per_night": 230, "free_cancellation": false, "sponsored": true, "currency": "EUR", … }, { "property_id": "994215", "position": 2, "name": "L’Hôtel du Collectionneur Paris", "total_price": 1203, "original_price": 1329, "price_per_night": 401, … } ], "total_results": 500, "offset": 0, "has_more": true, "next_offset": 10 }, … } ``` `total_price` is 690 for a three-night stay and `price_per_night` is 230, which is 690 ÷ 3. The second hotel also has `original_price`, so you can see a discount without parsing text. Both recorded results have `sponsored: true`; keep that field if you analyse ranking position. ### Google Hotels: a string and a number ```bash curl "https://api.perceptlayer.com/v1/google-hotels/search?q=Paris%2C+France&check_in_date=2026-12-15&check_out_date=2026-12-18¤cy=EUR&gl=fr" \ -H "X-API-Key: $API_KEY" ``` ```json { "properties": [ { "type": "hotel", "name": "Novotel Paris Porte de Versailles", "property_token": "ChkI5rWisq2xuMNRGg0vZy8xMWhfa18xc2w4EAE", "rate_per_night": { "lowest": "€136", "extracted_lowest": 136, "before_taxes_fees": "€136", "extracted_before_taxes_fees": 135.76042 }, "total_rate": { "lowest": "€408", "extracted_lowest": 408, … }, "overall_rating": 4.6, "reviews": 4337, "hotel_class": "4-star hotel", "extracted_hotel_class": 4, … }, … ], "pagination": { "current_from": 1, "current_to": 20, "next_page_token": "gho_jRZtj7WKgqLkF8eP.Q0JJPQ", … }, … } ``` Read the `extracted_` fields and you never parse a currency string. The request set `currency=EUR`, and the strings carry the euro sign. `total_rate.extracted_lowest` of 408 is 136 × 3 nights. ### Booking.com: strings to parse ```bash curl "https://api.perceptlayer.com/v1/booking/prices?ss=Paris&checkin=2026-11-20&checkout=2026-11-23&group_adults=2&dest_id=-1456928&dest_type=city" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "title": "Booking.com: hotels in Paris", "prices": [ { "name": "Royal Saint Michel", "url": "https://www.booking.com/hotel/fr/royal-saint-michel.html", "price": "$351.05", "review_score": "8.8", "location": "3 Boulevard Saint Michel, Paris", … }, { "name": "Ibis Styles Paris Batignolles", "url": "https://www.booking.com/hotel/fr/mirific.html", "price": "$146.46", "review_score": "8.3", … } ], "total_prices": 25, "parsed": true }, … } ``` The request didn't set `currency`, and the prices came back with a dollar sign for a Paris search. Set `currency` explicitly and check the symbol in each string before you store it. The recording doesn't say whether `price` covers one night or the whole stay, so compare it against a `rooms` call for the same dates before you rely on either reading. ### A parser for all three This function turns one hotel from any of the three search responses into the same row, reading only fields that appear in the recordings: ```python import re def parse_amount(text): m = re.search(r"([^\d\s.,]+)?\s*([\d,]+(?:\.\d+)?)", text or "") if not m: return None, None return float(m.group(2).replace(",", "")), m.group(1) def hotel_row(source, h): if source == "expedia": return {"name": h.get("name"), "id": h.get("property_id"), "nightly": h.get("price_per_night"), "total": h.get("total_price"), "currency": h.get("currency"), "rating": h.get("guest_rating")} if source == "google-hotels": return {"name": h.get("name"), "id": h.get("property_token"), "nightly": (h.get("rate_per_night") or {}).get("extracted_lowest"), "total": (h.get("total_rate") or {}).get("extracted_lowest"), "currency": None, "rating": h.get("overall_rating")} amount, symbol = parse_amount(h.get("price")) score = h.get("review_score") return {"name": h.get("name"), "id": h.get("url"), "nightly": None, "total": None, "price": amount, "currency": symbol, "rating": float(score) if score else None} ``` Google Hotels rows carry no currency field in the recording, so take it from the `currency` you sent. Booking.com rows keep the parsed figure in `price` until you've confirmed what it covers. Note the rating scales differ too: Expedia's 8 and Booking.com's "8.8" look like scores out of 10, Google's 4.6 like stars out of 5, so don't average them without rescaling. ## How do you get from a search result to rooms? Two of the three sources have a recorded search-to-hotel chain, where a value from the search response appears in the parameters of the next recorded call. Google Hotels has a matching parameter name but no recorded follow-up. This matters for monitoring, because a room-level call is how you track one hotel precisely. ### Expedia: property\_id Hotel 564660 in the search above is the `property_id` in the recorded `hotels-rooms` call, for the same dates and two adults: ```bash curl "https://api.perceptlayer.com/v1/expedia/hotels-rooms?property_id=564660&check_in=2026-11-20&check_out=2026-11-23&adults=2" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "property_id": "564660", "currency": "EUR", "rooms": [ { "unit_id": "226385", "name": "Classic Room, 1 Double Bed", "rate_plans": [ { "rate_plan_id": "397104173", "total_price": 690, "price_per_night": 230 }, { "rate_plan_id": "397104181", "total_price": 825, "price_per_night": 275 } ], … }, … ] }, … } ``` The cheapest rate plan, 690 total and 230 a night, matches the price on the search result. ### Booking.com: the hotel url The search result's `url` is `https://www.booking.com/hotel/fr/royal-saint-michel.html`. The recorded `rooms` call used `country=fr` and `slug=royal-saint-michel`, the two parts of that path: ```bash curl "https://api.perceptlayer.com/v1/booking/rooms?country=fr&slug=royal-saint-michel&checkin=2026-11-20&checkout=2026-11-23&group_adults=2" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "canonical_url": "https://www.booking.com/hotel/fr/royal-saint-michel.html", "rooms": [ { "name": "Attic Single Room", "price": "€ 978 € 588 Original price € 978 Current price € 588 € 326.12 × 3 nights € 978.35 Limited-time Deal - € 390.73 You're getting a discount because—for a limited t…", "occupancy": "1 adult", "beds": "1 twin bed", "available": true } ], "total_rooms": 1, "parsed": true }, … } ``` The room `price` is page text with several figures in it: an original price, a current price, a per-night amount times three nights, and a discount. Don't run the simple parser above on it. If you need a single number from Booking.com rooms, write a parser against your own recorded responses and test it on every room type you track. ### Google Hotels: property\_token Each property in the search response has a `property_token`. The `reviews` endpoint requires a parameter of the same name, and `search` accepts it as an optional parameter. There's no recorded follow-up call, so check the result in the playground on the [Google Hotels API page](https://perceptlayer.com/apis/google-hotels) before you build on it. ## What does tracking one hotel per night cost? Every call is 1 credit, so the cost per hotel per night depends on how many hotels one call covers. A room-level call covers one hotel for one stay: 1 credit per hotel per date. A search call covers a page of hotels for one stay; in the recordings that was 10 hotels on Expedia (with `limit=10`), 25 on Booking.com and 20 on Google Hotels. Worked example: you track 40 Paris hotels for the next 30 check-in dates, once a day. | Approach | Calls a day | Credits a month (30 days) | | --- | --- | --- | | Expedia `hotels-rooms` per hotel per date | 40 × 30 = 1,200 | 1,200 × 30 = 36,000 | | One search page per date, one source | 30 | 30 × 30 = 900 | | Rooms calls on two sources | 2,400 | 72,000 | The room-level plan fits the Build pack's 50,000 credits. The search plan runs for 3 days on the 100 free credits (3 × 30 = 90) and for 11 months on a 10,000-credit Starter pack (10,000 ÷ 900), but only covers the hotels that appear on the page you fetch, which depends on the sort and the dates. Two sources at room level need 72,000 credits, which is past the Build pack and inside the Growth pack's 200,000. Free accounts get 1 request a second and paid accounts at least 5, so 1,200 calls take about 4 minutes at 5 a second. See [pricing](https://perceptlayer.com/pricing) and the [rate limits docs](https://docs.perceptlayer.com/rate-limits). ## Which hotel API should you use? Pick by what you'll do with the price, because parsing effort and ID handling differ more than coverage of a single city. Every option below costs 1 credit per successful call. - **A price tracker or rate-shopping job**: Expedia. Numeric `total_price` and `price_per_night`, a `currency` field, and a recorded chain from `property_id` to `hotels-rooms` rate plans. - **A city-wide market view with filters**: Google Hotels. `search` takes `min_price`, `max_price`, `hotel_class` and `rating`, and returns `extracted_` numbers, ratings and `reviews_breakdown` by topic. - **Reviews and review scores alongside prices**: Booking.com, which has `reviews` and `review-scores` endpoints next to `prices` and `rooms`. [Booking.com Reviews API](https://perceptlayer.com/blog/booking-com-reviews-api-json) covers those. Budget time for string parsing. - **Many searches at once**: look at Booking.com's [bulk-prices](https://perceptlayer.com/apis/booking/bulk-prices) endpoint, a `POST` with a `searches` list. - **An agent answering "where should I stay"**: Google Hotels search through the MCP server, since one call returns price, rating and class. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. Run the Paris searches above in the playground on the [Expedia API](https://perceptlayer.com/apis/expedia), [Booking.com API](https://perceptlayer.com/apis/booking) and Google Hotels pages with your own dates, then [get a free API key](https://perceptlayer.com/signup). More travel sources are on the [travel APIs](https://perceptlayer.com/verticals/travel) page. ## APIs in this post - [Expedia **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/expedia) - [Booking.com **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/booking) - [Google Hotels **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-hotels) ## Frequently asked questions ### How much does a hotel API call cost? Every endpoint on Expedia, Booking.com and Google Hotels costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`. Every account gets 100 free credits after verifying an email address, enough to check 40 hotels on 2 dates once at room level (40 × 2 = 80 credits). Paid credits come in prepaid packs; [pricing](https://perceptlayer.com/pricing) has what they cost. ### Which hotel API returns prices as numbers? Expedia returns `total_price` and `price_per_night` as numbers with a separate `currency` field. Google Hotels returns display strings plus numeric `extracted_lowest` values inside `rate_per_night` and `total_rate`. Booking.com's `prices` endpoint returns `price` as a string such as "$351.05", so you parse the amount and currency symbol yourself. ### How do I get room-level prices for one hotel? On Expedia, pass the `property_id` from `hotels-search` to `hotels-rooms` with `check_in` and `check_out`; it returns rooms with `rate_plans`. On Booking.com, call `rooms` with the hotel's `url`, or its `country` and `slug`, plus dates. Google Hotels has no rooms endpoint in the catalogue. Each call costs 1 credit. ### Why do prices differ between the three sources? Each response reflects its own site at the time of the call, and the recorded fields don't mean the same thing. Expedia gives a total and a nightly figure, Google Hotels a `lowest` rate and a `before_taxes_fees` rate, and Booking.com a single string. Compare like with like: same dates, same guests, same currency. ### What happens if a hotel call fails? The call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, and costs nothing. A `rate_limited` (429) or `temporarily_unavailable` (503) response carries a `Retry-After` header with the seconds to wait. A `source_error` (502) is worth one retry later. The [errors docs](https://docs.perceptlayer.com/errors) list every code. hotel api hotel prices expedia booking.com google hotels travel data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Booking.com Scraper or API: What You Get](https://perceptlayer.com/blog/booking-com-scraper-vs-api) A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 8 min read ## [Expedia Scraper or API: What You Get](https://perceptlayer.com/blog/expedia-scraper-vs-api) An Expedia scraper vs 4 Expedia endpoints at 1 credit each: a recorded Paris search and rooms call with total\_price, rate plans, and the cost per hotel-date. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Aug 2026 Updated 23 Oct 2026 Perceptlayer 8 min read ## [Booking.com Hotel Prices API: Search, Rooms and Reviews](https://perceptlayer.com/blog/booking-com-hotel-prices-api) Eleven Booking.com endpoints as JSON: search, prices, rooms and reviews, with parameters and a 1,000-hotel price check costed in credits. --- title: "Trustpilot Scraper or API: Ratings and Review History" description: "A Trustpilot scraper vs a 1-credit company-reviews call: the recorded Amazon response, its star breakdown, and 2,340 pages × 1 credit for a full history." url: https://perceptlayer.com/blog/trustpilot-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Trustpilot Scraper or API: Ratings and Review History 30 Oct 2026 Perceptlayer 7 min read A Trustpilot scraper is code that opens a company's review pages, pages through them, and pulls the TrustScore, the star counts and each review's text, rating and dates out of the HTML. You keep the fetcher, parser and pager working yourself. The alternative is `GET /v1/trustpilot/company-reviews`, which returns the company profile, its rating breakdown and a page of reviews as JSON for 1 credit a call. This post uses a recorded call for amazon.com to show what each route costs, when you need the reviews at all, and which fits which job. ## Key takeaways - One recorded call to `/v1/trustpilot/company-reviews` with `company_domain=amazon.com` returned the company's `trustScore` (1.5), `numberOfReviews` (49830), `numberOfReviewsLast12Months` (9156) and a star breakdown in `filters.reviewStatistics.ratings`. - For reputation tracking you often don't need individual reviews: that breakdown says 33,636 of 49,830 reviews are one star, 67.5%, in a single call. - The same response reports `totalPages: 2340` at `perPage: 20`, so reading the full history at that page size is 2,340 calls × 1 credit = 2,340 credits. - Each review has `id`, `rating`, `title`, `text`, `language`, `dates.publishedDate`, `dates.experiencedDate` and a verification label; the `consumer` object holds the reviewer's name and image, so drop it. - Watching 100 companies once a day is 100 calls × 1 credit = 100 credits a day, or 3,000 over 30 days, inside the Starter pack's 10,000. ## What would a Trustpilot scraper have to collect? A Trustpilot scraper has three collection jobs: the company profile with its score and counts, the review list across however many pages it runs to, and the reviews in every language the company receives. Each needs a parser you maintain, and the review list needs paging logic that survives thousands of pages without gaps or repeats. The profile is the easy part: one page, a handful of numbers. The review list is where scrapers get expensive. A large company has tens of thousands of reviews, so a full read is thousands of page loads, each one a chance for a timeout, a changed layout or a partial page. You also need to know which page you stopped on, so a failed run can resume rather than restart. Languages add a third layer. A global company's reviews arrive in many languages, and the recorded Amazon response contains reviews in German and English on the same page. Then come the parts every scraper has: pacing, retries, monitoring for silent failures, and storage that leaves reviewers' personal details out. Read Trustpilot's terms before you build a collector, and don't work around blocks or challenges if you meet them. ## Do you need the reviews, or just the numbers? Many Trustpilot jobs only need the aggregate numbers, and those come back in one call without paging. A reputation dashboard, a vendor risk check or a competitor benchmark wants the score, the volume, the recent volume and the star split. The company-reviews response carries all four next to the first page of reviews. The request from the recording: ```bash curl "https://api.perceptlayer.com/v1/trustpilot/company-reviews?company_domain=amazon.com&languages=all" \ -H "X-API-Key: $API_KEY" ``` The company block and the statistics, trimmed: ```json { "pageUrl": "https://www.trustpilot.com/review/www.amazon.com?languages=all", "businessUnit": { "id": "46ad346800006400050092d0", "displayName": "Amazon", "identifyingName": "www.amazon.com", "numberOfReviews": 49830, "numberOfReviewsLast12Months": 9156, "trustScore": 1.5, … "isClaimed": true, … "countryCode": "GB", … "activity": { … "replyBehavior": { "averageDaysToReply": 0, "negativeReviewsWithRepliesCount": 0, "replyPercentage": 0, "totalNegativeReviewsCount": 7932 }, … }, … }, … "filters": { … "pagination": { "currentPage": 1, "totalPages": 2340, "totalResults": 46782, "perPage": 20 }, … "reviewStatistics": { … "ratings": { "total": 49830, "one": 33636, "two": 3004, "three": 1869, "four": 2423, "five": 8898 } } }, … } ``` From those fields alone you can compute what most reputation reports show: | Metric | Field | Amazon, recorded | | --- | --- | --- | | Score | `businessUnit.trustScore` | 1.5 | | All-time volume | `businessUnit.numberOfReviews` | 49,830 | | Last 12 months | `businessUnit.numberOfReviewsLast12Months` | 9,156 | | One-star share | `ratings.one` ÷ `ratings.total` | 33,636 ÷ 49,830 = 67.5% | | Five-star share | `ratings.five` ÷ `ratings.total` | 8,898 ÷ 49,830 = 17.9% | | Negative reviews with replies | `replyBehavior.negativeReviewsWithRepliesCount` of `totalNegativeReviewsCount` | 0 of 7,932 | Two counts need care. `ratings.total` and `numberOfReviews` are both 49,830, but `pagination.totalResults` is 46,782. The response doesn't explain the gap, so use the star counts for shares, and `totalResults` for planning how many pages exist. ## What does a single review look like? Each review is a flat record of what was said, when, and how it was collected, plus a `consumer` object about the person. Keep the first part. In the recording, `consumer` holds a display name, an image URL, a country and the person's review count, none of which a reputation analysis needs. One review from the recording, with `consumer` cut: ```json { "id": "6adaa27868a81eadd98e9c53", "filtered": false, "isPending": false, "text": "Disgusting company run by disgusting and greedy people ", "rating": 1, "labels": { "verification": { "isVerified": false, … "reviewSourceName": "Organic", "verificationSource": "invitation", "verificationLevel": "not-verified", … } }, "title": "Disgusting company run by disgusting…", "likes": 0, "source": "Organic", "dates": { "experiencedDate": "2026-10-22T00:00:00.000Z", "publishedDate": "2026-10-23T01:55:36.000Z" }, … "language": "en", "isVerified": false } ``` Note the two dates. `experiencedDate` is a day, `publishedDate` a full timestamp, and they can differ, as here by a day. Use `publishedDate` for "reviews this week" and keep `experiencedDate` if you study when problems happened. The response also has two review arrays, `reviews` and `relevantReviews`, holding different review ids in the recording; decide which one your job reads and deduplicate on `id` if you keep both. ## How does a scraper compare with the endpoints? A scraper costs engineering time, terms risk and repairs; the endpoints cost a credit per successful call and give you named fields. The table compares them for a recurring job: a weekly or daily read of a list of companies, with an occasional full backfill. | | DIY Trustpilot scraper | Trustpilot endpoints | | --- | --- | --- | | Finding the company | Search page parser, or a known URL | `company-search` with `query`, or `company_domain` directly | | Score and counts | Parsed from the profile page | `trustScore`, `numberOfReviews`, `numberOfReviewsLast12Months`, `ratings` | | Reviews | Parsed page by page | `reviews[]` with `id`, `rating`, `title`, `text`, `language`, `dates` | | Filters | Whatever the page lets you drive | `rating`, `verified`, `with_replies`, `query`, `languages`, `date_posted`, `sort` (relevance or recency) | | Paging | Your pager, your resume logic | `page` and `per_page`, with `currentPage` and `totalPages` in the response | | Languages | Every language variant you choose to fetch | `languages` and `locale` parameters; `language` on each review | | Personal data | Mixed into the HTML you store | One `consumer` object to drop | | Failures | Yours to detect | HTTP status and error code; a failed call costs 0 credits | | Cost | Hosting and your time | 1 credit per successful call | ### What does a backfill cost, and what does a daily watch cost? The two jobs have very different bills. A backfill reads every page once: the recorded Amazon response says `totalPages: 2340` at `perPage: 20`, so the full history at that page size is 2,340 calls × 1 credit = 2,340 credits, within the Starter pack's 10,000. At 1 request a second on a free account that takes about 39 minutes; at 5 a second, under 8. The endpoint also takes a `per_page` parameter, so check in the playground how `totalPages` changes before you plan a large backfill. A watch is cheaper per company. One call a day returns the current score and star counts plus the first page of reviews; for most monitoring that's the whole job. 100 companies × 1 call × 1 credit = 100 credits a day, or 3,000 credits over 30 days. A smaller list costs less: 30 companies a day is 900 credits over 30 days. The 100 free credits on signup cover its first 3 days, enough to test the watch. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## How do you read the numbers and reviews in code? Read the statistics block for the scorecard, then map each review to a record without `consumer`. This JavaScript runs on Node 18 or later, uses only fields that appear in the recording, and prints one summary line per company plus the reviews you'd store: ```javascript const API = "https://api.perceptlayer.com/v1/trustpilot/company-reviews"; const companies = ["amazon.com"]; for (const domain of companies) { const url = `${API}?company_domain=${encodeURIComponent(domain)}&languages=all`; const res = await fetch(url, { headers: { "X-API-Key": process.env.API_KEY } }); if (!res.ok) { console.error(domain, res.status, await res.text()); continue; } const body = await res.json(); const unit = body.businessUnit ?? {}; const ratings = body.filters?.reviewStatistics?.ratings ?? {}; const oneStarShare = ratings.total ? ratings.one / ratings.total : null; console.log(domain, { trustScore: unit.trustScore, reviews: unit.numberOfReviews, last12Months: unit.numberOfReviewsLast12Months, oneStarShare, totalPages: body.filters?.pagination?.totalPages, }); // The consumer object identifies the reviewer, so it is never copied. const rows = (body.reviews ?? []).map((r) => ({ id: r.id, rating: r.rating, title: r.title, text: r.text, language: r.language, published: r.dates?.publishedDate, experienced: r.dates?.experiencedDate, verification: r.labels?.verification?.verificationLevel, })); console.log(rows); } ``` Save it as `reviews.mjs` and run `API_KEY=sk_live_... node reviews.mjs`. A failed call costs nothing and returns a JSON error code from the [errors docs](https://docs.perceptlayer.com/errors); a 429 carries a `Retry-After` header with the seconds to wait. ## Which route fits which job? Choose by what you need and how often. A scraper's cost is upkeep; the endpoints' cost is calls, and for score tracking that's one call per company. These verdicts assume the job repeats. - **Reputation scorecard for your company and competitors**: one `company-reviews` call per company per period, storing `trustScore`, `numberOfReviews`, `numberOfReviewsLast12Months` and the five star counts. No paging. - **Vendor or partner checks**: the same call, plus `isClaimed` and `replyBehavior` to see whether the company answers negative reviews. - **Complaint analysis**: page through reviews with `rating` and `date_posted` set to the window you care about, group the `text` by theme, and split by `language`. - **A full history for research**: backfill once at the cost of `totalPages` × 1 credit, then switch to a daily watch with `sort=recency`. - **Building a list of companies in a sector**: `GET /v1/trustpilot/businesses` takes a `category`, and `GET /v1/trustpilot/categories` takes no parameters; run both in the playground to see whether a category from one works in the other. - **An agent that answers "can I trust this shop?"**: connect the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so the agent calls `company-reviews` and reads the statistics. For the same choice on other review sources, see [Booking.com Reviews API](https://perceptlayer.com/blog/booking-com-reviews-api-json) and [Google Maps Scraper or Places Data API](https://perceptlayer.com/blog/google-maps-scraper-vs-api); the [reviews APIs](https://perceptlayer.com/verticals/reviews) page lists the rest. To check the fields for a company you track, run `company-reviews` with its domain in the playground on the [Trustpilot API page](https://perceptlayer.com/apis/trustpilot), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Trustpilot **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/trustpilot) ## Frequently asked questions ### Is scraping Trustpilot allowed? That depends on Trustpilot's terms, how you store and use the data, and the law where you operate, so read the terms and take legal advice for commercial use. Don't get around blocks or challenges. Scores, counts and review text are lower risk than personal data; leave reviewers' names, images and profile details out of anything you keep. ### How many calls does it take to read all of a company's reviews? The response tells you: `filters.pagination.totalPages`. The recorded Amazon call reports 2,340 pages at `perPage: 20` for 46,782 results, so a full read at that page size is 2,340 calls and 2,340 credits. Set `page` to move through them, and store the last page you finished so a failed run can resume. ### Can I get the TrustScore without paging through reviews? Yes. The first call for a company returns `businessUnit.trustScore`, `numberOfReviews`, `numberOfReviewsLast12Months` and the five star counts in `filters.reviewStatistics.ratings`, alongside the first page of reviews. For a scorecard that one call is enough, at 1 credit per company. `GET /v1/trustpilot/company-details` takes `company_domain` too, if you only want the profile. ### Do the reviews include personal data? Each review in the recording has a `consumer` object with the reviewer's display name, image URL, country and review count. Drop it before storage; the review's `id`, `rating`, `text`, `language` and `dates` are enough for analysis. Review text can still mention people, so treat free text with the same care. ### Does a failed Trustpilot call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. The one case to watch is a client timeout: the request may have succeeded and been billed, so log the page you asked for before retrying. trustpilot reviews scraping reputation monitoring trustscore ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read ## [Yelp Scraper or API: Reviews Without the Upkeep](https://perceptlayer.com/blog/yelp-scraper-vs-api) A Yelp scraper vs three 1-credit endpoints: a recorded Gary Danko search whose alias feeds the reviews call, with rating, text, created\_at and next\_after. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Google Maps Scraper or Places Data API: What You Get](https://perceptlayer.com/blog/google-maps-scraper-vs-api) Compare building a Google Maps scraper with the official Places API and place endpoints at 1 credit a call: fields, upkeep, terms and a verdict per use case. --- title: "Yelp Scraper or API: Reviews Without the Upkeep" description: "A Yelp scraper vs three 1-credit endpoints: a recorded Gary Danko search whose alias feeds the reviews call, with rating, text, created_at and next_after." url: https://perceptlayer.com/blog/yelp-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Yelp Scraper or API: Reviews Without the Upkeep 30 Oct 2026 Perceptlayer 8 min read A Yelp scraper is code that runs a search on Yelp, opens each business page and pulls the rating, review count, price level and reviews out of the HTML. You maintain the fetching, the parsing and the paging yourself. The alternative is three Yelp endpoints, `search`, `business` and `reviews`, that return the same data as JSON for 1 credit a call. This post runs both halves of a real job on recorded calls for Gary Danko in San Francisco, prices a daily watch on a set of restaurants, and gives a verdict per use case. ## Key takeaways - A recorded `GET /v1/yelp/search` for `gary danko` in `San Francisco, CA` returned the business with `alias: gary-danko-san-francisco`, `rating: 4.5`, `review_count: 6149` and `price: $$$$`, plus `has_more: true` and `next_page: 2`. - That same `alias` is the `business` value in the recorded `GET /v1/yelp/reviews` call, so one search resolves a business and every later reviews call reuses it. - Each review has `id`, `rating`, `text`, `language` and `created_at`, and sometimes `helpful_count` and `photos`. Each also has an `author` object with a name, location and profile link: drop it. - Watching 25 restaurants once a day costs 25 calls × 1 credit = 25 credits a day, 750 credits over 30 days. The 100 free credits on signup cover the 25 searches and the first 3 days; after that you need a pack. - A scraper's hardest part on a review site is incremental collection: knowing which reviews are new without re-reading the whole history. ## What would a Yelp scraper have to handle? A Yelp scraper has to do three things reliably: turn a name and a city into the right business, read that business's current numbers, and collect its reviews over time without missing or duplicating any. Each is a parser and a set of checks you write, run on a schedule and repair when the page it depends on changes. None of it is hard once; all of it is ongoing. Resolving the business is a search-results parser that has to pick the right listing out of several, because a name like "Gary Danko" also returns other restaurants. Reading the numbers is a second parser for the business page. Collecting reviews is the expensive part. A popular restaurant has thousands of reviews, so a daily run can't re-read them all; it needs a stable order, a stopping rule and a way to recognise reviews it already has. Then there's the operational layer: request pacing, retries, alerts when a run returns zero reviews for a business that had dozens, and storage that keeps reviewers' personal details out. Read Yelp's terms before you build a collector, and if a site blocks or challenges your traffic, stop rather than work around it. [Google Maps Scraper or Places Data API](https://perceptlayer.com/blog/google-maps-scraper-vs-api) covers the same trade-off for another local-business source. ## How does a search result connect to its reviews? A search result carries an `alias`, and the reviews endpoint takes that alias as its `business` parameter. The recordings show it: the search for `gary danko` returned `alias: gary-danko-san-francisco`, and the reviews call that followed used `business=gary-danko-san-francisco`. Both responses also carry the same `encid`, `WavvLdfdP6g8aZTtbBQHTw`, which is a stable key to store. This is the search request: ```bash curl "https://api.perceptlayer.com/v1/yelp/search?query=gary+danko&location=San+Francisco%2C+CA" \ -H "X-API-Key: $API_KEY" ``` And this is the recorded response, trimmed to the first result and the paging fields: ```json { "success": true, "data": { "query": "gary danko", "location": "San Francisco, CA", "page": 1, "results": [ { "position": 1, "encid": "WavvLdfdP6g8aZTtbBQHTw", "alias": "gary-danko-san-francisco", "name": "Gary Danko", "url": "https://www.yelp.com/biz/gary-danko-san-francisco", "rating": 4.5, "review_count": 6149, "price": "$$$$", "categories": [ { "alias": "newamerican", "title": "New American" }, … ], "address": { "line1": "800 N Point St", "city": "San Francisco" }, … }, … ], "has_more": true, "next_page": 2 }, … } ``` The second result in the recording is a different restaurant, Benu, at `position: 2` with `rating: 4.3` and `review_count: 1282`. So a search by name is also a small market snapshot: rating, volume, price level and categories for every business it returns. Match on `alias` or `encid`, not on `name`, when you decide which result is yours. Notice too that the alias is the last part of the business `url`, so if you already have Yelp links you can read the alias from them. ### What does the reviews call return? The reviews call takes the alias and a `sort`. The recorded request used `sort=newest`, and the two reviews came back with `created_at` of `2026-10-22T21:21:22Z` and then `2026-10-19T17:51:23Z`, newest first: ```bash curl "https://api.perceptlayer.com/v1/yelp/reviews?business=gary-danko-san-francisco&sort=newest" \ -H "X-API-Key: $API_KEY" ``` Trimmed, with each review's `author` object cut: ```json { "success": true, "data": { "business": { "encid": "WavvLdfdP6g8aZTtbBQHTw", "alias": "gary-danko-san-francisco", … }, "review_count": 6149, "total": 6150, "reviews": [ { "id": "4qYbbI9JbtCDUOtQRcJfDA", "url": "https://www.yelp.com/biz/gary-danko-san-francisco?hrid=4qYbbI9JbtCDUOtQRcJfDA", "rating": 5, "text": "The staff is top notch.\nI really like the way their menu works, where you can pick any 3, 4, or 5 courses, fixed price. The cheese cart is ah-mazing, and reall…", "language": "en", "created_at": "2026-10-22T21:21:22Z", … }, { "id": "4O8qwZF2l2mprg3FQzWgTw", … "rating": 5, "language": "en", "created_at": "2026-10-19T17:51:23Z", … "helpful_count": 1, "photos": [ "https://s3-media0.fl.yelpcdn.com/bphoto/EbhMoz6JQkscGoMgfwV5qQ/o.jpg", … ] } ], "has_more": true, "next_after": "eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoib2Zmc2V0Iiwib2Zmc2V0Ijo5fQ" }, "meta": { "endpoint_family": "business_reviews", "billable": true } } ``` Three things to plan for. `helpful_count` and `photos` appear on the second review and not the first, so treat both as optional. `review_count` is `6149` while `total` is `6150`; they come from the same response and differ by one, so decide which you report and store both. And the reviews endpoint takes an `after` parameter while the response returns `has_more` and `next_after`; pass the cursor back in the playground to see the next page before you build a loop on it. ## How do the two routes compare on a daily watch? A scraper trades credits for engineering time, terms risk and parsers that break; the endpoints trade a credit per successful call for named JSON fields. The table compares them on a recurring job: watching a fixed set of restaurants for new reviews and rating changes. | | DIY Yelp scraper | Yelp endpoints | | --- | --- | --- | | Finding the business | Parse search results, pick the right one | `search` with `query` and `location`; match on `alias` or `encid` | | Business numbers | Parsed from the page | `rating`, `review_count`, `price`, `categories`, `address` in search results; `business` for one business | | Reviews | Parsed per page, order and paging found by you | `reviews[]` with `id`, `rating`, `text`, `language`, `created_at` | | Sorting | Whatever the page offers | `sort`: relevance, newest, oldest, highest, lowest or elite | | Paging | Your code follows the pages | `page` on search; `after` on reviews, with `has_more` and `next_after` in the response | | Personal data | Mixed into the HTML you store | In a separate `author` object you can drop in one line | | When the page changes | Parsers return blanks until fixed | Same JSON fields; no parser of yours to fix | | Failures | Yours to detect | HTTP status and error code; a failed call costs 0 credits | | Cost | Hosting and your time | 1 credit per successful call | ### How much does watching a set of restaurants cost? Cost follows calls. Resolving each business is one search call, done once, and watching it is one reviews call per day with `sort=newest`. For a competitive set of 25 restaurants that's 25 credits once, then 25 calls × 1 credit = 25 credits a day. Over 30 days the watch is 750 credits. The 100 free credits you get once on signup cover the 25 searches and the first 3 days of the watch; the rest needs a pack, and the 10,000-credit Starter pack covers a year of it. A daily call returns the newest page, so a restaurant that gets more new reviews in a day than one page holds needs a second call with the cursor, at 1 more credit. Check your busiest one in the playground to see whether that happens. A weekly market snapshot, one search per cuisine and neighbourhood, adds 1 credit per page of results. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. A one-off backfill is a different job: thousands of reviews per restaurant means many pages per business. Price it from the page size you see in the playground before you start, since the cost is the number of pages × 1 credit. ## How do you collect only new reviews? Store each review's `id` and stop when you reach one you already have. With `sort=newest`, the newest reviews come first, so a daily run reads the first page, inserts the reviews it hasn't seen, and is done. The `id` is the deduplication key; `created_at` is the timestamp to analyse. This Python script does that with `sqlite3`, reading only fields that appear in the recordings and never touching `author`: ```python import os import sqlite3 import requests API = "https://api.perceptlayer.com/v1/yelp/reviews" HEADERS = {"X-API-Key": os.environ["API_KEY"]} BUSINESSES = ["gary-danko-san-francisco"] db = sqlite3.connect("yelp_reviews.db") db.execute( """CREATE TABLE IF NOT EXISTS reviews ( id TEXT PRIMARY KEY, business TEXT, rating INTEGER, language TEXT, created_at TEXT, text TEXT)""" ) for alias in BUSINESSES: r = requests.get(API, params={"business": alias, "sort": "newest"}, headers=HEADERS, timeout=60) r.raise_for_status() data = r.json()["data"] new = 0 for review in data.get("reviews", []): # review["author"] holds a name, location and profile link: never stored. cur = db.execute( "INSERT OR IGNORE INTO reviews VALUES (?, ?, ?, ?, ?, ?)", (review["id"], alias, review.get("rating"), review.get("language"), review.get("created_at"), review.get("text")), ) new += cur.rowcount print(alias, "new reviews:", new, "review_count:", data.get("review_count")) db.commit() ``` If `new` equals the number of reviews on the page, every review on it was new and older unseen ones may be on the next page; that's the case for a cursor call. A failed request raises before anything is inserted, costs nothing, and returns an error code from the [errors docs](https://docs.perceptlayer.com/errors), such as `rate_limited` (429) with a `Retry-After` header. ## Which route fits your job? Pick by frequency and purpose: a scraper's cost is upkeep, the endpoints' cost is calls. These verdicts assume the job repeats; for a look at three restaurants before dinner, open Yelp in a browser. - **Watching your own locations or a competitive set**: resolve each alias once with `search`, then call `reviews` with `sort=newest` daily and store by `id`. 1 credit per business per day. - **Tracking rating and volume across a market**: run `search` per cuisine and area on a schedule and store `rating`, `review_count` and `price` by `encid`. No reviews calls needed. - **Reading what low ratings say**: try `sort=lowest` in the playground, or filter stored reviews on `rating`, and group the `text` by theme. - **Multilingual analysis**: keep the `language` field on every row and route text to the right model or translator. - **An AI agent that answers "is this place good?"**: give it the Yelp endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls `search` and `reviews` instead of reading pages. - **Learning to scrape**: build against a practice site, not a review platform with real people's posts. [Booking.com Reviews API](https://perceptlayer.com/blog/booking-com-reviews-api-json) covers hotel reviews, and the [reviews APIs](https://perceptlayer.com/verticals/reviews) page lists the other review sources. To check the fields on a business you care about, run `search` and then `reviews` in the playground on the [Yelp API page](https://perceptlayer.com/apis/yelp), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Yelp **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/yelp) ## Frequently asked questions ### Is scraping Yelp allowed? That depends on Yelp's terms, how you store and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks or challenges. Business facts and review text are lower risk than personal data; leave reviewers' names, locations and profile links out of anything you keep. ### How do I find the business value for the reviews endpoint? Use the `alias` from a search result. The recorded search for `gary danko` in `San Francisco, CA` returned `alias: gary-danko-san-francisco`, and the recorded reviews call used exactly that as `business`. The alias is also the last part of the business `url`, so an existing Yelp link gives it to you without a search. ### Why do review\_count and total differ? In the recorded reviews response, `review_count` is `6149` and `total` is `6150`, and the search result for the same business also shows `review_count: 6149`. The response doesn't say why they differ. Store both with the fetch date, and pick one consistently for any chart or report. ### Does a failed Yelp call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A client timeout is the exception to watch: the request may have succeeded and been billed, so retry carefully. ### How fast can I run a daily Yelp job? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so 25 daily reviews calls finish in under a minute. Paying accounts run at least 5 requests a second. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. yelp reviews scraping local business restaurants ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Aug 2026 Updated 26 Oct 2026 Perceptlayer 6 min read ## [Yelp Reviews API: Business Search and Reviews as JSON](https://perceptlayer.com/blog/yelp-reviews-api-json) Three Yelp endpoints return search results, business details and reviews as JSON, 1 credit per call. Parameters, a real response and a cost example. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 7 min read ## [Trustpilot Scraper or API: Ratings and Review History](https://perceptlayer.com/blog/trustpilot-scraper-vs-api) A Trustpilot scraper vs a 1-credit company-reviews call: the recorded Amazon response, its star breakdown, and 2,340 pages × 1 credit for a full history. --- title: "Flight API: Google Flights and Kiwi Data as JSON" description: "Compare Google Flights and Kiwi.com flight search as JSON: price, stops, duration, CO2 or baggage per itinerary, date-range calls, 1 credit per route per date." url: https://perceptlayer.com/blog/flight-api-comparison --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Flight API: Google Flights and Kiwi Data as JSON 29 Oct 2026 Perceptlayer 7 min read A flight API takes an origin, a destination and a date and returns itineraries with a price, carrier, times, stops and duration. Google Flights' `one-way` endpoint returns those plus CO2 emissions and a `booking_token`; Kiwi.com's `flights-search` returns them plus baggage allowances and a `booking_url`. Both charge 1 credit per call, so one route on one date costs 1 credit. For a range of dates, each has a calendar-style endpoint that takes a start and end date in one call. ## Key takeaways - `GET /v1/google-flights/one-way?origin=JFK&destination=LAX&departure_date=2026-12-15` returns `flights[]` with `price`, `currency`, `total_duration_minutes`, `stops`, `airline_name`, `emissions` and per-leg flight numbers and times. - `GET /v1/kiwi/flights-search?origin=LON&destination=BCN&departure_date=2026-12-04` returns `data.itineraries[]` with `price.amount`, `price_eur`, `duration`, `stops`, `carriers[]`, a `baggage` object and a `booking_url`. - Kiwi accepted the city code `LON` and returned departures from Luton and Stansted; Google Flights' `origin` takes up to 3 characters and the recording used the airport code `JFK`. - For date ranges, Google Flights has `date-range` ( `from_date`, `to_date`, `trip_duration`) and Kiwi has `calendar-cheapest-dates` and `calendar-price-graph` ( `start_date`, `end_date`, nights). We have no recordings of those, so check their output in the playground. - Checking 20 routes for 30 departure dates every day with one-way calls costs 20 × 30 × 30 = 18,000 credits a month; one date-range call per route per day costs 600. ## What should a flight API return per itinerary? A flight API is useful when each itinerary carries enough to compare and act on without another call: a price with its currency, the carrier, departure and arrival airports and times, the number of stops, the total duration, and a handle to book or fetch details. Both recorded responses carry all of these, with different field names and different extras. The extras decide which source fits. Google Flights adds an `emissions` object per flight, with grams of CO2 and a `difference_percent` against a typical figure. Kiwi.com adds a `baggage` object, with how many hand and checked bags are included, and `travel_hacks` flags named `virtual_interlining` and `hidden_city`. If your product shows bag costs, Kiwi's fields matter; if it ranks by emissions, Google's do. Times need care in both. The recorded departure and arrival times are local clock times with no offset ( `2026-12-15T08:01:00`, `2026-12-04T15:35:00`), so subtracting them doesn't give the flight time across time zones. Use the duration field instead. ## What does Google Flights' one-way search return? Google Flights' one-way search returns a `flights` array, each item a priced itinerary with its legs, plus a `search_metadata` object that echoes the search as it ran. It needs `origin`, `destination` and `departure_date`, and takes filters such as `max_stops`, `cabin_class`, `sort_by` (one of `top_flights`, `cheapest`, `departure_time`, `arrival_time`, `duration`, `emissions`), `airlines[]` and `max_price`. A successful call costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/google-flights/one-way?origin=JFK&destination=LAX&departure_date=2026-12-15" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to the first flight and part of the metadata: ```json { "flights": [ { "price": 179, "currency": "USD", "total_duration_minutes": 384, "stops": 0, "airline_name": "JetBlue", "emissions": { "co2_grams": 426000, "co2_kilograms": 426, "typical_co2_grams": 344000, "typical_co2_kilograms": 344, "difference_percent": 24 }, "booking_token": "CjRISVFvemhYdy1QZTBBQTR3SXdCRy0tLS0tLS0tLWVqY3J5N0FBQUFBR3JhOFJBQUFyOGdBEgZCNjIyMjMaCwiwiwEQAhoDVVNEOBxwsIsB", "legs": [ { "airline": "B6", "flight_number": "2223", "departure_airport": "JFK", "arrival_airport": "LAX", "departure_time": "2026-12-15T08:01:00", "arrival_time": "2026-12-15T11:25:00", "duration_minutes": 384 } ] }, … ], "search_metadata": { "origin": "JFK", "destination": "LAX", "departure_date": "2026-12-15", … "cabin_class": "Economy", … "max_stops": "Any number of stops", … "currency": "USD", "response_time_ms": 5598 } } ``` `total_duration_minutes` is 384, which is 6 hours 24 minutes: the 3 hours 24 minutes between the local times plus the 3-hour difference between New York and Los Angeles. Each flight has a `booking_token`, and the `booking-details` endpoint takes a required `booking_token` along with the route, date, `airline` and `flight_number`; the names match, but we haven't recorded that call. The `round-trip` endpoint adds a required `return_date` and an optional `departure_token`. ## What does Kiwi.com's flight search return? Kiwi.com's flight search returns `data.itineraries`, each with an `id`, a `price` object, `duration`, `stops`, `carriers`, `departure` and `arrival` objects, `segments`, a `baggage` object and a `booking_url`. It also echoes the search: `trip_type`, `currency`, `sort`, `limit` and `total_available`. Required parameters are `origin`, `destination` and `departure_date`; `return_date`, `max_stops`, `sort` ( `quality`, `price` or `duration`) and `carriers[]` are optional. Each call costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/kiwi/flights-search?origin=LON&destination=BCN&departure_date=2026-12-04" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to the first itinerary: ```json { "success": true, "data": { "trip_type": "one_way", "origin": "LON", "destination": "BCN", … "currency": "EUR", "sort": "quality", … "total_available": 23, "itineraries": [ { "id": "ItineraryOneWay:eyJwcm92aWRlcnMiOiJLSVdJLUJBU0lDOktJV0kiLCJyb3V0ZV9kYXRhIjoiRlI6NzgwNzpMVE46MTc5NjM5ODUwMDpCQ046MTc5NjQwNjMwMDplY29ub215OkZhbHNlOjo6IiwicHJpY2Ui…", … "price": { "amount": 29, "currency": "EUR", "formatted": "29 €" }, "price_eur": 29, "duration": 7800, … "baggage": { "hand_bags_included": 0, "checked_bags_included": 0, "personal_item_included": 1, … }, "booking_url": "https://www.kiwi.com/en/booking/?direct=true&locale=en¤cy=eur&passengers=1-0-0&token=Hhoyto0aDRzGf7RBtr6qW50xdrd381w4wOMBtYctggZ7a2BQwGlN4QCwjESAZb1G5zED3…", "stops": 0, "carriers": [ { "code": "FR", "name": "Ryanair", "icao": "RYR" } ], "departure": { "airport_code": "LTN", "airport": "Luton", "city": "London", … "local_time": "2026-12-04T15:35:00" }, "arrival": { "airport_code": "BCN", … "local_time": "2026-12-04T18:45:00" }, … }, … ] }, … } ``` `duration` is 7800. The local times are 3 hours 10 minutes apart, and Barcelona's clock is an hour ahead of London's in December, so the flight takes 2 hours 10 minutes, which is 7,800 seconds. The second recorded itinerary leaves from Stansted, so the city code `LON` covers more than one airport. Each itinerary's `id` and the `flights-detail` endpoint's required `itinerary_id` share a name; we haven't recorded that call. ## How do the itinerary fields compare? The two responses carry the same core facts under different names, and each has one set of extras the other lacks. Map them once into your own schema and the rest of your code doesn't need to know which source a fare came from. The table lists the field for each concept in the recorded responses. | Concept | Google Flights `one-way` | Kiwi.com `flights-search` | | --- | --- | --- | | Price | `price` (number) and `currency` | `price.amount`, `price.currency`, `price.formatted`, plus `price_eur` | | Carrier | `airline_name`; `legs[].airline` code | `carriers[].name`, `code`, `icao` | | Flight number | `legs[].flight_number` ( `2223`) | `segments[].flight_number` ( `FR7807`) | | Airports | `legs[].departure_airport`, `arrival_airport` | `departure.airport_code`, `arrival.airport_code`, with city and country | | Times | `legs[].departure_time`, `arrival_time` (local, no offset) | `departure.local_time`, `arrival.local_time` | | Duration | `total_duration_minutes` (minutes) | `duration` (7800 for a 2 h 10 min flight) | | Stops | `stops` | `stops` | | Extras | `emissions` with CO2 and `difference_percent` | `baggage`, `travel_hacks` | | Next step | `booking_token` | `booking_url`, `id` | | Origin input | Up to 3 characters ( `JFK`) | City code accepted ( `LON`) | | Endpoints | 7 | 7 | | Cost | 1 credit per call | 1 credit per call | This Python maps both into one row shape, using only those fields: ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, params): r = requests.get(BASE + path, params=params, headers=HEADERS, timeout=60) r.raise_for_status() return r.json() def google(origin, dest, date): data = get("/v1/google-flights/one-way", {"origin": origin, "destination": dest, "departure_date": date}) for f in data["flights"]: yield ("google", date, f["price"], f["currency"], f["stops"], f["airline_name"], f["total_duration_minutes"]) def kiwi(origin, dest, date): data = get("/v1/kiwi/flights-search", {"origin": origin, "destination": dest, "departure_date": date}) for it in data["data"]["itineraries"]: yield ("kiwi", date, it["price"]["amount"], it["price"]["currency"], it["stops"], it["carriers"][0]["name"], it["duration"] // 60) rows = list(google("JFK", "LAX", "2026-12-15")) + list(kiwi("LON", "BCN", "2026-12-04")) for row in sorted(rows, key=lambda r: r[2]): print(row) ``` Converting Kiwi's `duration` with `// 60` assumes seconds, which matches the recorded flight; check it against a second route before you rely on it. The two sources also price in different currencies here (USD and EUR), so convert or pass `currency` before you compare prices across them. ## How do you search a range of dates? You have two options: one one-way call per date, or one calendar call per route that takes a start and end date. Google Flights' `date-range` endpoint requires `origin`, `destination`, `from_date` and `to_date`, and takes `trip_duration` and `max_stops`. Kiwi.com's `calendar-cheapest-dates` requires `origin`, `destination`, `start_date` and `end_date`, with optional `nights_min` and `nights_max`; `calendar-price-graph` makes the nights required. We haven't recorded any of the calendar endpoints, so we don't describe their fields, how wide a window one call answers, or whether they return full itineraries. Run one in the playground on the [Google Flights API page](https://perceptlayer.com/apis/google-flights) or the [Kiwi.com API page](https://perceptlayer.com/apis/kiwi) first. The pattern that keeps costs down is a calendar call to find the cheap dates, then one-way calls only for those. Kiwi.com also has `explore-price-map` and `flights-one-per-city`, which take an origin without a required destination, for "where can I fly from here" questions. For a third source with a monthly fare calendar, see [Skyscanner API: Place Lookup and Fare Calendars](https://perceptlayer.com/blog/skyscanner-api-flight-search). ## What does a route cost per day? Cost is 1 credit per successful call on every endpoint here, so one route on one departure date is 1 credit with a one-way search, and one route over a window is 1 credit per calendar call. Failed calls cost nothing and return `X-Credits-Used: 0`. What you pay is set by how many calls your schedule makes. | Schedule | Calls a month | Credits | | --- | --- | --- | | 5 routes × 1 date, daily, one source | 5 × 30 = 150 | 150 | | 5 routes on both sources, daily | 5 × 2 × 30 = 300 | 300 | | 20 routes × 30 dates, daily, one-way calls | 20 × 30 × 30 = 18,000 | 18,000 | | 20 routes, one date-range call each, daily | 20 × 30 = 600 | 600 | | The 600 above, plus 3 one-way checks per route daily | 600 + 20 × 3 × 30 = 2,400 | 2,400 | The last row is the calendar-then-detail pattern: 2,400 credits against 18,000 for checking every date. It's past the 100 free credits on signup, and the Starter pack's 10,000 credits cover it for four months. Purchased credits last 12 months; [pricing](https://perceptlayer.com/pricing) shows what credits cost. The recorded Google Flights call reports `response_time_ms: 5598`, so allow a generous client timeout; a call that timed out on your side may still have succeeded and been billed, because requests have no idempotency key. ## Which one should you use? Pick by the extra field your product needs and by the trip shape. Both cover a priced itinerary per route and date at the same cost; the differences are bags versus emissions, airport versus city origins, and a token versus a link for the next step. - **Fare tracking on fixed routes**: either works. Use the date-range or calendar endpoint daily, then one-way for the cheap dates. Store price, currency, stops and duration with the time of the call. - **Showing total trip cost with bags**: Kiwi.com. The `baggage` object says what's included and lists checked-bag prices. - **Ranking by emissions**: Google Flights, with `emissions.co2_kilograms` and `difference_percent`, or `sort_by=emissions`. - **City-to-city searches across several airports**: Kiwi.com, which took `LON` and returned Luton and Stansted. - **"Where can I go from here" questions for an agent**: Kiwi.com's `explore-price-map` or `flights-one-per-city`, through the MCP server; the [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. - **A booking engine**: neither. These endpoints return search data as found at the time of the call; booking happens on the site. To compare on your own route, run `one-way` in the playground on the [Google Flights API page](https://perceptlayer.com/apis/google-flights) and `flights-search` on the [Kiwi.com API page](https://perceptlayer.com/apis/kiwi). When the fields fit, [get a free API key](https://perceptlayer.com/signup). More guides like this are in the [API guides](https://perceptlayer.com/blog/category/api-guides) category and on the [travel APIs](https://perceptlayer.com/verticals/travel) page. ## APIs in this post - [Google Flights **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-flights) - [Kiwi.com **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/kiwi) ## Frequently asked questions ### Is there a free flight API? Every account gets 100 free credits after verifying an email address, with no credit card. A Google Flights or Kiwi.com search costs 1 credit, so that's 100 searches, enough to test a fare tracker on a few routes. Failed calls cost nothing. Beyond that, credits come in prepaid packs; [pricing](https://perceptlayer.com/pricing) has what they cost. ### Do the prices include baggage? The recorded Kiwi.com itinerary includes a `baggage` object showing 0 checked bags and 1 personal item included, with a list of checked-bag prices, so the headline price there covers no checked bag. Google Flights' one-way endpoint takes an `include_baggage` parameter, but we haven't recorded it, so test it in the playground. ### Are the times in the response local or UTC? The recorded departure and arrival times carry no offset, and they read as local clock times at each airport. Both durations match that reading once you allow for the time difference. Store the airport code with each time and use `total_duration_minutes` or `duration` for the flight length rather than subtracting times. ### Can I book a flight through these endpoints? No. The endpoints return search data. Kiwi.com itineraries include a `booking_url` that points to the booking page on kiwi.com, and Google Flights results carry a `booking_token` that the `booking-details` endpoint takes as a parameter. Booking itself happens on the site, under its own terms. ### What happens when a flight search fails? A failed call returns an HTTP status and a JSON body with `error.code`, `error.message` and `request_id`, and costs nothing. A 429 or 503 response carries `Retry-After` with the seconds to wait. When credits run out, calls return `insufficient_credits` (402). The [errors docs](https://docs.perceptlayer.com/errors) list every code. flight api google flights kiwi.com flight prices travel data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Nov 2026 Perceptlayer 9 min read ## [Google Flights Scraper or API: What You Get](https://perceptlayer.com/blog/google-flights-scraper-vs-api) Compare a Google Flights scraper with 9 endpoints at 1 credit a call: a recorded JFK to LAX search with price, stops, CO2 and a booking\_token per flight. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Sept 2026 Perceptlayer 6 min read ## [Kiwi.com API: Search Fares and Cheapest Dates as JSON](https://perceptlayer.com/blog/kiwi-flights-api-cheapest-dates) Search Kiwi.com fares by origin, destination and date, then scan a window with calendar-cheapest-dates. A recorded London–Barcelona response and costs. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Booking.com Scraper or API: What You Get](https://perceptlayer.com/blog/booking-com-scraper-vs-api) A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price. --- title: "Google Play Scraper or API: Reviews and App Data" description: "A Google Play scraper vs one 1-credit call: the recorded Spotify reviews response with rating, likes, iso_date, a star histogram and a page token." url: https://perceptlayer.com/blog/google-play-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Play Scraper or API: Reviews and App Data 29 Oct 2026 Perceptlayer 8 min read A Google Play scraper is a program that loads an app's store page and its reviews, then pulls the rating, install count, update date and review text out of what comes back. You write and repair every part of it. The alternative is `GET /v1/google-play/product-reviews`, which returns the app's metadata, its star histogram and a page of reviews as JSON for 1 credit a call. This post compares the two on a recorded Spotify call, works out the cost per app tracked, and gives a verdict per use case. ## Key takeaways - One recorded call to `/v1/google-play/product-reviews` with `product_id=com.spotify.music` returned app-level data ( `product_info.rating: 4.3`, `product_info.reviews: 36524909`, `updated_on`) and a `reviews[]` page in the same response. - Each review carries `id`, `rating`, `snippet`, `likes`, `date` and `iso_date`. In the recording, a review's `title` holds the reviewer's display name, so drop it along with `avatar` before you store anything. - A scraper for the same data has two jobs that never finish: getting past the first screen of reviews, and noticing when a parser quietly returns empty fields. - Watching 50 apps for new reviews once a day is 50 calls × 1 credit = 50 credits a day, or 1,500 credits over 30 days, inside the Starter pack's 10,000. - The endpoint's options are enumerated: `sort_by` takes values including `newest`, `rating` and `most_relevant`, `rating` takes `1` to `5`, and `platform` takes phone, tablet, tv, chromebook, watch or car. ## What does a Google Play scraper have to do? A Google Play scraper does four separate jobs, and each one is yours to keep working: find the app, read the app's own facts, page through its reviews, and keep a record of what changed. The first is easy because an Android app has a package name, such as `com.spotify.music`, that identifies it. The other three are where the work is. Reading the app's facts means parsing a rating, a review count, an install band, a content rating, an update date and a category out of a store page. Paging through reviews is harder. A popular app has far more reviews than one page view shows, so your scraper needs some way to get the next batch, the one after that, and to put them in date order. Whatever mechanism the page uses for that is yours to find, and yours to fix when it changes. The last job is the one teams underestimate. A scraper rarely fails loudly: a moved element gives you `null` ratings or zero reviews for an app that had hundreds yesterday, and the run still exits cleanly. You need checks that compare today's counts with yesterday's. Add request pacing, retries, storage and a schedule, and a Play scraper is a small service. Before you build one, read Google Play's terms, and don't work around blocks or challenges if you meet them. ## What does one reviews call return? One call to the reviews endpoint returns three kinds of data at once: the app's identity and store facts, an aggregate star breakdown, and a page of individual reviews with a token for the next page. A scraper would assemble that from several parsed sections of a page. Here it's one request with the package name and the store: ```bash curl "https://api.perceptlayer.com/v1/google-play/product-reviews?product_id=com.spotify.music&store=apps&num=20" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed. Reviewers' names, which appear in each review's `title`, and their avatars are cut: ```json { … "app": { "app_id": "com.spotify.music", "title": "Spotify: Music and Podcasts", "developer": "Spotify AB", … }, "product_info": { "title": "Spotify: Music and Podcasts", … "rating": 4.3, "reviews": 36524909, "downloads": "1B+", … }, "about_this_app": { … "released_on": "May 27, 2014", "updated_on": "Oct 21, 2026", "downloads": "1,000,000,000+", "content_rating": "Teen", … }, "categories": [ { "name": "Music & Audio", … "category_id": "MUSIC_AND_AUDIO" } ], … "ratings": [ { "stars": 1, "count": 3717244 }, { "stars": 2, "count": 1064474 }, … ], "reviews": [ { "id": "6b8cd845-6fcd-4296-b05e-9e1b3feada62", … "rating": 1, "snippet": "Spotify has a new, horrendous feature where the ending to the song that you are listening to gets cut off by the middle of the next song. I have had spotify for…", "likes": 491, "date": "September 15, 2026", "iso_date": "2026-09-15T22:20:33Z" }, { "id": "31dd5f9b-bd5f-4e2f-9465-71f707e14285", … "rating": 2, "snippet": "I don't know what you guys did in the last update, but now when I listen to any podcast, it plays the list opposite. If I set the podcast from oldest to newest,…", "likes": 390, "date": "September 18, 2026", "iso_date": "2026-09-18T06:24:22Z" } ], … "pagination": { "next_page_token": "CrABIqcBAV8d1P3Y4jmqTOdZ4xBJ7QnJyYmH9-QZ8psto-gkJJgGAGdBmyMjzuevISIZC-cPmxGWGPNbx6bIhfWsgxAO49jzTgsGLftwszEwCFE3Fi_vfO00Nsb7-YIFPGW7ebKtcGy5BA2Ma_edk5CuQ5Z0N8VD…" } } ``` ### Which parts of the response replace which parser? Each block in the response maps to a piece of scraper code you no longer write. The table pairs them, using field names from the recording: | Scraper job | Field in the response | | --- | --- | | Identify the app | `app.app_id`, `app.title`, `app.developer` | | Store facts | `product_info.rating`, `product_info.reviews`, `about_this_app.downloads`, `about_this_app.updated_on`, `categories[].category_id` | | Star breakdown | `ratings[]` with `stars` and `count` | | Review text and score | `reviews[].rating`, `reviews[].snippet`, `reviews[].likes` | | Review timestamps | `reviews[].iso_date` (and a display `date`) | | Next batch | `pagination.next_page_token` | Two details are worth knowing before you build on it. `iso_date` is a proper UTC timestamp, so sort and compare on it rather than the display `date`. And the endpoint takes a `next_page_token` parameter with the same name as the response field; run one call in the playground and pass the token back to see the next page before you write a loop around it. ## How do a scraper and the endpoint compare? A scraper costs engineering time and carries terms and blocking risk; the endpoint costs a credit per successful call and removes the parsing. The comparison below assumes a recurring job, such as watching a set of apps for new reviews every day. For reading one app's reviews once, the store page in a browser is fine and neither option is needed. | | DIY Google Play scraper | Google Play endpoints | | --- | --- | --- | | Setup | Fetcher, page parsers, review pager, storage, change monitor | API key in the `X-API-Key` header | | App facts | Parsed from the page, if the layout matches your selectors | `product_info`, `about_this_app`, `categories` as named fields | | Reviews | Each batch fetched and parsed by your code | `reviews[]` with `id`, `rating`, `snippet`, `likes`, `iso_date` | | Sorting and filters | Whatever the page lets you drive | `sort_by`, `rating`, `platform`, `hl`, `gl` | | Next page | Your code finds and follows it | `pagination.next_page_token` | | When the page changes | Fields go empty until you fix the parser | You read the same JSON fields; no parser of yours to fix | | Blocks and challenges | Yours to handle, and not to work around | A failed call returns an error code and costs 0 credits | | Speed | As fast as you can fetch politely | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### What does tracking an app cost per day? On the endpoint, cost follows calls, and one call returns both the app's current facts and its newest reviews. If you call once per app per day, the cost is one credit per app per day. That single call also refreshes the app's rating, review count and update date, so you don't pay twice for a snapshot and a review feed. The arithmetic for a portfolio of 50 apps, yours and your competitors': 50 calls × 1 credit = 50 credits a day. Over 30 days that's 1,500 credits, more than the 100 free credits on signup and inside the Starter pack's 10,000. If a busy app gets more new reviews a day than one page holds, follow the page token for that app only; each extra page is one more credit. Check in the playground how many reviews a page returns for your `num` before you size the budget. Search costs the same. `GET /v1/google-play/search` takes `q` and an optional `store`, so finding candidate competitors for a keyword is 1 credit per query. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## How do you store reviews without personal data? Keep the review and drop the person. In the recorded response each review has a `title` that holds the reviewer's display name and an `avatar` URL, and neither is needed to analyse what users say about an app. Store the review `id`, `rating`, `snippet`, `likes` and `iso_date`, plus the app id and the day you fetched it. That's enough for sentiment, release tracking and complaint clustering. This Python script fetches the newest reviews for a list of apps and appends them to a CSV, reading only fields that appear in the recording: ```python import csv import datetime import os import requests API = "https://api.perceptlayer.com/v1/google-play/product-reviews" HEADERS = {"X-API-Key": os.environ["API_KEY"]} APPS = ["com.spotify.music"] today = datetime.date.today().isoformat() with open("play_reviews.csv", "a", newline="") as f: out = csv.writer(f) for app_id in APPS: r = requests.get( API, params={"product_id": app_id, "store": "apps", "sort_by": "newest", "num": 20}, headers=HEADERS, timeout=60, ) r.raise_for_status() body = r.json() info = body.get("product_info", {}) for review in body.get("reviews", []): # Leave out review["title"] and review["avatar"]: they identify the reviewer. out.writerow([ today, app_id, info.get("rating"), review.get("id"), review.get("rating"), review.get("iso_date"), review.get("likes"), review.get("snippet"), ]) ``` Deduplicate on the review `id` when you load the CSV, because consecutive days can return the same newest reviews. `requests` raises on a non-2xx status, and a failed call costs nothing; the [errors docs](https://docs.perceptlayer.com/errors) list the codes, such as `rate_limited` (429) with a `Retry-After` header. ## Which route should you choose? Choose by how often you need the data and what you'll do with it. Upkeep dominates a scraper's cost; calls dominate the endpoint's. These verdicts assume the job repeats. - **Watching reviews after each release**: call `product-reviews` daily with `sort_by=newest` and chart `rating` against `iso_date` around `about_this_app.updated_on`. Both recorded reviews mention a recent change, which is the signal this job looks for. - **Tracking competitors' ratings and install bands**: the same call gives `product_info.rating`, `product_info.reviews` and `about_this_app.downloads`. One credit per app per day, no review paging needed. - **Mining one-star complaints**: try `rating=1` in the playground, confirm every returned review has `rating: 1`, then cluster the `snippet` text. - **Comparing device experiences**: run the call once per `platform` value (phone, tablet, chromebook and so on) and compare the review sets you get back. - **Finding apps to track**: `GET /v1/google-play/search` with `q` and `store=apps`, then keep the package names you want. - **An agent answering questions about apps**: connect the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so the agent calls the endpoint instead of browsing store pages. For the same build-or-call question on another source, see [Zillow Scraper or API](https://perceptlayer.com/blog/zillow-scraper-vs-api) and [Steam API: Game Details, Prices and Reviews](https://perceptlayer.com/blog/steam-api-store-data). The [apps and media APIs](https://perceptlayer.com/verticals/apps) page lists related sources. To check the fields for your own apps, run `product-reviews` with your package name in the playground on the [Google Play API page](https://perceptlayer.com/apis/google-play), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Google Play **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/google-play) ## Frequently asked questions ### Is scraping Google Play allowed? That depends on Google Play's terms, how you use and store the data, and the law where you operate, so read the terms and take legal advice for commercial use. Don't get around blocks, challenges or other protections. App facts and review text are lower risk than personal data; leave reviewers' names and avatars out of anything you keep. ### Which parameter identifies the app? The recorded call used `product_id=com.spotify.music`, the app's package name, with `store=apps`. The endpoint also accepts `id` and `url` parameters, and the response echoes the package name back as `app.app_id` and `product_info.product_id`. Try `url` with a store link in the playground if you only have links. ### How do I get only the newest or lowest-rated reviews? Use the `sort_by` parameter, which takes `newest`, `rating`, `most_relevant`, `1`, `2` or `3`, and the `rating` parameter, which takes `1` to `5`. Run a call in the playground and check the order of `iso_date` and the `rating` values to confirm the behaviour you need. Each call costs 1 credit whatever the filters, and a failed call costs nothing. ### Can I get reviews in other languages or countries? The reviews endpoint takes `hl` (up to 10 characters) and `gl` (up to 2 characters), and the recorded response reports that it ran with `hl` set to `en` and `gl` set to `US`. Try other values in the playground and compare what comes back, and store both values with each row so runs with different settings stay apart. ### How fast can a daily Google Play job run? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 50-app daily run takes under a minute. Paying accounts run at least 5 requests a second. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. google play app reviews scraping android apps review monitoring ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Sept 2026 Updated 10 Nov 2026 Perceptlayer 6 min read ## [Google Play Store API: App Reviews and Details as JSON](https://perceptlayer.com/blog/google-play-store-api) Get Google Play app reviews, details and search results as JSON with one GET call. Parameters, a recorded Spotify response and 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 9 min read ## [Google Reviews Scraper or API: What You Get](https://perceptlayer.com/blog/google-reviews-scraper-vs-api) A Google reviews scraper versus the reviews endpoint: rating, timestamp, review\_text and a nextPage token per call, at 1 credit per business checked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "Stock Price API: Quotes and History as JSON | Perceptlayer" description: "Get a stock price as JSON with GET /v1/google-finance/quote: current_price, price_change, key stats and a Python watchlist loop at 1 credit per symbol." url: https://perceptlayer.com/blog/stock-price-api-google-finance --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Stock Price API: Quotes and History as JSON 29 Oct 2026 Perceptlayer 9 min read A stock price API returns a ticker's price as JSON you can store and compare. With Perceptlayer, one `GET /v1/google-finance/quote` call with a `symbol` returns `current_price`, `price_change`, `percent_change`, the session in `market.trading` and key stats such as `previous_close`, for 1 credit per successful call. `historical` and `intraday` cover price series. This guide shows the request, the price fields in a recorded AAPL quote, a Python watchlist loop and the cost per symbol per day. ## Key takeaways - `GET /v1/google-finance/quote` needs only `symbol` (up to 20 characters); `exchange` and `period_type` ( `quarterly` or `annual`) are optional. Each successful call costs 1 credit. - The recorded AAPL quote has numeric `current_price` (347.725), `price_change` (-0.49) and `percent_change` (-0.14), plus a `market` block with `trading: "Extended Hours"` and `extracted_price` 347.2001. - Key stats such as `previous_close`, `day_range` and `market_cap` are display strings ( `"$348.22"`, `"5.07T USD"`), so parse them before you compute with them. - One quote per symbol per trading day is 1 credit per symbol per day: 40 symbols × 21 trading days = 840 credits a month; the 100 free credits on signup cover the first two trading days. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a retry after a 429 is billed only when it succeeds. ## Which endpoints return stock prices? Three of the six Google Finance endpoints return prices for a ticker: `quote` for a snapshot with key stats and financials, `historical` for a series over a date window, and `intraday` for the current day's movement. All three take a required `symbol` and an optional `exchange`. The other three help you find symbols and read the wider market: `search` takes a free-text `q`, `markets` lists movers by `trend`, and `indices` returns index levels. Every endpoint is a `GET` and costs 1 credit per successful call. | Endpoint | Use it for | Required | Optional | | --- | --- | --- | --- | | [`/v1/google-finance/quote`](https://perceptlayer.com/apis/google-finance/quote) | Price snapshot, key stats, company profile, financials | `symbol` | `exchange`, `period_type`, `hl`, `gl` | | [`/v1/google-finance/historical`](https://perceptlayer.com/apis/google-finance/historical) | Price history over a window | `symbol` | `exchange`, `range`, `start_date`, `end_date`, `interval`, `hl`, `gl` | | [`/v1/google-finance/intraday`](https://perceptlayer.com/apis/google-finance/intraday) | Movement during the day | `symbol` | `exchange`, `hl`, `gl` | | [`/v1/google-finance/search`](https://perceptlayer.com/apis/google-finance/search) | Finding a ticker from a name | `q` | `hl`, `gl` | | [`/v1/google-finance/markets`](https://perceptlayer.com/apis/google-finance/markets) | Gainers, losers, most active and more | none | `trend`, `index_market`, `hl`, `gl` | | [`/v1/google-finance/indices`](https://perceptlayer.com/apis/google-finance/indices) | Index levels | none | `indices`, `hl`, `gl` | Only `quote` has a recorded response in this guide, so the field names below all come from it. For the other endpoints, run a call in the playground on the [Google Finance API page](https://perceptlayer.com/apis/google-finance) before you write a parser. ## How do you get a stock quote as JSON? Send a `GET` request to `https://api.perceptlayer.com/v1/google-finance/quote` with the ticker in `symbol` and your key in the `X-API-Key` header. Adding `exchange` names the listing you mean, which is useful when a ticker could match more than one. This is the request behind the recorded response used in the rest of the guide: ```bash curl "https://api.perceptlayer.com/v1/google-finance/quote?symbol=AAPL&exchange=NASDAQ" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, the key can go in the `api_key` query parameter; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. A successful response carries `X-Credits-Used` and `X-Credits-Remaining` headers, so a script can log the cost of every call and the balance left after it. The [requests docs](https://docs.perceptlayer.com/requests) list the other headers. ## Which parameters does the quote endpoint take? The quote endpoint takes one required parameter and four optional ones. `symbol` is the ticker, `exchange` pins the listing, `period_type` picks quarterly or annual financial statements, and `hl` and `gl` set language and country. Nothing else is documented about them, including defaults, so keep the values you choose fixed across runs and you'll compare like with like. | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `symbol` | string | yes | Up to 20 characters | | `exchange` | string | no | None documented; the recorded call uses `NASDAQ` | | `period_type` | string | no | One of `quarterly`, `annual` | | `hl` | string | no | Up to 10 characters | | `gl` | string | no | Up to 10 characters | `period_type` changes the financial statements, not the price. The recorded response shows `"period_type": "Quarterly"` on each statement result. ## What does the price part of the response contain? The response is one `quote` object with four blocks: `summary`, `key_stats`, `about` and `financials`. For price tracking, `summary` and `key_stats` matter. This is the recorded AAPL response, trimmed to those parts: ```json { "quote": { "summary": { "name": "Apple Inc", "symbol": "AAPL", "exchange": "NASDAQ", "current_price": 347.725, "price_change": -0.49, "percent_change": -0.14, "currency": "USD", "market": { "trading": "Extended Hours", "price": "$347.20", "extracted_price": 347.2001, "price_movement": { "percentage": 0.15, "movement": "Down" } }, … }, "key_stats": { "previous_close": "$348.22", "day_range": "$345.75 - $351.73", "year_range": "$243.42 - $351.73", "market_cap": "5.07T USD", "avg_volume": "39.13M", "pe_ratio": 39.86, "dividend_yield": "0.31%", "primary_exchange": "NASDAQ", … }, … } } ``` | Field | Shape in the recording | What to do with it | | --- | --- | --- | | `summary.current_price` | number, `347.725` | Store as the price | | `summary.price_change` | number, `-0.49` | Store as the day's change | | `summary.percent_change` | number, `-0.14` | Store as the day's change in percent | | `summary.currency` | string, `"USD"` | Store next to every price | | `summary.market.trading` | string, `"Extended Hours"` | Store as the session label | | `summary.market.extracted_price` | number, `347.2001` | Store as the session price | | `key_stats.previous_close` | string, `"$348.22"` | Parse to a number | | `key_stats.pe_ratio` | number, `39.86` | Store as is | ### How do current\_price and the market block relate? The figures in the recording are consistent with each other. `current_price` 347.725 minus the previous close of 348.22 is -0.495, which matches `price_change` -0.49, and -0.495 ÷ 348.22 is about -0.14%, which matches `percent_change`. The `market` block is a second reading: `extracted_price` 347.2001 is about 0.15% below 347.725, matching `price_movement.percentage` 0.15 with `movement` `"Down"`. So in this recording, `summary` describes one price and `market` describes the extended-hours session against it. Check that relationship on your own symbols in the playground before you depend on it, and store both readings with the `trading` label. ### Which values need parsing? Several key stats are display strings rather than numbers: `previous_close`, `day_range`, `year_range`, `market_cap`, `avg_volume` and `dividend_yield`. `pe_ratio` is already numeric. Strip the currency symbol and commas, and apply a `K`, `M`, `B` or `T` suffix where there is one. Keep the raw string next to the parsed value so you can audit a surprising number later. ## How do you build a watchlist loop in Python? A watchlist loop calls `quote` once per symbol, reads the price fields, and appends one row per symbol to a CSV file with the time of the call. The script below uses Python with `requests`. It waits on a 429 or 503 using the `Retry-After` header, pauses one second between calls to stay within the free rate of 1 request a second, and reads only fields that appear in the recorded response, with `.get` so a missing field becomes an empty cell rather than a crash. ```python import csv import datetime import os import re import time import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/google-finance/quote" WATCHLIST = [ {"symbol": "AAPL", "exchange": "NASDAQ"}, {"symbol": "MSFT", "exchange": "NASDAQ"}, ] def fetch(params, attempts=3): for _ in range(attempts): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json(), r.headers.get("X-Credits-Used") raise RuntimeError(f"gave up on {params['symbol']}") def money(value): """'$348.22' -> 348.22; None when there is no number.""" m = re.search(r"-?[\d,]*\.?\d+", value or "") return float(m.group().replace(",", "")) if m else None now = datetime.datetime.now(datetime.timezone.utc).isoformat(timespec="seconds") with open("quotes.csv", "a", newline="") as f: out = csv.writer(f) for params in WATCHLIST: data, credits = fetch(params) quote = data.get("quote", {}) summary = quote.get("summary", {}) market = summary.get("market", {}) stats = quote.get("key_stats", {}) out.writerow([ now, summary.get("symbol", params["symbol"]), summary.get("exchange", params["exchange"]), summary.get("current_price"), summary.get("price_change"), summary.get("percent_change"), summary.get("currency"), market.get("trading"), market.get("extracted_price"), stats.get("previous_close"), money(stats.get("previous_close")), credits, ]) time.sleep(1) ``` Each row holds the UTC time of the run, the symbol and exchange, the three summary price fields, the currency, the session label and price, the raw and parsed previous close, and the credits the call used. Run it from cron once a day after the session you care about; a paying account runs at least 5 requests a second, so you can shorten the pause for a long list. ### What should the loop do with errors? Every error comes back with an HTTP status and a JSON body with `code`, `message` and `request_id`. `invalid_parameters` (422) means a bad value, such as a `symbol` over 20 characters, so fix the watchlist rather than retrying. `source_error` (502) is worth one retry on the next run. Requests have no idempotency key, so a client timeout can hide a call that succeeded and was billed; keep the timeout generous. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## How do you get historical and intraday prices? `historical` takes a `symbol`, an optional `exchange`, and a window: either `start_date` and `end_date` as strings, or `range` as an integer. `interval` sets the spacing to `daily`, `weekly` or `monthly`. `intraday` takes `symbol` and `exchange` only, plus `hl` and `gl`. Neither has a recorded response here, so this guide doesn't show their fields or the date format `start_date` expects; run one call of each in the playground before you write code against them. ```bash curl "https://api.perceptlayer.com/v1/google-finance/historical?symbol=AAPL&exchange=NASDAQ&interval=daily" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/google-finance/intraday?symbol=AAPL&exchange=NASDAQ" \ -H "X-API-Key: $API_KEY" ``` A sensible split for a watchlist is one `historical` call per symbol when you add it, to backfill, and one `quote` per symbol per day after that. Poll `intraday` only where the shape of the day matters; each poll is another call. ## What does a stock price API cost per symbol per day? The cost is 1 credit per call, so the cost per symbol per day is the number of calls you make for it each day. A daily `quote` is 1 credit per symbol per trading day. Polling `intraday` every 15 minutes over a 6-hour window is 24 calls, so 24 credits per symbol per day. Failed calls cost nothing, and a failed call followed by a successful retry costs 1 credit, not 2. | Plan | Arithmetic | Credits a month | | --- | --- | --- | | 40 symbols, 1 quote a day | 40 × 21 trading days × 1 credit | 840 | | 40 symbols, 1 quote a day, plus a one-off backfill | 840 + 40 × 1 credit | 880 | | 200 symbols, 2 quotes a day | 200 × 2 × 21 × 1 credit | 8,400 | | 10 symbols, intraday every 15 minutes for 6 hours | 10 × 24 × 21 × 1 credit | 5,040 | The 100 free credits on signup that come with a verified email cover the first two trading days of the first plan. Past that, each plan needs a pack, and a month of any of them fits the Starter pack's 10,000 credits, and purchased credits last 12 months, with no subscription. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. Speed follows the rate limit, which is per account and shared by all its keys. At the free rate of 1 request a second, 40 symbols take at least 40 seconds; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. ## What should you check before relying on the price? Data is collected from publicly available sources and returned as found at the time of the call. The recorded quote shows why the time matters: `market.trading` reads `"Extended Hours"`, so the same symbol can carry a regular price and a session price in one response. Store the time of each call and the `trading` label with every row, and don't treat the data as a trading feed. If an agent needs to look up a ticker on demand, the same endpoints work through the MCP server; the [AI agents docs](https://docs.perceptlayer.com/ai-agents) show how to add it. For other search-engine sources, browse the [search engines APIs](https://perceptlayer.com/verticals/search) or the [API guides](https://perceptlayer.com/blog/category/api-guides). To start, run `quote` for your own ticker in the playground on the [Google Finance API page](https://perceptlayer.com/apis/google-finance), then [get a free API key](https://perceptlayer.com/signup) and schedule the loop. ## APIs in this post - [Google Finance **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/google-finance) ## Frequently asked questions ### How much does a stock price API call cost? Each successful call to any Google Finance endpoint, including `quote`, `historical` and `intraday`, costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. One quote per symbol per trading day is 1 credit per symbol per day, so a 40-symbol watchlist over 21 trading days is 840 credits. The pricing page shows what credits cost. ### Is the price real time? The data is returned as found at the time of the call, and we make no promise about delay beyond that. The recorded AAPL quote shows `market.trading` as `"Extended Hours"` alongside `current_price`, so a response can describe more than one session. Store the call time and the `trading` label with each price, and use a licensed feed for trading decisions. ### Can I get price history for a date range? Yes. `GET /v1/google-finance/historical` takes a required `symbol` and optional `start_date`, `end_date`, `range` and `interval`, where `interval` is one of `daily`, `weekly` or `monthly`. There's no recorded response in this guide, so check the date format and fields in the playground first. One backfill call per symbol costs 1 credit. ### How do I find the right symbol for a company? Call `GET /v1/google-finance/search` with the company name or ticker in `q`, up to 255 characters. There's no recorded `search` response in this guide, so check in the playground which fields carry the symbol and exchange. Then pass a ticker as `symbol`, with `exchange` when it could match more than one listing, to `quote` or `historical`. ### What happens when a quote call fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`, and no credits are debited. A `rate_limited` (429) or `temporarily_unavailable` (503) response carries `Retry-After` with the seconds to wait. An `invalid_parameters` (422) response means a value needs fixing, such as a `period_type` other than `quarterly` or `annual`. stock price api stock quotes google finance python watchlist ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 10 Jul 2026 Perceptlayer 8 min read ## [Google Finance API: Stock Quotes and History as JSON](https://perceptlayer.com/blog/google-finance-api-stock-quotes) Six Google Finance endpoints return quotes, history, intraday, markets and indices as JSON at 1 credit a call. Parameters, a recorded AAPL quote and costs. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Costco API: Product Data and Prices as JSON](https://perceptlayer.com/blog/costco-api-product-prices) A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs. --- title: "Craigslist Scraper or API: Watching New Postings" description: "Compare a Craigslist scraper with four endpoints at 1 credit a call: a recorded Portland bike search with 821 results, bumped_at times and a 3-call sweep." url: https://perceptlayer.com/blog/craigslist-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Craigslist Scraper or API: Watching New Postings 28 Oct 2026 Perceptlayer 8 min read A Craigslist scraper fetches search pages for each area and category you care about, parses every posting's title, price, location and link, and compares the result with the last run to find what's new. You maintain the fetching, the parsing and the comparison. The alternative is four Craigslist endpoints that return the same postings as JSON at 1 credit per successful call, with an `id` and a `bumped_at` time on every result. On the recorded Portland bike search, a full sweep of 821 postings takes 3 calls, and this post compares that with a scraper and gives a verdict per job. ## Key takeaways - A Craigslist scraper's daily run has six steps you maintain: build search URLs per area and category, fetch pages, parse results, deduplicate, fetch details and check that the run worked. - `GET /v1/craigslist/search` takes `site`, `subarea`, `category`, `query`, `min_price`, `max_price`, `sort` and `page`, and returns `results[]` with `id`, `posting_id`, `title`, `price`, `currency`, `images`, `location` and `bumped_at`. - The recorded Portland search returned `total: 821`, `per_page: 360` and `has_more: true`, so a full sweep is 3 calls × 1 credit = 3 credits, about 0.004 credits per posting. - Polling the first page of one search every hour is 24 credits a day, or 720 credits a month. The 100 free credits on signup cover the first four days, and a Starter pack of 10,000 credits covers a year (12 × 720 = 8,640). - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What does a Craigslist scraper's daily run involve? A classifieds scraper does the same six things on every run, and each one is code you own. The steps below are general engineering for any classifieds site, not a description of Craigslist's own systems, but they're the parts that decide how much time the scraper takes after it's built. 1. **Build the search list.** One search per area, category and keyword combination, with your price band. Ten cities and three categories is already 30 searches. 2. **Fetch result pages.** Request each search and follow its pages until there are no more, at a pace that doesn't look like a flood. 3. **Parse each result.** Find the title, price, area, image and link for every posting on the page, and turn the price text into a number. 4. **Deduplicate.** Pull a stable ID out of each link and compare it with what you stored last time, so a reposted or refreshed ad doesn't count as new. 5. **Fetch details.** Request each new posting's own page for the full text and attributes, which is one more request per posting. 6. **Check the run.** Compare row counts and empty fields with yesterday's, because a parser that stops matching returns nothing rather than an error. Steps 3 and 6 carry most of the upkeep. A page change moves the element your parser reads, the run returns fewer rows, and only the check in step 6 notices. Traffic at volume can also be slowed or blocked by any site this size; getting around that with proxy rotation or challenge solvers isn't something we'd recommend. Read Craigslist's terms of use before you build a collector. ## What is the same job with the Craigslist endpoints? The same job is three or four API calls: find the site and category codes once, search each combination, and fetch single postings where you need them. The [Craigslist API](https://perceptlayer.com/apis/craigslist) has four endpoints, all `GET` and all 1 credit per successful call. | Endpoint | Returns | Parameters | | --- | --- | --- | | [`/v1/craigslist/sites`](https://perceptlayer.com/apis/craigslist/sites) | Sites | `country`, `query` (both optional) | | [`/v1/craigslist/categories`](https://perceptlayer.com/apis/craigslist/categories) | Categories | `query` (optional) | | [`/v1/craigslist/search`](https://perceptlayer.com/apis/craigslist/search) | Search results | `site`, `subarea`, `category`, `query`, `min_price`, `max_price`, `sort`, `page` (all optional) | | [`/v1/craigslist/posting`](https://perceptlayer.com/apis/craigslist/posting) | One posting | `id` (required) | `sort` accepts `date`, `dateoldest`, `rel`, `priceasc` or `pricedsc`. Look up site and category values once in the playground with the sites and categories endpoints, then hard-code them in your search list; that's two calls in total, not two per run. ### A real search: bikes in Portland This is the recorded request: bikes in the `portland` site, category `bia`, priced between 50 and 300. ```bash curl "https://api.perceptlayer.com/v1/craigslist/search?site=portland&category=bia&query=bike&min_price=50&max_price=300" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to the first two postings: ```json { "success": true, "data": { "total": 821, "page": 1, "per_page": 360, "has_more": true, "results": [ { "position": 1, "id": "wnD16b4hEY7DaHprfGYGAg", "posting_id": 7988730852, "title": "21\" Specialized Sirrus A1 commuter", "url": "https://www.craigslist.org/view/wnD16b4hEY7DaHprfGYGAg", "price": 250, "currency": "USD", "images": [ "https://images.craigslist.org/00s0s_f9B6cl8tXrr_0Cz0t2_600x450.jpg" ], "slug": "portland-21-specialized-sirrus-a1", "location": { "name": "multnomah county", "site": "portland", "subarea": "mlt", "latitude": 45.56, "longitude": -122.6001 }, "bumped_at": "2026-10-23T20:30:33Z" }, { "position": 2, "id": "sZBbfWfnthmpp4JiN6rnJR", "posting_id": 7988729730, "title": "Gary Fisher Kaitai", … "price": 75, … "location": { "name": "Gresham", "site": "portland", "subarea": "mlt", … }, "bumped_at": "2026-10-23T20:28:35Z" }, … ] }, "meta": { "endpoint_family": "search", "billable": true } } ``` Every value a scraper would parse in step 3 is a named field. `price` is already a number, `location` carries coordinates and the `subarea` code, and `location.site` returns `portland`, the same value the request passed as `site`. The `id` in each result is also the last part of its `url`, and the posting endpoint's required parameter is named `id` too. Posting calls aren't in our recordings, so try one `id` on the posting endpoint page to see its fields before you build on them. ## Which fields tell you a posting is new? Two fields do the work of the scraper's deduplication step: `id`, a stable key for each posting, and `bumped_at`, a UTC timestamp. A posting whose `id` you haven't stored is new. A stored posting whose `bumped_at` has changed has been moved up again, which you'll usually want to record without counting it as a new item. Order matters for polling. The recorded request passed no `sort`, and its first two results are in descending `bumped_at` order (20:30:33, then 20:28:35). For a poller, pass `sort=date` explicitly and confirm the order on your own search in the playground, so the newest postings land on page 1 and you rarely need page 2. ### A poller with sqlite3 This Python script runs the Portland search, stores each posting by `id` and reports what's new and what was bumped since the last run. It uses only `requests` and the standard library, and reads only fields from the recorded response. ```python import os import sqlite3 import requests db = sqlite3.connect("postings.db") db.execute( """CREATE TABLE IF NOT EXISTS postings ( id TEXT PRIMARY KEY, posting_id INTEGER, title TEXT, price REAL, currency TEXT, subarea TEXT, url TEXT, bumped_at TEXT, first_seen TEXT DEFAULT CURRENT_TIMESTAMP)""" ) resp = requests.get( "https://api.perceptlayer.com/v1/craigslist/search", params={"site": "portland", "category": "bia", "query": "bike", "min_price": 50, "max_price": 300, "sort": "date", "page": 1}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60, ) resp.raise_for_status() data = resp.json()["data"] new = bumped = 0 for r in data.get("results", []): seen = db.execute("SELECT bumped_at FROM postings WHERE id = ?", (r["id"],)).fetchone() if seen is None: new += 1 db.execute( "INSERT INTO postings (id, posting_id, title, price, currency, subarea, url, bumped_at)" " VALUES (?, ?, ?, ?, ?, ?, ?, ?)", (r["id"], r.get("posting_id"), r.get("title"), r.get("price"), r.get("currency"), (r.get("location") or {}).get("subarea"), r.get("url"), r.get("bumped_at")), ) elif seen[0] != r.get("bumped_at"): bumped += 1 db.execute("UPDATE postings SET bumped_at = ?, price = ? WHERE id = ?", (r.get("bumped_at"), r.get("price"), r["id"])) db.commit() print(f"{new} new, {bumped} bumped; total {data.get('total')}, has_more {data.get('has_more')}") print("credits used:", resp.headers.get("X-Credits-Used")) ``` Run it on a schedule and the first run fills the table; later runs report only the changes. [API Pagination](https://perceptlayer.com/blog/api-pagination-patterns) covers what to do when new postings arrive while you're paging. ## How do a Craigslist scraper and the endpoints compare? A scraper costs engineering time and puts blocking and terms risk on you; the endpoints cost 1 credit per successful call and remove the parsing and its upkeep. The comparison below is for a recurring job, such as watching a set of searches across several areas every hour. | | DIY Craigslist scraper | Craigslist endpoints | | --- | --- | --- | | Setup | URL builder, fetcher, result parser, dedupe store, run checks | API key in the `X-API-Key` header | | Areas and categories | Kept as URL patterns in your code | `site`, `subarea` and `category` parameters; lookups via sites and categories | | Price | Parsed from text | `price` as a number with `currency` | | Location | Parsed area name, if shown | `location.name`, `site`, `subarea`, `latitude`, `longitude` | | New versus refreshed | Your own ID extraction and comparison | `id` and `bumped_at` on every result | | Page depth | Follow pages until none remain | `page` and `has_more`; the recorded page held 360 | | When the page changes | The parser stops matching, often silently | Named JSON fields; there's no parser of yours to fix | | Blocks and challenges | Yours to handle at volume | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ## What does watching a Craigslist search cost? Cost follows calls, and the recorded search page held up to 360 postings, so per-posting costs are small and the schedule decides the bill. There are two numbers to work out: what a full sweep costs, and what polling for changes costs. A full sweep of the Portland search is 821 postings ÷ 360 per page, rounded up, which is 3 pages. That's 3 calls × 1 credit = 3 credits, or 3 ÷ 821, about 0.004 credits per posting. Doing it once a day for 30 days is 90 credits. Polling is where the volume is. Fetching page 1 of one search every hour is 24 calls × 1 credit = 24 credits a day, or 720 credits a month. The 100 free credits on signup cover the first four days of that, and a Starter pack of 10,000 credits covers a year of it. Ten searches polled hourly, for example one per city, is 240 credits a day, or 7,200 a month, which fits the Starter pack's 10,000. Polling every 15 minutes instead multiplies each figure by 4, so ten searches would come to 28,800 credits a month, inside the Build pack's 50,000. Add 1 credit for each posting you fetch in full with the posting endpoint. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## Which route should you choose? Choose by how many searches you watch and how often, because that decides whether upkeep or per-call cost dominates. These verdicts assume a recurring job; for a look at today's listings in one city, open Craigslist in a browser and skip both. - **Alerts for a specific item** (a bike size, a model, a price band): poll page 1 of one search hourly with `sort=date` and alert on new `id` values. It's 720 credits a month. - **Price benchmarking for used goods**: run a full sweep daily and take the median of `price` per `subarea`. Remember these are asking prices. - **Watching the same search in many cities**: keep a list of `site` values, run one search per site and store `location.site` with each row. - **Mapping supply**: use `location.latitude` and `location.longitude` from search results, without fetching each posting. - **Full posting text for a small set**: fetch those postings with the posting endpoint, at 1 credit each. - **Learning how scraping works**: practise on a site built for it rather than a live classifieds site. - **An agent that answers "what's for sale near me"**: give it the endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe. Classifieds in other countries follow the same pattern: see [Kleinanzeigen API](https://perceptlayer.com/blog/kleinanzeigen-api-search-json) and the [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces). To check the fields on your own area, run `search` in the playground on the [Craigslist API page](https://perceptlayer.com/apis/craigslist), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Craigslist **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/craigslist) ## Frequently asked questions ### Is scraping Craigslist allowed? That depends on Craigslist's terms of use, how you collect and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks or other protections. Many postings are written by private individuals, so store item facts such as title, price and area, leave contact details out, and don't use collected postings to contact posters. ### How many postings does one Craigslist search call return? The recorded Portland bike search returned `per_page: 360` with `total: 821` and `has_more: true`. The page size isn't a parameter, so read `per_page` and `has_more` from each response and request the next `page` until `has_more` is false. Each successful page costs 1 credit, whatever it holds. ### How often should I poll a Craigslist search? Poll as often as your use needs and your budget allows. Hourly polling of one search's first page is 720 credits a month; every 15 minutes is 2,880. Pass `sort=date` and check in the playground that the newest postings come first; then page 1 is usually all a poll needs. A free account allows 1 request a second, which is plenty for dozens of searches per poll. ### Does a failed Craigslist call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ### Can I search several Craigslist cities at once? One search call takes one `site` value, so run one call per city and merge the results, keyed by `id`. Each result's `location.site` tells you which city it came from. Ten cities polled hourly is 240 calls a day, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list how fast each pack lets you send them. craigslist scraping classifieds polling marketplaces ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 26 Oct 2026 Perceptlayer 8 min read ## [Craigslist API: Get Classified Postings as JSON](https://perceptlayer.com/blog/craigslist-api-postings-json) Search Craigslist postings by site, category and price as JSON, then poll for new ones. A real response, the parameters and the credit cost. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Vinted Scraper or API: What You Get](https://perceptlayer.com/blog/vinted-scraper-vs-api) A Vinted scraper vs 10 endpoints: one recorded search returned 24 items with price, service\_fee and total\_item\_price for 1 credit, about 0.04 credits per item. --- title: "Walmart Scraper or API: Price, Stock and Seller Data" description: "Compare a Walmart scraper with Walmart search and product calls at 1 credit each: a recorded air fryer search with price, seller_name and availability_status." url: https://perceptlayer.com/blog/walmart-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Walmart Scraper or API: Price, Stock and Seller Data 28 Oct 2026 Perceptlayer 9 min read A Walmart scraper loads Walmart search and product pages and extracts price, rating, seller and stock status from each one, and you maintain that extraction every time the pages change. The alternative is two Walmart endpoints, search and product, that return those values as typed JSON fields at 1 credit per successful call. Which one fits depends on whether you watch a few hundred known items or sweep whole search results. This post maps scraper fields to the recorded "air fryer" response, prices both tracking patterns in credits and gives a verdict per job. ## Key takeaways - A retail scraper has to extract around a dozen values per product (ID, title, price, currency, rating, review count, seller, stock state, sponsored flag, URL) and keep that extraction working as pages change. - `GET /v1/walmart/search` takes a `query` and returns `results[]` with `us_item_id`, `price`, `currency`, `rating`, `reviews`, `seller_name`, `availability_status`, `out_of_stock` and `sponsored`. - The recorded "air fryer" search returned `total_items: 72`, `max_page: 13` and `has_more: true`, so page with `has_more` rather than working out pages from the item count. - Checking 200 known items once a day with `/v1/walmart/product` is 200 calls × 1 credit = 200 credits a day, 6,000 a month, inside the Starter pack's 10,000. - The recorded call took `duration_ms: 4134`; set a client timeout well above that, because a request whose reply is lost may have succeeded and been billed. ## What would a Walmart scraper have to extract? A Walmart scraper exists to produce one row per product with the values a pricing or assortment team acts on. The table lists those values next to where each one sits in the recorded search response. On the scraper side, every row is a selector or a parsing rule you write, test and fix; on the API side, it's a field name you read. | Value you need | Scraper work | Field in the search response | | --- | --- | --- | | Stable product ID | Pull it from the product URL or the page | `us_item_id` | | Title | Read the product name | `title` | | Price | Parse price text into a number | `price` (a number, `89.99`) | | Currency | Infer from the symbol or the site | `currency` | | Rating | Read the star rating | `rating` | | Review count | Parse the count text | `reviews` | | Seller | Find the seller line | `seller_name` | | Stock state | Interpret stock wording or button state | `availability_status`, `out_of_stock` | | Paid placement | Detect the sponsored marker | `sponsored` | | Product link | Build or read the URL | `product_page_url` | | Image | Read the image source | `thumbnail` | The stock row is where scrapers tend to drift. Stock is often shown as wording or as the state of a button rather than a single value, and each new wording needs a rule. The response gives you two values instead: `availability_status` as a code ( `IN_STOCK` in the recording) and `out_of_stock` as a boolean. ## Where does the upkeep in a retail scraper come from? Upkeep in a retail scraper comes from three places: page changes, paid placements and blocking. None of them shows up while you build the prototype, and all of them show up once the scraper runs daily. This is general engineering for any large retail site, not a description of Walmart's own systems. Page changes are the steady cost. Retail pages change as a site tests layouts and features, so a selector that found the price last month can find nothing, or find the wrong number, this month. A scraper rarely fails loudly here; it returns fewer rows or blank fields, so you need a monitor that compares each run's counts and empty values with the last one. Paid placements change what a "result" means. If your scraper can't tell a sponsored result from an organic one, your rank and price figures mix the two. Both recorded results carry `sponsored: true`, which shows how much of a page this can be. Blocking is the third. Any site this size has to tell people from automated traffic, so a scraper running at volume should expect slow responses, challenge pages and refused requests. Getting around those with proxy rotation or challenge solvers isn't a route we'd recommend. Read Walmart's terms before you build a collector. ## What does the Walmart search endpoint return? The search endpoint returns one page of products for a query, each with typed fields, plus search metadata and a pagination block. The [Walmart API](https://perceptlayer.com/apis/walmart) has two endpoints, both `GET` and both 1 credit per successful call: search, which takes a `query`, and product, which takes a `us_item_id`. This is the recorded request: ```bash curl "https://api.perceptlayer.com/v1/walmart/search?query=air+fryer" \ -H "X-API-Key: $API_KEY" ``` And the recorded response, trimmed: ```json { "success": true, "data": { "search_metadata": { "query": "air fryer", "page": 1, "sort": "best_match", "total_items": 72 }, "results": [ { "us_item_id": "17268119743", "title": "Instant Pot 4QT VORTEX 6-in-1 Mini Air Fryer, Air fry, Bake, Roast, Broil, Dehydrate or Reheat, Black, 4 Quarts", "price": 89.99, "currency": "USD", "rating": 4.4, "reviews": 87, "seller_name": "Walmart.com", "availability_status": "IN_STOCK", … "product_page_url": "https://www.walmart.com/ip/17268119743", "out_of_stock": false, "sponsored": true }, { "us_item_id": "14678059894", "title": "Chefman Air Fryer 1500W, 6 Quart, 4 Functions with Touch Controls, Stainless Steel", "price": 59.98, … "rating": 4.6, "reviews": 13051, … } ], "pagination": { "current_page": 1, "max_page": 13, "has_more": true } }, "meta": { "endpoint_family": "search", "duration_ms": 4134, "attempts": 2 } } ``` Two details matter when you build on it. First, the counts: `total_items` is 72 and `max_page` is 13, and the response doesn't state a page size, so drive your loop with `pagination.has_more` and `page`. Second, `us_item_id` also appears at the end of `product_page_url`, and the product endpoint's required parameter has the same name, `us_item_id`. The product call isn't in our recordings, so run one of these IDs on the [product endpoint page](https://perceptlayer.com/apis/walmart/product) to see its fields before you plan around them. ### Which search parameters can you set? Only `query` is required. `sort` takes `best_match`, `price_low`, `price_high`, `rating_high` or `new`; `min_price` and `max_price` are integers; `cat_id` (up to 64 characters) and `facet_filter` (up to 2,000 characters) are strings; `page` is an integer; and `country` takes `us` or `ca`. The product endpoint takes `us_item_id` (up to 32 characters) and optionally `country` and `slug`. The [search endpoint page](https://perceptlayer.com/apis/walmart/search) has the full reference and a playground. ## How do a Walmart scraper and the endpoints compare? A scraper trades credits for your engineering time and puts blocking and terms risk on you; the endpoints charge 1 credit per successful call and remove the parsing and the fixes. The table compares them for a recurring job, such as checking price and stock for a product list every day. | | DIY Walmart scraper | Walmart endpoints | | --- | --- | --- | | Setup | Fetcher, page parsers, stock rules, storage, monitoring | API key in the `X-API-Key` header | | Price | Parsed from text | `price` as a number, with `currency` | | Stock | Rules for each wording you've seen | `availability_status` and `out_of_stock` | | Seller | Found on the page | `seller_name` | | Sponsored results | Yours to detect | `sponsored` on each result | | Canada | A second set of pages to handle | `country=ca` on either endpoint | | When the page changes | Parsers break, often silently | Named JSON fields; there's no parser of yours to fix | | Blocks and challenges | Yours to handle at volume | Not yours; a failed call returns an error code and costs 0 | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### A stock and seller check in JavaScript This Node.js script (save it as `check.mjs` and run `node check.mjs`) searches one query, skips sponsored results and flags items that aren't in stock or aren't sold by `Walmart.com`. It reads only fields from the recorded response and sets a 30-second timeout, well above the recorded 4.1 seconds. ```js const url = new URL("https://api.perceptlayer.com/v1/walmart/search"); url.searchParams.set("query", "air fryer"); url.searchParams.set("sort", "price_low"); const res = await fetch(url, { headers: { "X-API-Key": process.env.API_KEY }, signal: AbortSignal.timeout(30_000), }); if (!res.ok) { const body = await res.json().catch(() => ({})); throw new Error(`${res.status} ${body.error?.code ?? "unknown_error"}`); } const { data } = await res.json(); for (const item of data.results ?? []) { if (item.sponsored) continue; const flags = []; if (item.out_of_stock || item.availability_status !== "IN_STOCK") { flags.push(item.availability_status ?? "stock unknown"); } if (item.seller_name && item.seller_name !== "Walmart.com") { flags.push(`seller: ${item.seller_name}`); } console.log(item.us_item_id, item.price, item.currency, item.rating, item.reviews, flags.join("; ")); } console.log("more pages:", data.pagination?.has_more); console.log("credits used:", res.headers.get("X-Credits-Used")); ``` If the call times out on your side, don't retry blindly in a tight loop: requests have no idempotency key, so the timed-out call may have succeeded and been billed. Retry once after a pause, and on 429 or 503 wait the seconds in `Retry-After`. ## What does tracking a Walmart item cost? Tracking cost depends on which pattern you use: product lookups cost 1 credit per item per check, while search sweeps cost 1 credit per page, spread across however many items that page holds. Pick the pattern from what you already know. If you have a list of item IDs, look them up; if you want to see what a query returns, sweep it. ### Pattern 1: a fixed list of items Checking 200 items once a day with `/v1/walmart/product` is 200 calls × 1 credit = 200 credits a day, or 6,000 credits over a 30-day month. That's more than the 100 free credits you get once on signup, which cover half of one day's check, and inside the Starter pack's 10,000. Twice a day doubles it to 12,000 a month, which fits the Build pack's 50,000. ### Pattern 2: sweeping search results Sweeping 25 queries three pages deep once a day is 25 × 3 = 75 calls × 1 credit = 75 credits a day, or 2,250 credits a month. The cost per item is 1 credit divided by the number of results on each page, so count `results` on one of your own queries in the playground before you budget. Stop early when `has_more` is false; a page you don't fetch costs nothing. The two combine well: sweep search for discovery and price, and spend product calls only on the items whose `price` or `availability_status` changed since the last run. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## Which route fits your job? The right route depends on how often the job runs and how many products it touches, because that decides whether upkeep or per-call cost is the larger bill. These verdicts assume a scheduled job; for a one-off look at ten products, a browser is faster than either. - **Price monitoring for a known product list**: use the product endpoint with your `us_item_id` list and store `price`, `currency` and the run date. Budget 1 credit per item per check. - **Seeing how a query ranks products**: sweep `search` with a fixed `sort`, store the order of `results[]` per run and keep `sponsored` so you can report organic and paid positions separately. - **Stock alerts**: read `availability_status` and `out_of_stock` per item and alert on a change, not on every run. - **Third-party seller tracking**: group results by `seller_name` to see which items aren't sold by `Walmart.com`. - **Rating and review trends**: store `rating` and `reviews` per item per week; a weekly check of 500 items is 500 credits a week. - **Canadian prices**: pass `country=ca` instead of maintaining a second scraper. - **An agent answering product questions**: connect it through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls search rather than reading pages. To compare prices across many shops rather than one retailer, [Idealo API](https://perceptlayer.com/blog/idealo-api-price-comparison-json) covers that case, and the [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) list other retail sources. To check the fields for your own products, run `search` in the playground on the [Walmart API page](https://perceptlayer.com/apis/walmart), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Walmart **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/walmart) ## Frequently asked questions ### Is scraping Walmart allowed? That depends on Walmart's terms, how you collect and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Product facts such as price, rating and stock status carry less risk than personal data; leave reviewers' names and details out of what you store. ### Can I get Walmart Canada prices? Yes. Both `/v1/walmart/search` and `/v1/walmart/product` take an optional `country` parameter that accepts `us` or `ca`. Each successful call costs 1 credit whichever country you choose. Store `currency` with every price, since prices from the two countries shouldn't be mixed in one column without converting them. ### How do I page through Walmart search results? Pass `page` and read the `pagination` block. The recorded "air fryer" search returned `current_page: 1`, `max_page: 13` and `has_more: true`, with `total_items: 72` in `search_metadata`. The response doesn't state a page size, so loop while `has_more` is true and stop at the depth you've budgeted. Each page costs 1 credit. ### Does a failed Walmart call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ### How fast can I check a Walmart product list? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so 200 product lookups take a little over three minutes. Paying accounts run at least 5 requests a second (300 a minute), which brings that to about 40 seconds. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. walmart scraping ecommerce price monitoring stock data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 8 min read ## [AliExpress Scraper or API: What You Get](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) An AliExpress scraper vs 1-credit endpoints: a recorded search with 60 products a page, price.amount, sold\_count and is\_sponsored, and cost per product. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Google Shopping Scraper or API: What You Get](https://perceptlayer.com/blog/google-shopping-scraper-vs-api) A Google Shopping scraper vs one GET at 1 credit: the recorded iphone 15 search with source, extracted\_price and product\_id, and the cost per item tracked. --- title: "Web Search API for AI Agents: Four Engines Compared" description: "Google, Brave, Bing and DuckDuckGo search endpoints compared by their recorded JSON, with one Python normaliser for agents. 1 credit per search." url: https://perceptlayer.com/blog/web-search-api-for-ai-agents --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Web Search API for AI Agents: Four Engines Compared 28 Oct 2026 Perceptlayer 7 min read A web search API for an AI agent takes a query and returns ranked results as JSON: a title, a URL and a snippet per result. Perceptlayer has four engines behind one key (Google, Brave, Bing and DuckDuckGo), each at 1 credit per successful search. Their responses use different field names, so this post compares what each recorded response contains, then shows a short Python function that turns all four into one result shape an agent can read. ## Key takeaways - All four search endpoints cost 1 credit per successful call; a failed call costs nothing and returns `X-Credits-Used: 0`. - Google, Brave and DuckDuckGo put results in `organic_results` with `title`, `link` and `snippet`; Bing returns `data` with `title`, `url` and `description`. - DuckDuckGo wraps everything in `data` and takes `q` as its query parameter; the other three take `query`. - The recorded Google response adds `related_questions`, `related_searches` and `local_results` with ratings, phone numbers and addresses, all in the same 1-credit call. - A short Python normaliser maps the four shapes to `{engine, position, title, url, snippet}`, so the agent's tool returns the same shape whichever engine answered. ## What does an agent need from a search result? An agent needs three things from each result: a title to judge relevance, a URL to cite or fetch, and a snippet to answer from without another call. Position helps it weigh results, and the engine name helps when you merge engines. Everything else in a search response is optional context that costs tokens every time the model reads it. That's the case for normalising. If your tool hands the model the raw response, the model sees `link` from one engine and `url` from another, and nested `local_results` it may not need. A fixed, small shape keeps the tool description short and the context window clear. [Trim API Responses for LLM Context](https://perceptlayer.com/blog/trim-api-responses-llm-context) covers trimming in general; here the job is narrower: four engines, one shape. If you want a primer on what a results page contains before comparing engines, [SERP API: What It Returns and What a Query Costs](https://perceptlayer.com/blog/serp-api-explained) covers it. This post assumes you know the idea and need to pick and wire an engine. ## How do the four search endpoints compare? The four endpoints share a price and a purpose but differ in parameter names, response nesting and the extras they return. The table below comes from the catalogue and the recorded responses: field names are the ones that appeared in each recording, not a full schema. | | Google | Brave | Bing | DuckDuckGo | | --- | --- | --- | --- | --- | | Endpoint | `GET /v1/google-search/search` | `GET /v1/brave/search` | `GET /v1/bing/search` | `GET /v1/duckduckgo/search` | | Query parameter | `query` | `query` | `query` | `q` | | Results array | `organic_results` | `organic_results` | `data` | `data.organic_results` | | URL field | `link` | `link` | `url` | `link` | | Snippet field | `snippet` | `snippet` | `description` | `snippet` | | Paging parameters | `start`, `page` | `page` | `page`, `num` | `start` | | Paging info in recording | `pagination[]` with `start` values | `results_count` | `results_on_page` | `pagination.has_more`, `next_start` | | Extras in recording | `related_questions`, `related_searches`, `local_results`, `filters` | `related_questions` with `answer` and `link`, `related_searches` | `domain` per result | `knowledge_graph.ai_answer` | | Other parameters | `gl`, `hl`, `location`, `safe`, `tbs`, `tbm`, `device` and more | `language`, `include_html` | `site`, `filetype`, `safe`, `hl`, `include_html` | `kl`, `df`, `safe` | | Credits per call | 1 | 1 | 1 | 1 | Google's search endpoint takes the longest parameter list by far, and the Google Search API has six more endpoints, including AI Overview and AI Mode. The other three engines have one endpoint each. ## What do the recorded responses look like? Each engine returns JSON with a results array, but the arrays sit at different paths and the fields have different names. These are trimmed excerpts of the recorded responses, with `…` where we cut. Where a recorded result named a person or a competing product, its title and snippet are cut too. ### Google ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "displayed_link": "https://andershusa.com › best-restaurants-berlin-german...", "snippet": "Dec 3, 2025 — …", … }, … ], "related_questions": [ { "question": "What is the coolest restaurant in Berlin?", … }, … ], "local_results": { "places": [ { "position": 1, "title": "BLESS Restaurant", "rating": 4.8, "reviews": 2400, "price": "€20–70", "address": "Hausvogteipl. 10, 10117 Berlin, Germany", … }, … ], … }, … } ``` The `local_results.places` block matters for agents: a question like "where should I eat in Berlin" gets ratings, review counts and addresses without a second call. ### Brave ```json { "search_information": { "query_displayed": "best web scraping api" }, "organic_results": [ { "position": 1, "title": "…", "link": "…", "displayed_link": "…", "snippet": "…", "source": "…" }, … ], "related_questions": [ { "question": "…", "answer": "…", "link": "…", "title": "…" }, … ], "results_count": 20, "engine_used": "brave", … } ``` Brave's result fields line up with Google's: `position`, `title`, `link`, `snippet`. Its `related_questions` entries carry an `answer` and the `link` it came from, which an agent can quote with a citation. ### Bing ```json { "data": [ { "position": 2, "title": "BEST | English meaning - Cambridge Dictionary", "description": "BEST definition: 1. of the highest quality, or being the most suitable, pleasing, or effective type of thing or…. Learn more.", "url": "https://dictionary.cambridge.org/dictionary/english/best", "domain": "dictionary.cambridge.org" }, … ], "results_on_page": 10, "source": "bing" } ``` The recorded Bing request was the same query as Brave's, "best web scraping api", and the two results in the recording are about the word "best", not about scraping APIs. That's what came back at the time of the call. It's a reason to have the agent check relevance from the title and snippet before it answers, whichever engine you use. ### DuckDuckGo ```json { "success": true, "data": { "search_parameters": { "q": "…", "kl": "us-en", "safe": true, "start": 0 }, "organic_results": [ { "position": 1, "title": "…", "link": "…", "snippet": "…", "display_url": "…", "favicon": "…" }, … ], "pagination": { "current": 1, "has_more": true, "next_start": 10, "next": 2 }, … }, "meta": { "duration_ms": 2169, "endpoint_family": "web_search" } } ``` DuckDuckGo nests results one level down, under `data`. Its `pagination` block gives `has_more` and `next_start`, so a paging loop can pass `next_start` back as `start`. One recorded snippet contained `&` rather than `&`, so unescape HTML entities before the model reads it. ## How do you normalise four engines into one result shape? Write one function per engine that reads only the fields seen in the recordings, then return a list of dicts with the same five keys. The agent's tool calls a single `web_search(query, engine)` function and never sees engine-specific names. Any field the recordings didn't show is treated as unknown and read with `.get()`. ```python import html import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} ENGINES = { "google": ("/v1/google-search/search", "query"), "brave": ("/v1/brave/search", "query"), "bing": ("/v1/bing/search", "query"), "duckduckgo": ("/v1/duckduckgo/search", "q"), } def _rows(engine, body): if engine in ("google", "brave"): return body.get("organic_results", []), "link", "snippet" if engine == "bing": return body.get("data", []), "url", "description" return body.get("data", {}).get("organic_results", []), "link", "snippet" def web_search(query, engine="google", limit=5): path, param = ENGINES[engine] resp = requests.get(BASE + path, params={param: query}, headers=HEADERS, timeout=60) if resp.status_code != 200: err = resp.json().get("error", {}) return {"error": err.get("code"), "engine": engine} rows, url_key, snippet_key = _rows(engine, resp.json()) results = [] for row in rows[:limit]: results.append({ "engine": engine, "position": row.get("position"), "title": html.unescape(row.get("title") or ""), "url": row.get(url_key), "snippet": html.unescape(row.get(snippet_key) or ""), }) return {"results": results, "credits_used": resp.headers.get("X-Credits-Used")} if __name__ == "__main__": for r in web_search("best restaurants in Berlin")["results"]: print(r["position"], r["title"], r["url"]) ``` Errors come back as an HTTP status and a JSON body with `error.code`, so the function returns the code instead of raising. The model can then read `rate_limited` or `source_error` and decide whether to try another engine. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and [Handle Web Data API Errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) covers retries and timeouts. ### Should the agent fall back to another engine? A fallback chain is cheap because failed calls are free. If Google returns a `source_error`, calling Brave next costs 1 credit for the successful call and nothing for the failed one. Keep the chain short (two engines is enough) and cap it in code, not in the prompt. For 429 responses, wait for the seconds in `Retry-After` instead of switching engines, because the rate limit is per account and applies to all four. ### Should the agent merge results from two engines? Merging two engines gives the agent a second set of sources for 2 credits per question. Deduplicate on `url` after normalising, keep the better `position`, and pass the engine name through so the model can see where each result came from. It's worth it for research questions where one engine's top results may be thin; for a quick factual lookup, one engine is enough. ## What does a search cost an agent? Every search costs 1 credit on success and 0 on failure, so an agent's search bill is its number of successful searches. The free tier gives 100 credits after you verify your email, and paid credits come in prepaid packs from 10,000 credits upward. `X-Credits-Used` and `X-Credits-Remaining` come back on every successful response, so the tool can report spend as it goes. Worked examples: - An agent that answers 300 questions a day with one search each: 300 × 30 days × 1 credit = 9,000 credits a month, inside the Starter pack's 10,000. - The same agent merging two engines per question: 300 × 2 × 30 × 1 credit = 18,000 credits a month, inside the Build pack's 50,000. - A fallback that fires on 5% of questions adds about 450 credits a month at 300 questions a day, and only for the fallback calls that succeed. Free accounts get 1 request a second and paid accounts at least 5, shared by every key on the account. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) for the headers. ## Which search engine should your agent use? Pick by the question your agent answers most, because the four differ in extras and parameters more than in the basic result. Every verdict below costs the same, 1 credit per successful search. - **General question answering and citations**: Google. The recorded response carries organic results plus `related_questions` and `related_searches`, and the endpoint takes `gl`, `hl` and `location` for country and language. - **Local questions** (restaurants, shops, services near a place): Google. `local_results.places` returns `rating`, `reviews`, `price`, `phone` and `address` in the same call. - **Answers with a cited source**: Brave's `related_questions` pair an `answer` with the `link` it came from. - **Queries that need the `site` or `filetype` parameter**: Bing is the only one of the four with those parameters. - **Paging until results run out**: DuckDuckGo's `pagination.has_more` and `next_start` make the loop condition explicit. - **A second opinion**: run Google plus one other engine, normalise, and deduplicate on `url`, for 2 credits per question. Through MCP, the agent doesn't need your wrapper at all: `search_endpoints` and `get_endpoint` find and describe these endpoints for free, and `call_endpoint` runs them. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. To compare the engines on your own queries first, run each one in the playground on the [Google Search API](https://perceptlayer.com/apis/google-search), [Brave Search API](https://perceptlayer.com/apis/brave), [Bing API](https://perceptlayer.com/apis/bing) and [DuckDuckGo API](https://perceptlayer.com/apis/duckduckgo) pages, then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Brave Search **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/brave) - [Bing **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/bing) - [DuckDuckGo **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/duckduckgo) ## Frequently asked questions ### How much does a web search API call cost? Each of the four search endpoints costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`. Every account gets 100 free credits after verifying an email address, which is 100 searches. Credits beyond that come in prepaid packs; the [pricing](https://perceptlayer.com/pricing) page has what they cost. ### Do the four engines return the same results? No. The recorded responses differ in fields as well as in which pages come back. Google, Brave and DuckDuckGo use `link` and `snippet`, Bing uses `url` and `description`. Results are returned as found at the time of the call, so test your agent's typical queries on each engine before you pick one. ### Which parameter holds the search query? Google, Brave and Bing take `query` as a required parameter. DuckDuckGo takes `q` instead, also required. A request that fails for any reason costs nothing. If you wrap the engines in one function, map the parameter name per engine, as the `ENGINES` table in the normaliser above does, so the agent only ever passes a query string. ### Can an AI agent call these search endpoints over MCP? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints` and `get_endpoint`, which look up the catalogue for free, and `call_endpoint`, which runs an endpoint and spends credits only on success. The agent can find all four search endpoints that way. [How to Add an MCP Server to Claude Desktop and Cursor](https://perceptlayer.com/blog/add-mcp-web-data-tools-claude-desktop) covers client setup. ### What happens when a search is rate limited? The call returns 429 with a `rate_limited` error code, a `Retry-After` header giving the seconds to wait, and no charge. Limits are per account, shared by every key, so switching to another engine doesn't help. Wait the given seconds and retry. [HTTP 429 Too Many Requests](https://perceptlayer.com/blog/http-429-too-many-requests) covers backoff patterns. web search ai agents search api google bing duckduckgo ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 18 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [How to Add an MCP Server to Claude Desktop and Cursor](https://perceptlayer.com/blog/add-mcp-web-data-tools-claude-desktop) Add the Perceptlayer MCP server to Claude Desktop or Cursor with an API key header, run a first Google search, and check only successful calls cost credits. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 7 Sept 2026 Perceptlayer 8 min read ## [OpenAI Agents SDK with a Remote MCP Server for Web Data](https://perceptlayer.com/blog/openai-agents-sdk-mcp-server) Connect the OpenAI Agents SDK to a Streamable HTTP MCP server with a Bearer header, cap call\_endpoint at 3 calls a question, and count credits per run. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 31 Jul 2026 Perceptlayer 9 min read ## [Add Web Search to an OpenAI Agent: Python Tool Calls](https://perceptlayer.com/blog/openai-agent-web-search-tool-call) Add web search to an OpenAI agent in Python: one web\_search tool over live Google results, a tool-call loop and a cap of 1 credit per search. --- title: "eBay Scraper or API: Prices Without the Parsing" description: "Compare an eBay scraper with eBay search at 1 credit a call: a recorded coffee maker search with price.extracted, sponsored flags and 110,000 results." url: https://perceptlayer.com/blog/ebay-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # eBay Scraper or API: Prices Without the Parsing 27 Oct 2026 Updated 10 Nov 2026 Perceptlayer 9 min read An eBay scraper fetches eBay search and item pages, then turns each result card into a title, a price, a condition and an item link. You write and maintain the fetching, the parsing, the paging and the checks that tell you a run went wrong. The alternative is three eBay endpoints that return search results as JSON at 1 credit per successful call, with prices already split into a number and a currency. This post compares the two on a recorded "coffee maker" search, works out the cost per result tracked, and gives a verdict per use case. ## Key takeaways - A scraper for marketplace search results has to fetch pages, parse each result card, turn price text like `$428.98` into a number, spot sponsored placements and follow pages, and all of that needs upkeep. - `GET /v1/ebay/search` takes `q` and returns `results[]` with `product_id`, `title`, `link`, `price.raw`, `price.extracted`, `price.currency`, `sponsored`, `subtitle` and `location`, plus `total_results`, `has_more`, `related_searches` and `categories`. - The recorded "coffee maker" search reported `total_results: 110000` and `has_more: true` for `per_page=60`, and cost 1 credit. - `per_page` accepts 60, 120 or 240. A full page of 240 is 1 ÷ 240, about 0.004 credits per result; checking 30 queries once a day is 30 credits a day, 900 a month; the 100 free credits on signup cover the first 3 days, and the Starter pack's 10,000 covers 11 months. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## What does an eBay scraper have to do? An eBay scraper has to do five jobs before you get a usable row: fetch a search page, find each result on it, clean the fields, decide which results to keep, and move to the next page. Each job is ordinary engineering, and each one breaks on its own schedule. Search results on a large marketplace are rendered for people, so the data you want sits inside markup that was never meant as an interface. The cleaning step is where most of the code goes. On any rendered page a price is text, with a currency symbol and separators that your code has to strip, and any format you didn't plan for turns into a parse error or a wrong number. Descriptive details such as condition are text too. Paid placements need their own detection, and if you miss them, your price sample is weighted toward whoever paid for placement. Then come the parts that don't show up in a prototype. Layout changes move or rename the elements your parser depends on, often without an error, so you need a monitor that compares row counts and empty fields between runs. Traffic at volume from one place tends to get slowed or blocked by any site this size, and working around that with proxy rotation or challenge solvers isn't something we'd recommend. Read eBay's terms before you build a collector. For a general view of when a scraper is worth writing, [Google Maps Scraper or Places Data API](https://perceptlayer.com/blog/google-maps-scraper-vs-api) walks through the same trade-off on another site. ## What does one eBay search call return? One call to `/v1/ebay/search` returns a page of results as named JSON fields, plus the result count, a `has_more` flag, related searches and the categories the results fall into. The [eBay API](https://perceptlayer.com/apis/ebay) has seven endpoints, all `GET` and all 1 credit per successful call: search, item, autocomplete, categories, product reviews, seller and seller feedback. This is the recorded request, for the first 60 results for "coffee maker": ```bash curl "https://api.perceptlayer.com/v1/ebay/search?q=coffee+maker&page=1&per_page=60" \ -H "X-API-Key: $API_KEY" ``` And the recorded response, trimmed: ```json { "success": true, "data": { "query": "coffee maker", "page": 1, "per_page": 60, "has_more": true, "results": [ { "product_id": "366702966104", "title": "Mr. Coffee 4-in-1 Single-Serve Latte, Iced, and Hot Coffee", "link": "https://www.ebay.com/itm/366702966104", "price": { "raw": "$60.00", "extracted": 60, "currency": "USD" }, "sponsored": true, "subtitle": "Brand New", … "location": "United States" }, { "product_id": "167322718667", "title": "New Keurig Green Mountain K4000 Cafe System Commercial K-Cup Coffee Maker", … "price": { "raw": "$428.98", "extracted": 428.98, "currency": "USD" }, "sponsored": true, … } ], "total_results": 110000, "related_searches": [ { "query": "keurig coffee maker", … }, … ], "categories": [ { "id": 11700, "name": "Home & Garden" }, { "id": 20625, "name": "Kitchen, Dining & Bar" } ] }, "meta": { "endpoint_family": "search", "duration_ms": 2866 } } ``` ### Which fields replace scraper code? Four fields map straight onto the work described above. `price.extracted` is the number your price cleaner would produce, with `price.raw` kept beside it so you can check the conversion, and `price.currency` stops you mixing currencies. `sponsored` is the placement flag you'd otherwise hunt for in the markup; both results in this excerpt carry `sponsored: true`, which is a reason to filter on it before you average anything. `subtitle` read "Brand New" on both recorded results, so it looks like a condition line; check it on your own queries before you rely on it. `product_id` also appears at the end of each `link`, so it works as a stable key for deduplicating across runs. The `categories` array returns integer `id` values, and the search endpoint's `category` parameter is an integer too, so the names and types match. Run a search with one of those IDs in the playground to see how it narrows your results before you build on it. ## Which search parameters do the filtering for you? The search endpoint takes the filters a scraper would otherwise apply by building URLs or by discarding rows after parsing. Only `q` is required. The others narrow results by price, listing format, condition, shipping and location, and set the page size and sort. The table lists each one with its type as documented; the [eBay search endpoint page](https://perceptlayer.com/apis/ebay/search) has the same reference with a playground. | Parameter | Type | Allowed values | | --- | --- | --- | | `q` | string, required | up to 255 characters | | `category` | integer | | | `page` | integer | | | `per_page` | integer | 60, 120 or 240 | | `sort` | integer | 1, 7, 10, 12, 15 or 16 | | `buy_it_now` | boolean | | | `auction` | boolean | | | `condition[]` | list of integers | | | `price_min`, `price_max` | number | | | `free_shipping` | boolean | | | `preferred_location` | integer | | | `location_postal` | string | up to 20 characters | Two of the other endpoints are small. [`/v1/ebay/item`](https://perceptlayer.com/apis/ebay/item) takes one `item_id` (a string of up to 20 characters) and returns an item. [`/v1/ebay/autocomplete`](https://perceptlayer.com/apis/ebay/autocomplete) takes `q` and returns suggestions, which is useful for building a keyword list before you track it. The item call isn't in our recordings, so try a `product_id` from your own search as the `item_id` in the playground and check the fields it returns before you plan around it. ## How do an eBay scraper and the endpoints compare? A scraper costs engineering time and carries blocking and terms risk; the endpoints cost credits per call and take parsing and upkeep off your list. The table compares them for a recurring job, such as checking prices for a list of product searches every day. | | DIY eBay scraper | eBay endpoints | | --- | --- | --- | | Setup | Fetcher, result-card parser, price cleaner, storage, monitoring | API key in the `X-API-Key` header | | Prices | Text you convert yourself | `price.extracted` as a number, `price.raw` and `price.currency` beside it | | Sponsored results | Yours to detect from markup | `sponsored` on each result | | Filters | URL building or post-filtering | `price_min`, `price_max`, `condition[]`, `buy_it_now`, `auction`, `free_shipping`, `category` | | When the page changes | The parser breaks, often silently | You read named JSON fields; there's no parser of yours to fix | | Blocks and challenges | Yours to handle at volume | Not yours; a failed call returns an error code and costs 0 | | Paging | Follow page links | `page`, `per_page` (60, 120 or 240) and `has_more` | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call | ### A short script: median price of non-sponsored results This Python script runs one search, drops sponsored results and prints the median of `price.extracted`. It reads only fields that appear in the recorded response and treats a missing price as unknown. ```python import os import statistics import requests resp = requests.get( "https://api.perceptlayer.com/v1/ebay/search", params={"q": "coffee maker", "page": 1, "per_page": 240}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60, ) resp.raise_for_status() data = resp.json()["data"] kept = [r for r in data["results"] if not r.get("sponsored")] prices = [ r["price"]["extracted"] for r in kept if isinstance(r.get("price"), dict) and r["price"].get("extracted") is not None ] currencies = {r["price"].get("currency") for r in kept if isinstance(r.get("price"), dict)} print(f"{len(data['results'])} results, {len(kept)} not sponsored") if prices: print("median price:", statistics.median(prices), currencies) print("total results:", data.get("total_results"), "more pages:", data.get("has_more")) print("credits used:", resp.headers.get("X-Credits-Used")) ``` Asking prices aren't sale prices, so treat the median as what sellers are asking today, not what items sell for. ## What does tracking eBay prices cost per result? Cost follows calls, and one search call returns a page of results, so the cost per result depends on how full your pages are. If a `per_page=240` call comes back with 240 results, that's 1 ÷ 240, about 0.004 credits per result. At `per_page=60` it's 1 ÷ 60, about 0.017. An empty or short page still costs 1 credit when the call succeeds, so broad queries are cheaper per result than narrow ones. A typical watchlist is a set of searches, not a set of items. Checking the first 240 results for 30 product searches once a day is 30 calls × 1 credit = 30 credits a day, or 900 credits over a 30-day month. The 100 free credits on signup cover the first 3 days, and the Starter pack's 10,000 credits cover 11 months after that. Going two pages deep doubles it to 1,800 credits a month, so the Starter pack lasts 5 months. Tracking specific items one call at a time costs more. Following 500 items through the item endpoint once a day is 500 calls × 1 credit = 500 credits a day, or 15,000 credits a month: more than the Starter pack's 10,000 and inside the Build pack's 50,000. Don't try to page through all 110,000 "coffee maker" results either; narrow the query with `price_min`, `price_max`, `condition[]` or `category` until `has_more` turns false at a depth you can afford. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## Which route should you choose? Choose by how often you need the data and how much of it, because that decides whether upkeep or per-call cost dominates. The verdicts below assume a job that runs on a schedule; for a one-off look at a dozen listings, open eBay in a browser and skip both. - **Price research for resale or sourcing**: run `search` with your keywords and price band, drop `sponsored` results, and store `product_id`, `price.extracted`, `price.currency` and `subtitle` per run. At 240 a page it's about 0.004 credits per result. - **Measuring how much of a results page is sponsored**: count `sponsored` across `results[]` per query. A scraper can do this too, but only as long as its sponsored detection keeps working. - **Building a keyword list**: call `autocomplete` for seed terms and read `related_searches` from search, then track the queries that matter. - **Following a few hundred known items**: use the item endpoint, and budget 1 credit per item per check. - **Learning how scraping works**: build a scraper against a practice site rather than a live marketplace. - **An agent answering shopping questions**: give it the eBay endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls search instead of reading pages. For a recurring job, [Incremental API Data Pulls](https://perceptlayer.com/blog/incremental-api-data-pulls) covers storing only what changed between runs. Second-hand marketplaces elsewhere work the same way: see [Vinted API](https://perceptlayer.com/blog/vinted-api-search-items-json) and the [marketplaces APIs](https://perceptlayer.com/verticals/marketplaces). To check the fields for your own query, run `search` in the playground on the [eBay API page](https://perceptlayer.com/apis/ebay), then [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [eBay **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/ebay) ## Frequently asked questions ### Is scraping eBay allowed? That depends on eBay's terms, how you collect and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Product facts such as titles, prices and condition carry less risk than personal data; leave sellers' and buyers' personal details out of what you store. ### Does the search endpoint return sold prices? The recorded search returns current results with `price.raw`, `price.extracted` and `price.currency`, which are asking prices. Nothing in the recorded response marks a result as sold, so don't treat these figures as transaction prices. Check the search and item endpoints in the playground for the fields your use case needs before you build on them. ### How many results does one eBay search call return? You choose the page size with `per_page`, which accepts 60, 120 or 240. The recorded call asked for 60, reported `total_results: 110000` and `has_more: true`. Use `page` to go deeper, and stop when `has_more` is false or when you've reached the depth you budgeted for. Each successful page costs 1 credit. ### Does a failed eBay call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ### How fast can I run a daily eBay price check? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 30-query check finishes in about 30 seconds. Paying accounts run at least 5 requests a second (300 a minute). The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. ebay scraping marketplaces price tracking search results ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [StockX API: Product and Resale Price Data as JSON](https://perceptlayer.com/blog/stockx-api-sneaker-prices) Search StockX and read lowest\_ask, highest\_bid, last\_sale and sales\_last\_90d as JSON at 1 credit a call, then track a sneaker list daily. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Etsy API: Product Data as JSON](https://perceptlayer.com/blog/etsy-api-listings-json) One GET to /v1/etsy/product returns an Etsy listing's price, discount, stock, variations and images as JSON, at 10 credits per successful call. --- title: "Jobs API: Indeed, Glassdoor and Google Jobs Compared" description: "Indeed returns postings with apply_url and coordinates, Glassdoor returns ratings, reviews and pay percentiles, Google Jobs adds date filters. 1 credit a call." url: https://perceptlayer.com/blog/jobs-api-comparison --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Jobs API: Indeed, Glassdoor and Google Jobs Compared 27 Oct 2026 Perceptlayer 8 min read A jobs API answers one of three questions: which roles are open, what an employer is like, or what a role pays. Indeed's job search returns postings with title, company, location, description and apply link. Glassdoor's endpoints return employers, their reviews and salary percentiles. Google Jobs search takes date and job-type filters. Every call costs 1 credit, so the choice is about fields, not price. This post compares the three from their endpoints and recorded responses. ## Key takeaways - `GET /v1/indeed/jobs` needs only `query`; the recorded Berlin search returns `jobs[]` with `title`, `company.name`, a `location` object with `latitude`, `longitude` and `is_remote`, `description_html`, `date_published` and `apply_url`. - Glassdoor has six endpoints. `companies-search` returns an employer `id`, `rating`, `review_count` and `salary_count`; that `id` (671932 for Stripe) is the `employer_id` the recorded `companies-reviews` call used. - `GET /v1/glassdoor/salaries?job_title=software+engineer` returns per-employer `total_pay` percentiles from `p10` to `p90` and a market-wide `estimate` with `salaries_count`. - `GET /v1/google-jobs/search` has no required parameters and filters by `date_posted`, `job_type` and `lrad`; we have no recorded response for it, so check its fields in the playground. - Every endpoint costs 1 credit per successful call. Tracking 10 roles in 5 cities daily on Indeed is 10 × 5 × 30 = 1,500 credits a month. ## What does each jobs source answer? Job data splits into three kinds, and each source here is strongest at one. Postings tell you who is hiring for what, where, right now. Employer data tells you how a company is rated and what its staff say. Pay data tells you what a role earns at a company or across a market. Most real projects need two of the three, which is why the join between them matters as much as any single endpoint. | Question | Source | Endpoint | | --- | --- | --- | | Which roles are open, where, with an apply link? | Indeed | `GET /v1/indeed/jobs` | | Which roles are open, filtered by posting date? | Google Jobs | `GET /v1/google-jobs/search` | | How is an employer rated, and what do reviews say? | Glassdoor | `companies-search`, `companies-overview`, `companies-reviews` | | What does a role pay, by employer and overall? | Glassdoor | `GET /v1/glassdoor/salaries` | Glassdoor also has a `jobs-search` endpoint that takes a `keyword` and an optional `cursor`. We haven't recorded it, so this comparison uses Indeed and Google Jobs for postings. ## What does Indeed's job search return? Indeed's job search returns one item per posting in `data.jobs`, with the fields a job board or a hiring tracker needs: an `id`, the `title`, `company.name`, a structured `location`, the full `description_html`, `attributes`, `date_published` and the `apply_url`. Only `query` is required. `location`, `country`, `job_type` (one of `full_time`, `part_time`, `contract`, `internship`, `remote`), `sort` ( `relevance` or `date`) and `limit` narrow it down. ```bash curl "https://api.perceptlayer.com/v1/indeed/jobs?query=software+engineer&location=Berlin&country=DE&job_type=full_time&limit=20" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to the second posting: ```json { "success": true, "data": { "jobs": [ … { "id": "805a70464f904dce", "title": "Senior Product Manager (Enterprise)", "company": { "name": "n8n", "profile_url": "/cmp/N8n" }, "location": { "city": "Berlin", … "country": "DE", … "formatted": "Berlin", "latitude": 52.52437, "longitude": 13.41053, "is_remote": true }, "description_html": "

The AI orchestration of your wildest imagination.

\nn8n is the open workflow orchestration platform built for the new era of AI. We give tec…", "attributes": [ "Collaboration with Sales", "Go" ], "date_published": "2026-08-12 05:00:00", "apply_url": "https://jobs.ashbyhq.com/n8n/bcf96878-d41a-479d-b506-7753356077c4?utm_source=3ZqYBLJ41R" } ], "pagination": { "next_cursor": "ABQAAYEAFAAAAAAAAAAAAAAAAmYRNdcAMgEBAQcpfSGrk7wi9QBuLZ6BEihQwmDA0xA2nDAGrqtuJIdLnPZKyLE0IcnT2+IETfyRAAA=", "has_more": true }, "metadata": { "total_results": 20, "timestamp": "2026-10-21T13:25:37.233649Z" } } } ``` Two things stand out. The search for `software engineer` returned a Product Designer and a Senior Product Manager, so filter on `title` yourself if you need exact roles. And the first posting's `date_published` is `2025-07-21`, more than a year before the call's `timestamp`, so a posting date isn't proof a role is new. `pagination.next_cursor` and the `cursor` parameter share a name; [Indeed Jobs API](https://perceptlayer.com/blog/indeed-jobs-api-json) covers the endpoint in full. ## What do Glassdoor's endpoints return? Glassdoor's endpoints return employer data rather than postings: company search results with a rating and counts, a company overview, paged reviews with sub-ratings, and salary percentiles by job title. Each call costs 1 credit. The path is a company search to get the employer `id`, then reviews or salaries for that employer. The recorded search for `Stripe` returns each match with its `id`, `rating`, `review_count`, `salary_count` and `job_count`: ```json { "success": true, "data": { "query": "Stripe", "companies": [ { "id": 671932, "name": "Stripe", … "rating": 3.8, "review_count": 1619, "salary_count": 4702, "job_count": 3 }, { "id": 5554043, "name": "Stripe OLT", … "rating": 4, "review_count": 24, … } ], … }, … } ``` The recorded reviews call passed that same `id`, `employer_id=671932`, and the response's `company.id` is 671932. Reviews come with `date`, `summary`, `pros`, `cons`, `rating`, `job_title` and `is_current_employee`, and some carry a `ratings` object with six sub-scores such as `work_life_balance`. The response reports `total_pages: 157` and `total_reviews: 1564` for Stripe. Salaries work by job title. The recorded call for `software engineer` returns one entry per employer, each with `currency`, `pay_period`, `base_pay_mean`, `additional_pay_mean` and `total_pay` percentiles; for one employer, `total_pay.p50` is `311695.65` USD annually. It also returns a market-wide `estimate` with `location: "United States"`, `confidence: "CONFIDENT"` and `salaries_count: 727155`. Each salary entry has an `employer.id`, and the endpoint takes an optional `employer_id`; the names match, but we haven't recorded that filtered call. [Glassdoor API: Company Reviews and Salaries as JSON](https://perceptlayer.com/blog/glassdoor-salary-data-api) walks through all six endpoints. ## What does Google Jobs search take? Google Jobs search takes a free-text `q` and a set of filters that the other two don't have in the same form: `date_posted` (one of `today`, `3days`, `week`, `month`, `1`, `3`, `7`, `14`), `job_type` (the same five values as Indeed), and `lrad` (one of 5, 10, 25, 50, 100). It also accepts `uule`, `hl`, `gl`, `google_domain`, `uds` and a `next_page_token` for the next page. No parameter is required. ```bash curl "https://api.perceptlayer.com/v1/google-jobs/search?q=software+engineer&date_posted=week" \ -H "X-API-Key: $API_KEY" ``` We have no recorded response for this endpoint, so we don't list its fields here. Run the call in the playground on the [Google Jobs API page](https://perceptlayer.com/apis/google-jobs) and look at what comes back before you map it into your schema. The `date_posted` filter is the reason to try it: given the year-old posting in the Indeed recording, a source you can filter by posting age at query time may save you work. [Google Jobs API: Search Job Listings as JSON](https://perceptlayer.com/blog/google-jobs-api-search) covers the parameters. ## How do the three sources compare? The three sources cost the same per call and differ in what they cover. Indeed's recording has a full posting record, with coordinates and an apply link. Glassdoor gives what postings don't: ratings, reviews and pay. Google Jobs gives the richest posting filters, with fields you'll need to check yourself. | | Indeed | Glassdoor | Google Jobs | | --- | --- | --- | --- | | Main data | Job postings | Employers, reviews, salaries (and a jobs search) | Job postings | | Endpoints | 1 | 6 | 1 | | Required parameters | `query` | `query`, `employer_id`, `job_title` or `keyword`, by endpoint | None | | Location input | `location`, `country`, `radius`, `radius_unit` | None listed | `uule`, `lrad`, `gl` | | Date filter | `sort=date` | None listed | `date_posted` | | Job type filter | `job_type` | None listed | `job_type` | | Paging | `cursor`, `limit` | `page`, `limit` ( `cursor` on jobs search) | `next_page_token` | | Recorded fields | `title`, `company.name`, `location.*`, `description_html`, `date_published`, `apply_url` | `rating`, `review_count`, `pros`, `cons`, `total_pay.p10` to `p90`, `estimate` | Not recorded | | Cost | 1 credit per call | 1 credit per call | 1 credit per call | [API Pagination: Cursors, Pages and Offsets](https://perceptlayer.com/blog/api-pagination-patterns) covers the three paging styles in the table. ## How do you join postings to employer data? Join on the company name: take `company.name` from each Indeed posting, search Glassdoor with it as `query`, and keep only an exact match. The recorded search shows why the check matters, since `Stripe` matched both `Stripe` and `Stripe OLT`. This script uses only fields from the recorded responses and caches each company so you pay for it once per run. ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, params): r = requests.get(BASE + path, params=params, headers=HEADERS, timeout=30) r.raise_for_status() return r.json()["data"] jobs = get("/v1/indeed/jobs", { "query": "software engineer", "location": "Berlin", "country": "DE", "limit": 20, })["jobs"] employers = {} for job in jobs: name = job["company"]["name"] if name in employers: continue found = get("/v1/glassdoor/companies-search", {"query": name})["companies"] employers[name] = next( (c for c in found if c["name"].lower() == name.lower()), None ) for job in jobs: e = employers[job["company"]["name"]] rating = e["rating"] if e else "no exact match" print(job["title"], "|", job["company"]["name"], "|", rating, "|", job["apply_url"]) ``` The cost is 1 credit for the Indeed search plus 1 per distinct company: 20 postings from 12 employers is 1 + 12 = 13 credits. A failed call costs nothing; `raise_for_status()` stops on it, and the [errors docs](https://docs.perceptlayer.com/errors) list the codes. ## What does each use cost? Every endpoint here costs 1 credit per successful call, so you budget by calls: searches × runs × days for postings, and pages for reviews and salaries. Failed calls return `X-Credits-Used: 0`. The 100 free credits on signup, granted once, cover test runs and one-off pulls such as the 20 salary pages below; recurring trackers need a prepaid pack. | Job | Calls | Credits | | --- | --- | --- | | 10 roles × 5 cities on Indeed, daily for 30 days | 10 × 5 × 30 = 1,500 | 1,500 | | The same on Google Jobs, weekly for 4 weeks | 10 × 5 × 4 = 200 | 200 | | Every review page for Stripe ( `total_pages: 157`) | 157 + 1 search | 158 | | Salaries for 20 job titles, first page each, monthly | 20 | 20 | | Indeed search joined to 12 employers | 1 + 12 | 13 | Mixing them, a daily Indeed tracker plus weekly Google Jobs and monthly salaries is 1,500 + 200 + 20 = 1,720 credits a month, inside the Starter pack's 10,000 credits. Purchased credits last 12 months; [pricing](https://perceptlayer.com/pricing) shows what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) explain the balance headers. ## Which source should you use? Choose by the question your output answers. If it's about open roles, start with postings; if it's about the employer or pay, start with Glassdoor; if it's both, join them on the company name and check the match. The verdicts below assume a repeating job, not a one-off look. - **A job board or alert feed**: Indeed. You get `apply_url`, `description_html` and coordinates for a map, and `sort=date` for newest first. Filter titles yourself. - **Only fresh postings**: test Google Jobs with `date_posted`, and keep Indeed's `date_published` as a check. - **Employer research or due diligence**: Glassdoor `companies-search`, then `companies-reviews`. Store `rating`, `summary`, `pros`, `cons` and `date`. - **Pay benchmarks**: Glassdoor `salaries`, using the percentiles and `salaries_count`. [Salary Data from Job Sites](https://perceptlayer.com/blog/salary-data-job-sites-bias) explains how to read those ranges. - **Labour-market trends**: Indeed on a fixed schedule. [Job Posting Data for Labour-Market Research](https://perceptlayer.com/blog/job-posting-data-labour-market-research) sets out a collection plan. - **An agent that matches roles to a CV**: Indeed through MCP. [Job Search Agent](https://perceptlayer.com/blog/job-search-agent-live-postings) builds one. To compare on your own query, run `jobs` in the playground on the [Indeed API page](https://perceptlayer.com/apis/indeed), then `companies-search` on the [Glassdoor API page](https://perceptlayer.com/apis/glassdoor). When the fields fit, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Indeed **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/indeed) - [Glassdoor **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/glassdoor) - [Google Jobs **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/google-jobs) ## Frequently asked questions ### Is there a free jobs API? Every account gets 100 free credits after verifying an email address, with no credit card. Each Indeed, Glassdoor or Google Jobs call costs 1 credit, so that's 100 calls across all three, once; the credits don't renew. Failed calls don't count against it. Beyond that, credits come in prepaid packs; [pricing](https://perceptlayer.com/pricing) has what they cost. ### Can I get salaries for one company? The salaries endpoint takes a required `job_title` and an optional `employer_id`, and each salary entry in the recorded response carries an `employer.id`. Get the `id` from `companies-search`, then pass it as `employer_id`. We haven't recorded the filtered call, so check its output in the playground before you rely on it. ### How do I page through Indeed results? The recorded response has `pagination.next_cursor` and `has_more`, and the endpoint accepts a `cursor` parameter. The names match, so pass the cursor back and stop when `has_more` is false. Each page is one call and 1 credit. Glassdoor uses `page` and reports `total_pages`; Google Jobs takes `next_page_token`. ### Do Glassdoor reviews include personal data? The recorded reviews carry no reviewer names, only `job_title`, `location`, `is_current_employee` and the review text. Treat them as opinions about an employer, and don't try to identify the people who wrote them. Data is collected from publicly available sources and returned as found at the time of the call. ### What happens when a call fails or credits run out? A failed call returns an HTTP status and a JSON body with `error.code`, `error.message` and `request_id`, and costs nothing. A 429 or 503 response carries `Retry-After` with the seconds to wait. When the balance hits zero, calls return `insufficient_credits` (402) and nothing more is debited; there's no automatic top-up. jobs api job postings indeed glassdoor google jobs salary data ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 20 Sept 2026 Perceptlayer 7 min read ## [Salary Data from Job Sites: Reading Ranges Without Bias](https://perceptlayer.com/blog/salary-data-job-sites-bias) Glassdoor's salaries endpoint returns p10 to p90 total pay, a currency and a national count. How to read those ranges and the biases of self-reported pay. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 1 Oct 2026 Perceptlayer 8 min read ## [Job Posting Data for Labour-Market Research](https://perceptlayer.com/blog/job-posting-data-labour-market-research) Which Indeed posting fields support trend analysis, where postings mislead versus hires, and a weekly collection plan that costs 3,000 credits a month. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. --- title: "News API Options: Google News and Search as JSON" description: "Compare three news API routes: Google News returns headline, source.name, iso_date and link per article; web search endpoints don't. 1 credit a query." url: https://perceptlayer.com/blog/news-api-comparison --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # News API Options: Google News and Search as JSON 27 Oct 2026 Perceptlayer 8 min read A news API should give you four things per article: the headline, the publisher, the publish time and the link. `GET /v1/google-news/news` returns all four as named fields, with the date in ISO 8601, for 1 credit a query. A general web search endpoint such as Google Search or Bing also costs 1 credit and finds news pages, but it returns no structured publish date or publisher, so it fits when you need pages about a topic rather than a dated news feed. ## Key takeaways - `GET /v1/google-news/news` returns `news_results[]` with `title`, `source.name`, `iso_date` and `link` on every item in the recorded response, plus `snippet`, `story_token` and `related_publications[].publication_token`. - The same response carries `menu_links[]` with section titles such as `U.S.` and `World` and a `topic_token` each; the endpoint accepts a `topic_token` parameter of the same name. - `GET /v1/google-search/search` returns `organic_results[]` with `title`, `link`, `snippet` and `source`, and `GET /v1/bing/search` returns `data[]` with `title`, `description`, `url` and `domain`. Neither has a date field; a date appears only inside the snippet text, when at all. - Every endpoint here costs 1 credit per successful call and 0 for a failed one. 50 queries every hour for 30 days is 50 × 24 × 30 = 36,000 credits. - The free tier's 100 credits, granted once on signup, cover 100 news queries, enough to test a monitor before you buy a pack. ## What should a news API return? A news API is useful when every item answers four questions without parsing: what's the headline, who published it, when, and where is it. Those four fields let you deduplicate by link, sort and window by time, group by outlet and show a readable list. Anything else, such as a snippet, a thumbnail or a topic label, helps, but a feed missing one of the four needs extra work on every item. The date is the field that separates a news API from a search API. A relative label like `2 days ago` changes meaning depending on when you read it, so you need an absolute timestamp with a time zone to store. The publisher matters for the same reason: a domain tells you the site, while a publisher name lets you group several domains or show the outlet the way readers know it. Use this as your checklist when you compare any news source, including the three below: | Need | Why it matters | What to look for | | --- | --- | --- | | Headline | Display, keyword filters | A `title` field, not text parsed from HTML | | Publisher | Grouping, source weighting | A publisher name, not only a domain | | Publish time | Sorting, date windows, "new since last run" | An absolute timestamp with an offset | | Link | Deduplication, fetching the full article | The publisher's URL | ## What does the Google News endpoint return? The Google News endpoint returns one item per article in `news_results`, and in the recorded response every item has all four fields from the checklist. `title` is the headline, `source.name` the publisher, `iso_date` the publish time in ISO 8601 with an offset, and `link` the article's URL. Each item also has `snippet`, a relative `date` label, thumbnail URLs and two kinds of token. A successful call costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/google-news/news?q=technology" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the second article and the first section link: ```json { "news_results": [ … { "position": 2, "title": "How did AI discover the internet's massive cyber-security risk?", "link": "https://www.bbc.com/news/videos/cq0ld7e0jg2eo", "type": "article", … "iso_date": "2026-10-22T12:17:44+00:00", "published_at": "2026-10-22 12:17:44 UTC", "date": "today", … "source": { "name": "BBC", … }, "story_token": "CBMiWEFVX3lxTFBkQ0VLSmdYNkk0TzVBZGtlU3piaFlGejFNemlncTZRTWR2MjFlNDhpWWNiVnJMYk5PRUo3eHJ2YlppUmtoLW5FbERMTFNBZ2xkMVhzNmpFWXU", "related_publications": [ { "title": "BBC", … "publication_token": "CAAqIAgKIhpDQklTRFFnTWFna0tCMkppWXk1amIyMG9BQVAB" } ] } ], "menu_links": [ { "title": "U.S.", "link": "https://news.google.com/topics/CAAqIggKIhxDQkFTRHdvSkwyMHZNRGxqTjNjd0VnSmxiaWdBUAE?hl=en-US&gl=US&ceid=US%3Aen", "topic_token": "CAAqIggKIhxDQkFTRHdvSkwyMHZNRGxqTjNjd0VnSmxiaWdBUAE" }, … ] } ``` Store `iso_date`, not `date`. In the same response, the first article's `date` reads `2 days ago` while its `iso_date` is `2026-10-20T15:59:45+00:00`; only the second value means the same thing next week. The endpoint's [News page](https://perceptlayer.com/apis/google-news/news) lists all eleven optional parameters. ### How do topic and source tokens appear in the response? The response carries three kinds of token, and the endpoint accepts parameters with the same names. Section links sit in `menu_links[]`, each with a `title` and a `topic_token`. Each article has a `story_token`, and each entry in its `related_publications[]` has a `publication_token`. The endpoint takes `topic_token`, `story_token` and `publication_token` as optional string parameters. We haven't recorded calls that pass these tokens back, so we don't describe what they return. The names match, which makes them the obvious thing to try: copy a `topic_token` from `menu_links[]` into the `topic_token` parameter in the playground on the [Google News API page](https://perceptlayer.com/apis/google-news) and look at the result before you build on it. Each such call is 1 credit, like any other. ## When is a general search endpoint enough? A general search endpoint is enough when you want pages about a subject and don't need a dated, per-publisher feed. Google Search and Bing both return ranked web results for a query at 1 credit a call, and news articles show up among them. What you give up is structure: neither recorded response has a publish-date field or a publisher field in the news sense. Here is the recorded Google Search result, trimmed to its first organic result: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` ```json { "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", … "snippet": "Dec 3, 2025 — …", … }, … ], … } ``` The date is there, but as the first words of `snippet`, in whatever format the page shows. The Bing response is flatter still: `data[]` items with `position`, `title`, `description`, `url` and `domain`, where one recorded `description` begins with `Sep 14, 2026 ·`. You'd have to parse dates out of free text, and not every result has one. The Bing recording also shows why web results need a relevance check. For the query `best web scraping api`, the first two recorded results were an internet provider's home page and a dictionary entry for the word "best". A news endpoint scopes results to news articles; a web search returns whatever ranks. Google Search has more levers worth testing. Its `tbm` parameter accepts the value `nws` among others, and the `search-light` endpoint takes `sort` (one of `date`, `date:r`, `date:d`) and `dateRestrict`. We haven't recorded those calls, so try them in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search) before you rely on them. [SERP API: What It Returns and What a Query Costs](https://perceptlayer.com/blog/serp-api-explained) covers the web search responses in more depth. ## How do the three endpoints compare? The three endpoints cost the same per call, so the choice comes down to the fields you get and how much parsing you're willing to do. Google News fills the whole checklist from the first section. Google Search and Bing fill two or three of the four, and the publish time is never a field. | | Google News | Google Search | Bing | | --- | --- | --- | --- | | Endpoint | `GET /v1/google-news/news` | `GET /v1/google-search/search` | `GET /v1/bing/search` | | Required parameters | None ( `q` optional) | `query` | `query` | | Headline | `title` | `title` | `title` | | Publisher | `source.name` | `source`, a name string | `domain` only | | Publish time | `iso_date`, `published_at` | Only inside `snippet` text, if shown | Only inside `description` text, if shown | | Link | `link` | `link` | `url` | | Extra structure | `story_token`, `publication_token`, `menu_links[].topic_token` | `related_questions`, `related_searches`, `local_results` | `results_on_page` | | Scope | News articles | The whole web | The whole web | | Cost | 1 credit | 1 credit | 1 credit | One code path can read all three into the same four columns. This script uses only fields from the recorded responses and leaves the date empty where the endpoint has none: ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, params): r = requests.get(BASE + path, params=params, headers=HEADERS, timeout=30) r.raise_for_status() return r.json() def google_news(q): for item in get("/v1/google-news/news", {"q": q})["news_results"]: yield item["title"], item["source"]["name"], item["iso_date"], item["link"] def google_search(q): for item in get("/v1/google-search/search", {"query": q})["organic_results"]: yield item["title"], item.get("source"), None, item["link"] def bing(q): for item in get("/v1/bing/search", {"query": q})["data"]: yield item["title"], item["domain"], None, item["url"] for row in google_news("technology"): print(row) ``` Each function is one call and 1 credit. `raise_for_status()` stops on an error; a failed call costs nothing, and the [errors docs](https://docs.perceptlayer.com/errors) list the codes you'll see in `error.code`. ## Which one should you use? Pick by what the output feeds. If it's a feed, a timeline or an alert keyed on time, use the endpoint that gives you a timestamp field. If it's research on a topic where the page matters more than the date, a web search is fine and gives you a wider net. - **News monitoring and alerts** (brand mentions in the press, a competitor's announcements): use Google News. Deduplicate on `link`, window on `iso_date`, group on `source.name`. [News Data for Event Detection](https://perceptlayer.com/blog/news-data-event-detection) shows how to turn those results into signals. - **Following one section or one outlet**: start with Google News and test the `topic_token` and `publication_token` values from a response in the playground. - **Topic research for an agent** (what's being written about X, from any kind of site): use Google Search. You also get `related_questions` and `related_searches` to widen the next query. - **A second index or a cross-check**: add the [Bing API](https://perceptlayer.com/apis/bing). Its results are a plain list, so filter them for relevance before you use them. - **One publisher's own articles**: if that publisher offers its own feed or API, use it; it's the simpler source for a single outlet. - **Years of history or full article text**: none of these. They return what search shows at the time of the call, so licensed archives or the publishers themselves fit better. ## What does a news monitor cost? A news monitor costs 1 credit per query per run on any of the three endpoints, so the bill is queries × runs × days. Failed calls cost nothing and return `X-Credits-Used: 0`, and every successful response carries `X-Credits-Remaining`, so a monitor can log its own balance as it goes. | Monitor | Calls a month | Credits | Fits in | | --- | --- | --- | --- | | 10 queries, 3 times a day | 10 × 3 × 30 = 900 | 900 | Starter pack (10,000); the 100 free credits cover the first 3 days | | 30 queries, 4 times a day | 30 × 4 × 30 = 3,600 | 3,600 | Starter pack (10,000) | | 50 queries, every hour | 50 × 24 × 30 = 36,000 | 36,000 | Build pack (50,000) | | 50 queries hourly on News, plus 50 daily on Search | 36,000 + 1,500 | 37,500 | Build pack (50,000) | Purchased credits last 12 months and there's no subscription; [pricing](https://perceptlayer.com/pricing) shows what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) explain the headers. On rate: free accounts get 1 request a second and paid accounts at least 5, so 50 queries an hour is far inside either. A 429 response carries `Retry-After`; the [rate limit docs](https://docs.perceptlayer.com/rate-limits) cover the rest. If an agent is the caller, the same endpoints are tools through the MCP server at `https://perceptlayer.com/mcp`: `search_endpoints` finds them for free and `call_endpoint` runs them, spending credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. To see the fields with your own query first, run `q=technology` in the playground on the [Google News API page](https://perceptlayer.com/apis/google-news), then [get a free API key](https://perceptlayer.com/signup) when the shape fits. ## APIs in this post - [Google News **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-news) - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Bing **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/bing) ## Frequently asked questions ### Is there a free news API? Every account gets 100 free credits once, after verifying an email address, with no credit card. A Google News call costs 1 credit, so that's 100 news queries, not a monthly allowance. Failed calls don't count. Beyond that, credits come in prepaid packs starting at 10,000; [pricing](https://perceptlayer.com/pricing) has what they cost. ### Does the Google News endpoint return the full article text? No. Each item has a `title`, a short `snippet` and the `link` to the article on the publisher's site. To get the full text you'd fetch that page yourself, which is a separate step governed by the publisher's own terms. Read those before you store or republish anything beyond headlines and links. ### Can I filter news results by date? The Google News endpoint has no date parameter in its documentation, so filter on `iso_date` in your own code after the call. Google Search's `search-light` endpoint accepts `sort` and `dateRestrict` parameters, but we haven't recorded those calls; test them in the playground before you depend on them for date windows. ### Which fields should I store from each news result? Store `link` as the identity, `iso_date` for time, `source.name` for the publisher and `title` for display. Skip the relative `date` label, which changes as time passes, and don't key on `position`, which only numbers results within one response. Data is returned as found at the time of the call, so record when you fetched it. ### What happens when a call fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `request_id`, and the call costs nothing. Rate-limited (429) and unavailable (503) responses include a `Retry-After` header with the seconds to wait. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. news api google news news monitoring search api json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Sept 2026 Updated 22 Oct 2026 Perceptlayer 7 min read ## [Google News API: Search News Articles as JSON](https://perceptlayer.com/blog/google-news-api) One GET call to /v1/google-news/news returns articles with title, link, source and ISO date as JSON for 1 credit. Parameters, a real response, cost. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Google News Scraper or API: What You Get](https://perceptlayer.com/blog/google-news-scraper-vs-api) A Google News scraper vs a 1-credit news call: the recorded response with iso\_date, source and story\_token, and 4 credits per tracked query per day. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 21 Aug 2026 Updated 6 Nov 2026 Perceptlayer 6 min read ## [DuckDuckGo Search API: Web Results as JSON](https://perceptlayer.com/blog/duckduckgo-search-api-json) DuckDuckGo's Instant Answer API returns topic summaries, not ranked links. GET /v1/duckduckgo/search returns organic results and paging at 1 credit per query. --- title: "AI Agent Tools: What an Agent Needs for Web Data" description: "An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free." url: https://perceptlayer.com/blog/ai-agent-tools-web-data --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # AI Agent Tools: What an Agent Needs for Web Data 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read AI agent tools are functions a model can ask to run: each has a name, a description, an input schema and a result the model reads back. For web data, an agent needs three kinds: search to find candidates, lookup to get details on one known item, and fetch to retrieve data for exact inputs. Perceptlayer's MCP server covers all three with `search_endpoints`, `get_endpoint` and `call_endpoint`; the first two are free and the third costs the endpoint's credits on success. ## Key takeaways - A tool has four parts: a name the model calls, a description that tells it when to call, an input schema for the arguments, and a result it reads. - Web data work splits into search (query in, candidates out), lookup (an ID in, one record out) and fetch (exact inputs in, a dataset out). - `search_endpoints` and `get_endpoint` only look up the catalogue of 2,782 endpoints and cost nothing; `call_endpoint` runs one and spends its credits, 1 for nearly all, on success only. - The worked example below answers a two-part question with two data calls: Google Maps `simple-search` and `directions`, 2 credits in total. - What a tool returns matters as much as what it calls: pass the model `name`, `rating` and `full_address`, not all 28 fields a recorded place carries. ## What is a tool for an AI agent? A tool is a contract between your code and the model. The model never runs anything itself: it reads the tool's name and description, decides a call would help, writes arguments that match the input schema, and your code (or an MCP server) runs the call and hands back the result. The model then reads that result as text and carries on. Each of the four parts does a different job: | Part | What it does | What goes wrong when it's weak | | --- | --- | --- | | Name | The identifier the model emits to call the tool | Similar names lead to the wrong tool being picked | | Description | Tells the model when the tool helps and what it returns | The model calls it for the wrong questions, or never | | Input schema | Typed arguments, which are required, allowed values | Invalid arguments and wasted round trips | | Result | The data the model reads after the call | Bloated results fill the context window | Here is a tool for one web data endpoint, written as a plain Python dict. The parameter names, types and allowed values come from the Google Maps directions endpoint in the catalogue: ```python directions_tool = { "name": "driving_directions", "description": "Routes between two places from Google Maps, with distance and duration. " "Use when the user asks how far or how long a trip is.", "input_schema": { "type": "object", "properties": { "origin": {"type": "string", "maxLength": 500}, "destination": {"type": "string", "maxLength": 500}, "mode": {"type": "string", "enum": ["driving", "walking", "bicycling", "transit"]}, }, "required": ["origin", "destination"], }, } ``` Agent frameworks each take this in their own format, but the four parts are the same. ## Which kinds of tools does an agent need for web data? Most web data questions break into three moves, and each move is a different kind of tool. Search turns an open question into candidates. Lookup takes one candidate's ID and returns its details. Fetch takes exact inputs and returns a dataset for them. An agent that has one tool of each kind can answer most "find, then check" questions. | Kind | Input | Output | Example endpoint | | --- | --- | --- | --- | | Search | A query | A ranked list of candidates | `GET /v1/google-search/search` ( `query`), `GET /v1/google-maps/simple-search` ( `query`) | | Lookup | An ID from a previous result | One record in detail | `GET /v1/google-maps/business-details` ( `business_id`) | | Fetch | Exact inputs | Data computed or collected for them | `GET /v1/google-maps/directions` ( `origin`, `destination`) | Search covers the open web too: the [Google Search API](https://perceptlayer.com/apis/google-search) returns ranked results for a `query` at 1 credit, the same as a place search. The link between search and lookup is the ID. In the recorded `simple-search` response each place has a `business_id`, and `business-details`, `reviews` and `photos` all take a parameter of the same name. That shared name is what lets an agent chain the calls without a human copying values between them. You could write one tool per endpoint, but the catalogue has 2,782 endpoints across 480 websites. Describing them all would fill the model's context before it read the question. [MCP Server Too Many Tools](https://perceptlayer.com/blog/mcp-too-many-tools-context) works through that problem in numbers. ## How do the MCP server's three tools map onto search, lookup and fetch? The MCP server at `https://perceptlayer.com/mcp` applies the same three kinds one level up, to the catalogue itself. `search_endpoints` is a search tool over endpoints, `get_endpoint` is a lookup of one endpoint's catalogue entry, and `call_endpoint` is the fetch: it takes an endpoint ID and that endpoint's parameters and returns the endpoint's JSON response. | MCP tool | Kind | What it does | Cost | | --- | --- | --- | --- | | `search_endpoints` | Search | Finds endpoints in the catalogue that match what the agent needs | 0 credits | | `get_endpoint` | Lookup | Looks up one endpoint in the catalogue, by ID | 0 credits | | `call_endpoint` | Fetch | Runs the endpoint with the given parameters and returns its JSON | The endpoint's credits (1 for nearly all), on success only | So the model's context holds three tool definitions instead of 1,642, and it pays only when it actually fetches data. `call_endpoint` also reports the credits used and remaining, so the agent can see its spend after every call. To add the server to Claude Code: ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` [What Is an MCP Server?](https://perceptlayer.com/blog/what-is-an-mcp-server) shows the protocol messages, and the [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover other clients. ## What does a worked example look like? Take the question "Where's a well-rated restaurant in New York, and how long is the drive to Boston from there?". It needs one search and one fetch. The agent first uses the two free tools to find and read the Google Maps endpoints, then makes two paid calls: `simple-search`, then `directions`. Total: 2 credits. ### Step 1: find the endpoints (0 credits) The agent calls `search_endpoints` to find a place search and a directions endpoint, then `get_endpoint` on each to read its catalogue entry. That's where it sees that `simple-search` requires `query` and `directions` requires `origin` and `destination`. Neither call spends credits. ### Step 2: search for places (1 credit) The agent runs `call_endpoint` with the `simple-search` endpoint. The same request over HTTP: ```bash curl "https://api.perceptlayer.com/v1/google-maps/simple-search?query=restaurants+in+new+york" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed: ```json { "items": [ { "name": "Altair Restaurant NYC", "review_count": 1225, "rating": 4.8, "business_id": "0x89c2591598891521:0x4ebcde18610e64", "subtypes": [ "New American restaurant", "Restaurant" ], "full_address": "351 W 38th St, New York, NY 10018, United States", … }, { "name": "Lulla NYC", "review_count": 1571, "rating": 4.8, … } ], "pagination": { "current_page": 0, "total_results": 173, "has_more": false } } ``` ### Step 3: fetch the route (1 credit) Next the agent calls [directions](https://perceptlayer.com/apis/google-maps/directions). The recorded call used city names for both ends: ```bash curl "https://api.perceptlayer.com/v1/google-maps/directions?origin=New+York%2C+NY&destination=Boston%2C+MA" \ -H "X-API-Key: $API_KEY" ``` ```json { "search_parameters": { "start_addr": "New York, NY", "end_addr": "Boston, MA", "travel_mode": "driving" }, "directions": [ { "travel_mode": "Driving", "via": "I-90 E", "formatted_distance": "216 miles", "formatted_duration": "3 hr 46 min", "extensions": [ "This route has tolls." ], "formatted_duration_in_traffic": "3 hr 36 min", "typical_duration_range": "3 hr 24 min to 4 hr 13 min", … }, { "travel_mode": "Driving", "via": "I-95 N", "formatted_distance": "234 miles", "formatted_duration": "4 hr 11 min", … } ], "status": "OK", "routes_count": 3 } ``` The model now has enough to answer: two restaurants rated 4.8, and a drive of about 3 hr 46 min via I-90 E, with tolls. In the same recording, `places_info` came back with coordinates of 0 and an empty `data_id`, so the agent should read the `directions` entries and not rely on `places_info`. Passing the restaurant's `full_address` as `origin` instead of a city name is the obvious refinement; it's still one call. ## What should a tool hand back to the model? A tool's result should carry the fields the model needs to answer and nothing else. The recorded `simple-search` place has 28 top-level fields, including photo samples, owner links and accessibility attributes. Each one costs tokens every time the model reads the result. If you wrap the endpoint yourself, trim it in code before returning: ```python import os import requests def find_places(query, limit=5): resp = requests.get( "https://api.perceptlayer.com/v1/google-maps/simple-search", params={"query": query}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60, ) if resp.status_code != 200: return {"error": resp.json().get("error", {}).get("code")} keep = ("name", "rating", "review_count", "full_address", "business_id") return [{k: p.get(k) for k in keep} for p in resp.json().get("items", [])[:limit]] ``` Keep `business_id` even though the model won't show it to the user: it's what a later lookup needs. For reviews, the recorded `reviews` items include `author_name`, `author_link` and profile photos; drop those and pass `rating`, `timestamp` and `review_text`. [Trim API Responses for LLM Context](https://perceptlayer.com/blog/trim-api-responses-llm-context) goes further. Errors are results too. A failed call returns an HTTP status and a JSON body with `error.code`, such as `invalid_parameters` (422) or `rate_limited` (429), and costs nothing. Return the code to the model so it can fix its arguments or wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does an agent's tool use cost? Discovery is free and data costs per successful call, so an agent's bill is the number of data calls that succeed. The worked example above is 2 credits per question. At 200 questions a day, that's 200 × 2 × 30 = 12,000 credits a month, well past the 100 free credits and inside the Build pack's 50,000. An agent that asks for reviews on its top pick adds one more credit per question. The free tier is 100 credits, granted once when you verify your email, with no card, which covers 50 runs of the example. See [pricing](https://perceptlayer.com/pricing) for packs. To try the calls yourself, run `simple-search` and `directions` in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps), then [get a free API key](https://perceptlayer.com/signup) and add the MCP server. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### What are AI agent tools? AI agent tools are functions a model can request by name. Each has a description that tells the model when to use it, an input schema for its arguments, and a result the model reads after your code or an MCP server runs the call. For web data, the useful kinds are search, lookup and fetch. ### Do search\_endpoints and get\_endpoint cost credits? No. Both only look up the catalogue and cost nothing, so an agent can browse endpoints and read their parameters as often as it needs. Only `call_endpoint` spends credits: the endpoint's cost, 1 for nearly all, and only when the call succeeds. It reports the credits used and remaining after each call. ### How many tools should an agent have? As few as cover its questions. Every tool definition sits in the model's context, so one tool per endpoint doesn't scale to 2,782 endpoints. Either write a handful of trimmed tools for the endpoints you use most, or give the agent the three MCP tools and let it find endpoints with `search_endpoints` when it needs them. ### What happens when a tool call fails? The endpoint returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, and nothing is debited. `rate_limited` (429) and `temporarily_unavailable` (503) come with a `Retry-After` header. Pass the code back to the model so it can correct its arguments, wait, or try another source. ### Can I use these tools without MCP? Yes. Every endpoint is a plain HTTPS `GET` with an `X-API-Key` header, so you can wrap any of them as a function tool in your own framework, as the `find_places` example does. MCP saves you writing and maintaining those wrappers; hand-written tools let you trim each result exactly. ai agents mcp tool calling web data google maps ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 20 Jul 2026 Perceptlayer 7 min read ## [LLM Tool Schema Design: A Checklist for Web APIs](https://perceptlayer.com/blog/agent-tool-schema-design-web-apis) LLM tool schema design checklist, applied to the Google Maps simple-search endpoint: a before and after schema that cuts 28 result fields to 7. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Sept 2026 Perceptlayer 7 min read ## [MCP Server Too Many Tools: Keeping Agent Context Small](https://perceptlayer.com/blog/mcp-too-many-tools-context) One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small. --- title: "API Pagination: Cursors, Pages and Offsets in Practice" description: "Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page." url: https://perceptlayer.com/blog/api-pagination-patterns --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # API Pagination: Cursors, Pages and Offsets in Practice 26 Oct 2026 Perceptlayer 7 min read API pagination splits a large result set across several responses, and each response tells you how to ask for the next one. There are three common patterns: offsets (skip N items), page numbers (ask for page 2) and cursors or tokens (send back an opaque string the last response gave you). You can tell which one an endpoint uses from its parameters and response fields. This explainer reads all three in recorded responses from Indeed, Craigslist and Google Play, then builds one loop that stops correctly and costs what you planned. ## Key takeaways - Craigslist search is page-based: the recorded response reports `page` 1, `per_page` 360, `total` 821 and `has_more: true`, and the endpoint takes a `page` parameter. - Indeed jobs is cursor-based: the response carries `pagination.next_cursor` and `pagination.has_more`, and the endpoint takes a `cursor` parameter. - Google Play reviews is token-based: the response carries `pagination.next_page_token`, and the endpoint takes `next_page_token`. It has no `has_more` flag in the recording. - A loop should stop on the first of: no next page, an empty page, a page with no new IDs, a page cap or a credit ceiling. - Every page is a separate call at 1 credit, so a pull of N pages costs N credits; failed calls cost nothing. ## What are the three kinds of API pagination? The three kinds differ in what you send to get the next page. With offsets you send how many items to skip, with page numbers you send which page you want, and with cursors or tokens you send back a string the previous response handed you. Offsets and page numbers let you jump to any position; cursors only let you continue from where the last response ended. | Pattern | You send | The response tells you | In the recordings below | | --- | --- | --- | --- | | Offset | How many items to skip, often with a limit | Sometimes a total count | None of the three | | Page number | A page number, sometimes a page size | Current page, page size, total, whether more exist | Craigslist `page`, `per_page`, `total`, `has_more` | | Cursor | The cursor from the last response | The next cursor and whether more exist | Indeed `next_cursor`, `has_more` | | Page token | The token from the last response | The next token | Google Play `next_page_token` | Offset and page-number schemes share a weakness when the list changes while you read it. If a new item lands at the top between your calls, everything shifts down one place, and the first item of your next page is the one that ended the last. A cursor or token is meant to mark a position in the result set rather than a count, but you can't see from the outside how a given server handles changes. Whatever the pattern, deduplicate by ID. ## How does page-number pagination look in a real response? Page-number pagination puts the bookkeeping in the response: where you are, how big a page is, how many items match and whether more exist. The Craigslist search endpoint returns all four. This is the recorded response for bikes in Portland between 50 and 300, trimmed to the paging fields and the first result: ```bash curl "https://api.perceptlayer.com/v1/craigslist/search?site=portland&category=bia&query=bike&min_price=50&max_price=300" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "total": 821, "page": 1, "per_page": 360, "has_more": true, "results": [ { "position": 1, "id": "wnD16b4hEY7DaHprfGYGAg", "posting_id": 7988730852, "title": "21\" Specialized Sirrus A1 commuter", "price": 250, "currency": "USD", … }, … ] }, … } ``` The request sent no `page`, and the response reports `page` 1. The endpoint takes a `page` integer, so the next request is the same call with `page=2`. No recording shows page 2 yet, so check that it returns different listings before you depend on it. `total` lets you estimate the pull before you start: 821 ÷ 360 = 2.3, so 3 pages if every page but the last is full. Keep every filter identical across pages, or you are reading two result sets. The [Craigslist Search endpoint page](https://perceptlayer.com/apis/craigslist/search) lists its parameters. ## How do cursor and token pagination look? Cursor and token pagination hand you an opaque string with each response and expect it back on the next request. You don't build it, read it or change it; you store it and send it. Indeed returns a cursor with a `has_more` flag next to it. This is the recorded response from `GET /v1/indeed/jobs`, trimmed: ```bash curl "https://api.perceptlayer.com/v1/indeed/jobs?query=software+engineer&location=Berlin&country=DE&job_type=full_time&limit=20" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "jobs": [ { "id": "61ac648a11df5cc6", "title": "Product Designer", "company": { "name": "Telli", … }, "date_published": "2025-07-21 05:00:00", … }, … ], "pagination": { "next_cursor": "ABQAAYEAFAAAAAAAAAAAAAAAAmYRNdcAMgEBAQcpfSGrk7wi9QBuLZ6BEihQwmDA0xA2nDAGrqtuJIdLnPZKyLE0IcnT2+IETfyRAAA=", "has_more": true }, "metadata": { "total_results": 20, "timestamp": "2026-10-21T13:25:37.233649Z" } } } ``` The endpoint takes a `cursor` parameter, and its name matches `pagination.next_cursor`, so sending that value back as `cursor` is the obvious next request. No recording shows a cursor being passed back, so test it in the playground on the [Indeed API page](https://perceptlayer.com/apis/indeed) first. `metadata.total_results` is 20, the same as the `limit` sent, and the recording doesn't show whether it counts the page or every match, so don't size a pull from it. Google Play's reviews endpoint uses a token and no flag. The recorded response from `GET /v1/google-play/product-reviews` for `product_id=com.spotify.music`, `num=20`, trimmed, with reviewers' names and avatars left out: ```json { "search_parameters": { "product_id": "com.spotify.music", "store": "apps", "num": 20, … }, "reviews": [ { "id": "6b8cd845-6fcd-4296-b05e-9e1b3feada62", "rating": 1, "snippet": "Spotify has a new, horrendous feature where the ending to the song that you are listening to gets cut off by the middle of the next song. …", "date": "September 15, 2026", … }, … ], "pagination": { "next_page_token": "CrABIqcBAV8d1P3Y4jmqTOdZ4xBJ7QnJyYmH9-QZ8psto-gkJJgGAGdBmyMjzuevISIZC-cPmxGWGPNbx6bIhfWsgxAO49jzTgsGLftwszEwCFE3Fi_vfO00Nsb7-YIFPGW7ebKtcGy5BA2Ma_edk5CuQ5Z0N8VD…" } } ``` The endpoint takes `next_page_token`, the same name as the response field, and again no recording shows it passed back. Without a `has_more` flag, the only end signal is the token itself, and no recording shows a last page either. So treat a missing token as the end, and back it up with the guards below. The [Google Play Product Reviews page](https://perceptlayer.com/apis/google-play/product-reviews) has the parameters. ## How do you write a pagination loop that stops correctly? Write the loop around its exit conditions and keep the pattern-specific part small. A single loop can handle all three endpoints if each one supplies a function that takes the current position and returns the items, the next position and the credits the call used. The loop then stops on the first of six conditions and reports which one, so a partial pull is never mistaken for a full one. ```python import os import time import requests API = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, params): r = requests.get(f"{API}{path}", params=params, headers=HEADERS, timeout=60) if r.status_code != 200: try: code = r.json().get("error", {}).get("code") except ValueError: code = None raise RuntimeError(f"{r.status_code} {code}") return r.json(), int(r.headers.get("X-Credits-Used", 0)) def craigslist_page(page): params = {"site": "portland", "category": "bia", "query": "bike", "min_price": 50, "max_price": 300, "page": page or 1} body, cost = get("/v1/craigslist/search", params) data = body["data"] nxt = data["page"] + 1 if data.get("has_more") else None return data.get("results", []), nxt, cost def indeed_page(cursor): params = {"query": "software engineer", "location": "Berlin", "country": "DE", "job_type": "full_time", "limit": 20} if cursor: params["cursor"] = cursor body, cost = get("/v1/indeed/jobs", params) paging = body["data"].get("pagination", {}) nxt = paging.get("next_cursor") if paging.get("has_more") else None return body["data"].get("jobs", []), nxt, cost def play_reviews_page(token): params = {"product_id": "com.spotify.music", "store": "apps", "num": 20} if token: params["next_page_token"] = token body, cost = get("/v1/google-play/product-reviews", params) nxt = body.get("pagination", {}).get("next_page_token") return body.get("reviews", []), nxt, cost def paginate(fetch_page, max_pages=5, credit_ceiling=5): seen, spent, position = {}, 0, None for _ in range(max_pages): if spent >= credit_ceiling: return list(seen.values()), spent, "credit ceiling reached" items, nxt, cost = fetch_page(position) spent += cost new = 0 for item in items: if item["id"] not in seen: seen[item["id"]] = item new += 1 if not items: return list(seen.values()), spent, "empty page" if new == 0: return list(seen.values()), spent, "page added no new IDs" if nxt is None: return list(seen.values()), spent, "no next page" if nxt == position: return list(seen.values()), spent, "next position repeated" position = nxt time.sleep(1) # free accounts get 1 request a second return list(seen.values()), spent, "page cap reached" for name, fetch in [("craigslist", craigslist_page), ("indeed", indeed_page), ("google play", play_reviews_page)]: items, spent, reason = paginate(fetch) print(f"{name}: {len(items)} items, {spent} credits, stopped: {reason}") ``` All three responses carry an `id` per item, which is the dedupe key. The "no new IDs" and "next position repeated" checks catch a cursor that isn't being applied: if the endpoint ignored it, you'd get the first page again, and the loop stops after paying for one repeat instead of running to its cap. The loop reads `X-Credits-Used` rather than assuming 1, so the ceiling holds if a price changes. For retries inside a pull, see [Handle Web Data API Errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python); for a page loop with retries and a balance check, see [Paginate a Web Data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## What does each extra page cost? Each page is one call, and each successful call on these endpoints costs 1 credit, so the cost of a pull is its page count. Failed calls cost nothing and return `X-Credits-Used: 0`. A client timeout is the exception: requests have no idempotency key, so a page whose reply was lost may have been billed, and fetching it again costs another credit. | Pull | Calculation | Credits | | --- | --- | --- | | Craigslist, all 821 bike listings at 360 a page | 821 ÷ 360 = 2.3, so 3 pages × 1 credit | 3 | | Craigslist, then each listing's posting details | 3 + 821 × 1 credit | 824 | | Indeed, 10 pages at `limit=20` | 10 × 1 credit | 10 | | Google Play, 1,000 reviews at `num=20` | 1,000 ÷ 20 = 50 pages × 1 credit | 50 | The rows that divide assume full pages; the recordings show one page each, so the real count may be higher. The second row is the one to notice: paging through search results is cheap, and the detail call per item is where the credits go. Fetch details only for the items you keep. The 100 free credits on signup cover the first, third and fourth rows; the 824-credit detail pull needs a pack. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how balances work. When you pull on a schedule, you rarely need every page again. [Incremental API Data Pulls](https://perceptlayer.com/blog/incremental-api-data-pulls) covers stopping at the first item you've already stored, which keeps a daily run to a page or two. More pipeline guides are in the [data engineering category](https://perceptlayer.com/blog/category/data-engineering). To see the three shapes for yourself, run the Craigslist search, the Indeed jobs call and the Google Play reviews call in the playgrounds on the [Craigslist](https://perceptlayer.com/apis/craigslist), [Indeed](https://perceptlayer.com/apis/indeed) and [Google Play](https://perceptlayer.com/apis/google-play) API pages, then pass the next page value back and compare the IDs. ## APIs in this post - [Indeed **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/indeed) - [Craigslist **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/craigslist) - [Google Play **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/google-play) ## Frequently asked questions ### Which is better, cursor or offset pagination? Cursors suit lists that change while you read them, because they mark a position rather than a count. Offsets and page numbers let you jump to page 5 directly and estimate the total pages from a count. As a client you don't choose: you use what the endpoint takes. Deduplicate by ID either way. ### How do I know when to stop paginating? Stop at the first end signal the response gives: `has_more` false on Craigslist or Indeed, or no `next_page_token` on Google Play. Back that up with guards that don't trust the server: an empty page, a page with no new IDs, a page cap and a credit ceiling. Return the reason the loop stopped. ### Can I fetch pages in parallel? With page numbers you can, because each request names its page. With cursors and tokens you can't, because each request needs the value from the previous response. Within one pull, cursor paging is sequential; run different queries in parallel instead, within your rate limit, which the [rate limit docs](https://docs.perceptlayer.com/rate-limits) explain. ### Do cursors expire? None of these three endpoints documents a cursor or token lifetime, so don't store one for later and expect it to work. Treat a cursor as valid for the pull that produced it. If a resumed pull fails or returns the first page again, start over from the first page and let deduplication drop what you already have. ### Does a failed page cost credits? No. Only a successful response debits credits. A 429, 502 or 503 returns `X-Credits-Used: 0`, so retrying the same page after the `Retry-After` seconds costs nothing extra. If your balance runs out mid-pull, the next call returns `insufficient_credits` (402) and nothing more is debited. pagination api design cursors python data engineering ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 24 Sept 2026 Perceptlayer 7 min read ## [Fetch Incremental Data From an API: Only New Records](https://perceptlayer.com/blog/incremental-api-data-pulls) Fetch incremental data from an API: sort newest first, keep a high-water mark or seen-ID set per query, and stop paging early. Python, Craigslist and eBay. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 31 Jul 2026 Perceptlayer 8 min read ## [Paginate a Web Data API in Python: Safe Page Loops](https://perceptlayer.com/blog/paginate-web-data-api-python) Page through the eBay search endpoint in Python with has\_more, dedupe by product\_id and a credit ceiling. Each page costs 1 credit. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "Zillow Scraper or API: Listing Data Without Upkeep" description: "Compare a Zillow scraper with Zillow endpoints at 1 credit a call: a recorded Seattle search with zpid, price and Zestimate, and the cost per listing per day." url: https://perceptlayer.com/blog/zillow-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Zillow Scraper or API: Listing Data Without Upkeep 26 Oct 2026 Perceptlayer 8 min read A Zillow scraper is a program that loads Zillow's search and home pages and pulls price, beds, address and status out of what the page sends back. You own every part of it: the requests, the parsing, the fixes when the page changes and the blocks when traffic looks automated. The other route is a set of Zillow endpoints that return the same listing data as JSON at 1 credit a call. This post compares the two on a real Seattle search, works out the cost per listing tracked per day, and gives a verdict per use case. ## Key takeaways - A Zillow scraper has three jobs you maintain yourself: fetching pages without being blocked, finding the data inside each page, and noticing when either breaks. - `GET /v1/zillow/search` takes `latitude`, `longitude` and `radius_mi`, and returns `listings[]` with `zpid`, `address`, `price.value`, `bedrooms`, `bathrooms`, `livingArea`, `listing.listingStatus` and, where present, `estimates.zestimate`. - The recorded Seattle search returned `count: 20` of `total_matching_count: 2058`, for 1 credit. Its `paging_note` says `page * page_size` must not exceed 1000. - Tracking 1,000 listings once a day at 20 listings a page is 50 calls × 1 credit = 50 credits a day, or 0.05 credits per listing per day. - Failed calls cost nothing and return `X-Credits-Used: 0`, so a run that fails doesn't show up on your balance. ## What does building a Zillow scraper involve? A Zillow scraper is three pieces of code that all need upkeep: a fetcher, a parser and a monitor. The fetcher requests search pages for an area and then each home's detail page. The parser finds price, address, beds, baths, status and any estimate inside the HTML or the data embedded in it. The monitor tells you when a run returns fewer rows or empty fields than yesterday, because a scraper rarely fails loudly. Each piece breaks for its own reasons. Pages on a large property portal change as the site ships features, so a field you parsed last month can move or disappear. Any site that size has to tell people from automated traffic, so a scraper that runs every day at volume should expect slow responses, challenge pages and blocked requests. When that happens, stop and reconsider: getting around a site's protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. Then there's the question of what you're allowed to do. Read Zillow's terms of use, and the terms attached to any listing data you store, before you build a collector. If your work needs licensed listing data, such as showing listings on a brokerage site, [MLS API: How to Get MLS Listing Data](https://perceptlayer.com/blog/mls-api-listing-data) covers that route. For the general case of when a scraper is worth writing, [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) is a practical starting point. ## What do the Zillow endpoints return? The Zillow API on Perceptlayer has 10 endpoints, all `GET`, all 1 credit per successful call. The ones that replace a scraper are search near a place, property details by `zpid`, photos, Zestimate accuracy and market data. Search does most of the work: one call returns a page of listings with the fields a scraper would otherwise parse, already named and typed. | Endpoint | What it's for | Parameters you'll use first | | --- | --- | --- | | `GET /v1/zillow/search` | Listings near a point, in a box, a region or a polygon | `latitude`, `longitude`, `radius_mi`, `listing_category`, `page`, `page_size` | | `GET /v1/zillow/property` | Property details | `zpid[]` | | `GET /v1/zillow/photos` | Photos for properties | `zpid[]` | | `GET /v1/zillow/zestimate-accuracy` | Zestimate accuracy | `state`, `metro`, `stage` | | `GET /v1/zillow/market-data` | Market statistics | `family`, `geography` (City, County, Metro, National, Neighborhood, State or Zip) | | `GET /v1/zillow/autocomplete` | Place suggestions for a typed query | `query`, `result_count` | Search also filters on price, beds, baths, living area, lot size, year built and `home_statuses[]` (for example `forRent`, `recentlySold`, `comingSoon` or `foreclosure`), and sorts with `sort_order`. The [Zillow API page](https://perceptlayer.com/apis/zillow) lists every parameter for each endpoint. ### A real search: five miles around central Seattle This request searches a 5-mile radius around central Seattle and asks for 20 listings: ```bash curl "https://api.perceptlayer.com/v1/zillow/search?latitude=47.6062&longitude=-122.3321&radius_mi=5&listing_category=category1&page_size=20" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the fields most trackers keep: ```json { "data": { "listings": [ { "zpid": 2068074790, "location": { "latitude": 47.592564, "longitude": -122.386925 }, "address": { "streetAddress": "1124 Sunset Avenue SW", "zipcode": "98116", "city": "Seattle", "state": "WA" }, … "bathrooms": 6, "bedrooms": 4, "livingArea": 7870, "yearBuilt": 2015, "propertyType": "singleFamily", "listing": { "listingStatus": "forSale", "marketingStatus": "active", … }, "price": { "value": 14000000, "pricePerSquareFoot": 1779 }, "estimates": { "zestimate": 13068300 }, … }, { "zpid": 49046647, … "listing": { "listingStatus": "forSale", "marketingStatus": "comingSoon", … }, "price": { "value": 1050000, "pricePerSquareFoot": 500 }, "taxAssessment": { "taxAssessedValue": 949000, "taxAssessmentYear": "2025" }, … } ], "count": 20, "total_matching_count": 2058, "page": 1, "page_size": 20, … "paging_note": "page * page_size must not exceed 1000; up to 1000 rows come back in one request." } } ``` Three details matter for a tracker. Not every listing has an estimate: the first carries `estimates.zestimate`, the second doesn't, but it has a `taxAssessment` instead, so treat both as optional. `listing.marketingStatus` separates `active` from `comingSoon`, which is the change many trackers watch for. And the response includes a `freshness` line saying which MLS data the listings are based on and as of when, which is worth storing next to each run. ### From a search result to property details Each listing carries a `zpid`, and the property and photos endpoints take a `zpid[]` list, so the names match. Run a search, keep the `zpid` values you care about, then try them on `/v1/zillow/property` in the playground to see the detail fields before you build on them. ## How do a scraper and the endpoints compare? A scraper costs you engineering time and carries terms and blocking risk; the endpoints cost credits per call and remove the parsing and upkeep. Neither is free. The table below compares them for a recurring job, such as tracking every listing in one metro area each day. | | DIY Zillow scraper | Zillow endpoints | | --- | --- | --- | | Setup | Fetcher, HTML and embedded-data parsers, storage, monitoring | API key in the `X-API-Key` header | | What you get | Whatever you can parse from each page | `listings[]` with `zpid`, `address`, `price`, `bedrooms`, `bathrooms`, `livingArea`, `listing`, optional `estimates` and `taxAssessment` | | When the page changes | Your parser breaks and you fix it | You read named JSON fields; there's no parser of yours to fix | | Blocks and challenges | Yours to handle; expect them at volume | Not yours to handle; a failed call returns an error code and costs 0 | | Paging | Follow the site's pages | `page` and `page_size`; `page * page_size` up to 1000 per query | | Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid | | Cost | Hosting and your time | 1 credit per successful call; failed calls cost 0 | | Freshness | Whatever the page showed when you fetched it | Returned as found at the time of the call, with a `freshness` line | ### What does a listing cost to track per day? On the endpoints, cost follows calls, and one search call returns a page of listings. At the recorded `page_size` of 20, tracking 1,000 listings once a day takes 1,000 ÷ 20 = 50 search calls, so 50 calls × 1 credit = 50 credits a day. That's 50 ÷ 1,000 = 0.05 credits per listing per day, or 1,500 credits over a 30-day month. The `paging_note` caps one query at 1,000 rows, so an area with more matches than that, like the 2,058 in the Seattle search, needs to be split into smaller searches: a smaller `radius_mi`, a bounding box with `north_latitude` and the other three edges, or price bands with `min_price` and `max_price`. Each piece costs the same 1 credit per page. Add property details only for listings that changed. If 50 of your 1,000 listings change status or price each day and you fetch details for each, that's another 50 calls × 1 credit = 50 credits a day. The full plan is then 100 credits a day, or 3,000 credits a month: more than the 100 free credits on signup, and inside the Starter pack's 10,000. A larger `page_size` lowers the search share of that bill; try it in the playground for your area. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited. ## Which route should you choose? Choose by how often you need the data and what you'll do with it, because that decides whether upkeep or per-call cost dominates. The verdicts below assume a recurring job; for a look at ten homes once, open Zillow in a browser and skip both. - **Daily tracking of listings in one market** (new listings, price cuts, `comingSoon` to `active`): use `search` on a schedule and store `zpid`, `price.value`, `listing.marketingStatus` and the run date. At 20 a page it's 0.05 credits per listing per day. - **Comparing list price with the estimate**: read `estimates.zestimate` from search where it's present, and check `/v1/zillow/zestimate-accuracy` for the `state` or `metro` you work in before you lean on it. - **Area-level trends** rather than single homes: start with `/v1/zillow/market-data`, which takes a `family` and a `geography` such as Metro or Zip, instead of aggregating listings yourself. - **Showing listings on a brokerage or agent site**: use licensed MLS data. [MLS API: How to Get MLS Listing Data](https://perceptlayer.com/blog/mls-api-listing-data) covers it. - **Learning how scraping works**: build a scraper against a practice site, not a property portal. - **An agent answering housing questions**: give it the Zillow endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so it calls search instead of browsing pages. If you're comparing sources, [Redfin API: Search Homes, Then Property and Valuation](https://perceptlayer.com/blog/redfin-api-property-valuation) covers a similar flow, and the [real estate APIs](https://perceptlayer.com/verticals/real-estate) page lists the rest. To check the fields against your own market, run `search` with your coordinates in the playground on the [Zillow API page](https://perceptlayer.com/apis/zillow), then [get a free API key](https://perceptlayer.com/signup) when they fit. ## APIs in this post - [Zillow **1 credit per call** · 20 endpoints](https://perceptlayer.com/apis/zillow) ## Frequently asked questions ### Is scraping Zillow allowed? That depends on Zillow's terms of use, the terms on any listing data you store, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Listing facts such as price, beds and status are lower risk than personal data; leave agents' and owners' personal details out of anything you keep. ### Can I get Zestimate data without a scraper? Yes, where the listing has one. `GET /v1/zillow/search` returns `estimates.zestimate` on listings that carry it; in the recorded Seattle search the first listing has `zestimate: 13068300` and the second has none. `GET /v1/zillow/zestimate-accuracy` takes `state`, `metro` and `stage`. Each successful call costs 1 credit. ### How many listings come back from one search call? The recorded call asked for `page_size=20` and returned `count: 20` of `total_matching_count: 2058`. The response's `paging_note` says `page * page_size` must not exceed 1000 and up to 1000 rows come back in one request, so split larger areas into smaller searches by radius, bounding box or price band. ### Does a failed Zillow call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header giving the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ### How fast can I run a daily Zillow pull? Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 100-call daily job finishes in under two minutes. Paying accounts run at least 5 requests a second (300 a minute). The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes. zillow real estate scraping listings data zestimate ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 9 min read ## [Redfin Scraper or API: What You Get](https://perceptlayer.com/blog/redfin-scraper-vs-api) A Redfin scraper vs 14 Redfin endpoints at 1 credit each: recorded Seattle locations, search, property and valuation calls, and the cost per home tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 9 min read ## [Zillow Listings API: Get Property Data as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) One GET to /v1/zillow/search returns listings near a point as JSON with price, beds, baths and address. Parameters, a real response, 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "API Rate Limiting: How Limits Work and How to Stay Under" description: "API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes." url: https://perceptlayer.com/blog/api-rate-limiting-explained --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # API Rate Limiting: How Limits Work and How to Stay Under 25 Oct 2026 Perceptlayer 7 min read API rate limiting is a cap on how many requests a client may send in a period of time, such as 60 a minute. Go over it and the API rejects the extra requests until the period resets. From the client side, staying under comes down to four things: know the number and what it applies to, read the headers that say where you stand, send every request through one pacer set a little below the limit, and wait as long as the server asks when you do get rejected. ## Key takeaways - A limit has a number, a period and a scope. On Perceptlayer the scope is the account, shared by all its keys, and the period is a minute: 60 requests a minute on a free account, at least 300 on a paying one. - `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` on every response tell you the limit, what's left this minute and the seconds until it resets. - A rejected request returns 429 with the code `rate_limited`, a `Retry-After` header in seconds and `X-Credits-Used: 0`, so it costs nothing. - Pace all workers through one shared limiter. Four workers each sending 60 a minute add up to 240 against one account's 60. - A job of 3,000 searches on a free account takes at least 3,000 ÷ 60 = 50 minutes and costs 3,000 credits; at 300 a minute it takes 10. ## What does an API rate limit actually count? A rate limit counts requests from one identity over one period, and both parts decide how your client should behave. What counts as the identity, and how long the period is, varies from one API to the next. Read the API's docs for both before you size a job, because the same number means different things under different scopes. On Perceptlayer, limits are per account and counted per minute. Every key on the account draws from the same budget, so two scripts with two keys on one account share one limit. A free account gets 1 request a second, which is 60 a minute. A paying account runs at the rate of the credits it's using, and at least 5 requests a second (300 a minute). | Pack | Included rate (requests a second) | Highest rate you can choose at checkout | | --- | --- | --- | | Free account | 1 | n/a | | Starter, Build | 5 | Starter 25, Build 50 | | Growth, Pro | 5 | 100 | | Scale | 10 | 300 | | Volume | 20 | 300 | | Volume 10M, Volume 25M | 25 | 300 | | Volume 50M | 50 | 300 | If you hold credits bought at different rates, the faster ones are used first. A faster rate costs more at checkout; [pricing](https://perceptlayer.com/pricing) has the details, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain how the account's rate is set. ## Why does a per-minute limit punish bursts? A per-minute limit counts how many requests arrive before the minute resets, not how evenly they arrive. If you send all 60 of a free account's requests in the first second, the 61st is rejected and so is every request after it until the reset. The work still takes a minute; you've just added rejected calls and retry logic to it. Spacing requests evenly avoids that. At 60 a minute that's one request a second; at 300 a minute it's one every 0.2 seconds. An even pace never fills the minute early, so it never sees a rejection from its own traffic. The cost of spacing is a little latency on the first requests of a job, which almost never matters for a batch. Bursts also hide in places you might not look. A scheduler that starts five jobs at the top of the hour, a retry storm after a network blip, or an agent that issues tool calls in a tight loop can all fill a minute in seconds. Whatever the source, the fix is the same: one pacer that every request goes through. ## How do you read where you stand from the headers? The response headers tell you the limit and your position against it, so your client doesn't have to guess. Perceptlayer sends four rate-limit headers on responses, plus `Retry-After` on rejections. Read them on every response and log them when something goes wrong, because they're the fastest way to see whether a slowdown is your pace or something else. | Header | What it tells you | | --- | --- | | `RateLimit-Limit` | Requests allowed a minute | | `RateLimit-Remaining` | Requests left this minute | | `RateLimit-Reset` | Seconds until the minute resets | | `RateLimit-Policy` | The policy that applies to the account | | `Retry-After` | On a 429 or 503: the seconds to wait before retrying | | `X-Credits-Used` | What the call cost; `0` on any error | Two simple rules come from these. When `RateLimit-Remaining` reaches 0, sleep for `RateLimit-Reset` seconds before the next request instead of sending it and waiting for a 429. When a 429 or a 503 does arrive, wait the `Retry-After` seconds before you try again. For what a 429 means and a retry loop that handles every form of `Retry-After`, see [HTTP 429 Too Many Requests](https://perceptlayer.com/blog/http-429-too-many-requests). ## How do you pace requests on the client side? Put one limiter in front of every request your process sends, and give it the account's rate minus a margin. The class below hands out evenly spaced time slots: each caller takes the next slot and sleeps until it arrives. A lock makes it safe to share across threads, so four workers together still send no more than the rate you set. ```python import os import threading import time from concurrent.futures import ThreadPoolExecutor import requests API = "https://api.perceptlayer.com/v1/google-search/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} class Pacer: """Lets one request through every 60/per_minute seconds, across all threads.""" def __init__(self, per_minute): self.interval = 60.0 / per_minute self.lock = threading.Lock() self.next_slot = time.monotonic() def wait(self): with self.lock: now = time.monotonic() slot = max(now, self.next_slot) self.next_slot = slot + self.interval time.sleep(max(0.0, slot - now)) pacer = Pacer(per_minute=55) # a little under a free account's 60 def search(query): for attempt in range(5): pacer.wait() resp = requests.get(API, params={"query": query, "hl": "en"}, headers=HEADERS, timeout=60) if resp.status_code not in (429, 503): break time.sleep(int(resp.headers.get("Retry-After", "5"))) if resp.headers.get("RateLimit-Remaining") == "0": time.sleep(int(resp.headers.get("RateLimit-Reset", "0"))) return query, resp.status_code, resp.headers.get("X-Credits-Used") queries = [f"coffee roasters in {city}" for city in ["Berlin", "Lisbon", "Oslo", "Vienna"]] with ThreadPoolExecutor(max_workers=4) as pool: for row in pool.map(search, queries): print(row) ``` The margin matters because the limit is per account, not per process. If a second script on the same account is running, both pacers together must stay under the account's rate, so split it between them: 30 a minute each on a free account, not 55 each. If the job runs inside an async program, [Concurrent API Requests in Python](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) builds the same idea with asyncio. ### What does the endpoint send back? Each paced call is an ordinary search. This is part of the recorded response from `/v1/google-search/search` for `query=best+restaurants+in+Berlin&hl=en&safe=off`, trimmed: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", … }, … ], … } ``` The [Google Search API page](https://perceptlayer.com/apis/google-search) lists every parameter, and [SERP API: What It Returns and What a Query Costs](https://perceptlayer.com/blog/serp-api-explained) walks through the rest of the response. ## Worked example: how long do 3,000 searches take? A job's minimum run time is its request count divided by the rate, and no amount of concurrency beats it. Say you need to run 3,000 Google searches for a keyword study. The cost is the same at any speed: 3,000 calls × 1 credit = 3,000 credits. What changes with the account's rate is how long the job takes and how you set the pacer. | Account rate | Per minute | Pacer setting | Minimum run time | | --- | --- | --- | --- | | Free account, 1 a second | 60 | 55 | 3,000 ÷ 60 = 50 minutes | | Paying account, 5 a second | 300 | 280 | 3,000 ÷ 300 = 10 minutes | | Scale pack, 10 a second | 600 | 560 | 3,000 ÷ 600 = 5 minutes | The pacer settings run slightly slower than the limit, so the real run time is a little longer than the minimum: 3,000 ÷ 55 is about 55 minutes on a free account. That's the trade you want. Firing all 3,000 at once doesn't finish sooner: at most 60 succeed in a free account's minute, the rest come back as 429s, and your retries compete with your new requests for the same budget. A free account's 100 free credits on signup cover the first 100 searches of this job, so a run of 3,000 needs purchased credits; the Starter pack's 10,000 covers it three times over. The [credits docs](https://docs.perceptlayer.com/credits) explain how calls are debited. ## What should a client do when it hits the limit anyway? Treat a 429 as a signal to slow down, not as a failure to report. Wait the `Retry-After` seconds, retry the same request, and cap the attempts so a misconfigured job stops instead of looping. On Perceptlayer a 429 costs nothing: it returns `rate_limited`, `X-Credits-Used: 0` and the error body `{"error": {"code", "message", "request_id"}}`. Timeouts need more care than 429s. Requests have no idempotency key, so a request whose reply was lost to a client timeout may have succeeded on the server and been billed. Before you retry a timeout automatically, decide whether a duplicate call is acceptable for that job. For a search, it usually is; the cost is one more credit. If 429s keep coming after you've paced the job, the pace is wrong for the account: another script shares it, a second pacer runs in another process, or the rate you assumed isn't the one the credits in use carry. `RateLimit-Limit` on any response shows the real number. Agents need the same treatment: cap the calls in the tool layer, because a model in a loop doesn't pace itself. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover the MCP setup. To see the headers on a real response, run a search in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search), or [get a free API key](https://perceptlayer.com/signup) and call the endpoint with `curl -i`. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Is the rate limit per API key or per account? Per account. Every key on a Perceptlayer account draws from the same per-minute budget, so creating more keys doesn't raise the limit. If several scripts or workers share an account, give them one shared pacer, or split the account's rate between their pacers so the total stays under the limit. ### What rate does a free account get? A free account gets 1 request a second, which is 60 a minute, and 100 free credits after verifying an email address. Paying accounts run at the rate of the credits they're using and at least 5 requests a second (300 a minute). The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list each pack's rate. ### Does a rate-limited request cost credits? No. A 429 returns the code `rate_limited`, `X-Credits-Used: 0` and a `Retry-After` header with the seconds to wait. Only a successful response debits credits, and errors still report `X-Credits-Remaining` so you can track your balance. The [errors docs](https://docs.perceptlayer.com/errors) list every code and its status. ### Can I get a higher rate limit? Yes, by buying credits at a faster rate. Each pack includes a rate, from 5 requests a second on Starter to 50 on Volume 50M, and a faster rate can be chosen at checkout for a higher price, up to a maximum that depends on the pack, such as 25 for Starter or 300 for Scale. The [pricing](https://perceptlayer.com/pricing) page has the details. ### Should I retry after a timeout? Only if a duplicate call is acceptable. Requests have no idempotency key, so a request whose reply was lost to a timeout may have succeeded and been billed. Retrying it can run the call twice. For read-only searches that usually costs one extra credit; log the `request_id` of errors so you can trace what happened. rate limits api python retry-after data engineering ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 15 Oct 2026 Perceptlayer 7 min read ## [HTTP 429 Too Many Requests: What It Means and How to Fix It](https://perceptlayer.com/blog/http-429-too-many-requests) A 429 Too Many Requests response means you hit a rate limit. Read Retry-After, wait that long, then retry; a tested Python loop and the headers to watch. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 5 Oct 2026 Perceptlayer 8 min read ## [Concurrent API Requests in Python: Asyncio Under Rate Limits](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) A Python asyncio fetcher that paces calls to your per-second limit, honours Retry-After and prices a 20,000-call batch at 20,000 credits. --- title: "Rank Tracking API: Track Google Positions as JSON" description: "Build a daily rank check from one Google search call per keyword and location: read organic_results position and link, store them, 1 credit a check." url: https://perceptlayer.com/blog/rank-tracking-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Rank Tracking API: Track Google Positions as JSON 25 Oct 2026 Perceptlayer 7 min read A rank tracking API gives you search results as JSON, so you can find where your domain sits for a keyword without opening a browser. With Perceptlayer, one `GET /v1/google-search/search` call per keyword and location returns `organic_results` with a `position` and a `link` for each result, at 1 credit per successful call. Run it once a day, match your domain against each `link`, and store the date, keyword, position and URL. This guide shows the request, the fields, a working script and the cost. ## Key takeaways - `GET /v1/google-search/search` takes a required `query` plus optional `location`, `gl`, `hl`, `google_domain`, `device`, `start` and `page`, and costs 1 credit per successful call. - Each entry in `organic_results` carries `position`, `title`, `link`, `displayed_link`, `snippet`, `rank_group` and `rank_absolute`. - A daily check is one call per keyword, location and device: 50 keywords × 2 locations × 30 days = 3,000 credits a month. - Failed calls cost nothing and return `X-Credits-Used: 0`, so only the retry that succeeds after a 429 or 503 is billed. - Store `position` and `rank_absolute` together: in the recorded response, the first organic result has `position` 1 and `rank_absolute` 4, after three local result modules. ## What does a rank check need from a search API? A rank check needs three things from each search: the results in order, the URL of each result, and a way to fix the search context so today's result compares with yesterday's. The Google Search API's `search` endpoint returns the first two as fields in `organic_results`, and takes parameters such as `location`, `gl`, `hl`, `google_domain` and `device` for the third. Everything else is your own bookkeeping. That bookkeeping is small. For each keyword you send one request, walk the `organic_results` array, and compare the host of each `link` with your domain. The first match gives you the position and the ranking URL. If nothing matches on the page you fetched, record that the domain wasn't found rather than guessing a number. Over weeks, those rows become a position history per keyword that you can chart, alert on or join to traffic data. The same approach works for a competitor's domain or for several domains at once, because each call returns the full list of organic results for the page you asked for. You pay per search, not per domain you check. ## How do you request Google results for one keyword? Send a `GET` request to `https://api.perceptlayer.com/v1/google-search/search` with your keyword in `query` and your key in the `X-API-Key` header. This is the request behind the recorded response used throughout this guide: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. Where you can't set a header, the key can go in the `api_key` query parameter instead; the [authentication docs](https://docs.perceptlayer.com/authentication) cover both. A successful response carries `X-Credits-Used` and `X-Credits-Remaining` headers, so your job can log what each check cost and how much balance is left. ## Which parameters matter for rank tracking? For rank tracking, the parameters that matter are the ones that pin down the search context: the query, where it's searched from, the interface language, the device and which page of results you want. Keep them identical from one day to the next for each keyword, or your history mixes different searches. The endpoint takes about 30 optional parameters in all; the table lists the ones a rank check uses, with the constraints the API documents. | Parameter | Type | Required | Documented constraint | | --- | --- | --- | --- | | `query` | string | yes | The keyword you track | | `location` | string | no | Up to 500 characters | | `uule` | string | no | Up to 500 characters | | `gl` | string | no | Up to 2 characters | | `hl` | string | no | Up to 2 characters | | `google_domain` | string | no | Up to 50 characters | | `device` | string | no | One of `desktop`, `tablet`, `mobile` | | `start` | integer | no | No further constraint documented | | `page` | integer | no | No further constraint documented | | `amount` | integer | no | No further constraint documented | | `safe` | string | no | One of `active`, `off` | | `nfpr` | integer | no | One of `0`, `1` | The recorded request sets `hl=en`, and the response's `search_url` is a Google search URL with `gl=us` and `hl=en` in it. Log `search_url` with each check: it records the context of every stored position. The full list of parameters is on the [search endpoint page](https://perceptlayer.com/apis/google-search/search), and you can try combinations in the playground before you fix them in a job. ## What does the response contain? The response is one JSON object with the organic results, the search context and the other blocks on the results page. For rank tracking, the important parts are `organic_results`, `search_information` and `pagination`. This is the recorded response, trimmed to the parts a rank check reads: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "displayed_link": "https://andershusa.com › best-restaurants-berlin-german...", … "rank_group": 1, "rank_absolute": 4 }, { "position": 2, "title": "Restaurants - Berlin", "link": "https://guide.michelin.com/us/en/berlin-region/berlin/restaurants", … "rank_group": 2, "rank_absolute": 5 } ], … "pagination": [ { "start": 10, … }, { "start": 20, … } ], "search_url": "https://www.google.com/search?q=best+restaurants+in+Berlin&gl=us&hl=en&safe=off&complete=0&pws=0&nfpr=1", "serp_results": [ { "type": "local_results", "module_index": 0, "rank_group": 1, "rank_absolute": 1 }, … ] } ``` | Field | What a rank check does with it | | --- | --- | | `organic_results[].position` | The organic position you store | | `organic_results[].link` | Matched against your domain; stored as the ranking URL | | `organic_results[].rank_absolute` | Stored next to `position` | | `search_information.organic_results_count` | Logged, so you know how many results the page held | | `pagination[].start` | Shows the `start` values of later pages | | `search_url` | Logged as the search context | ### Why store both position and rank\_absolute? In the recorded response, `serp_results` lists three `local_results` modules with `rank_absolute` 1, 2 and 3, and the first organic result has `position` 1 but `rank_absolute` 4. That suggests `position` counts organic results only, while `rank_absolute` also counts other blocks on the page; check it against your own keywords in the playground. Store both, and you can switch which one you report later without collecting history again. ### How do you check beyond the first page? The recorded `pagination` entries carry `start` values of 10 and 20, and the endpoint takes a `start` parameter; the names match. If your domain isn't on the page you fetched, send the same request with the next `start` value. Each extra page is another call and another credit, so decide how deep you track before you budget. ## How do you build the daily rank check? The daily check is a loop over keyword and location pairs: one request each, a scan of `organic_results` for your domain, and one row appended to a CSV file. The script below does that with Python and `requests`. It waits when it gets a 429 or 503, using the `Retry-After` header, and records "not found" when the domain isn't on the page. ```python import csv import datetime import os import time from urllib.parse import urlparse import requests API_KEY = os.environ["API_KEY"] URL = "https://api.perceptlayer.com/v1/google-search/search" DOMAIN = "example.com" CHECKS = [ {"query": "rank tracking api", "location": "United States", "hl": "en"}, {"query": "serp api", "location": "United Kingdom", "hl": "en"}, ] def fetch(params, attempts=3): for _ in range(attempts): r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json(), r.headers.get("X-Credits-Used") raise RuntimeError(f"gave up on {params['query']}") def host(link): h = urlparse(link).netloc.lower() return h[4:] if h.startswith("www.") else h def find(results, domain): for item in results: h = host(item.get("link", "")) if h == domain or h.endswith("." + domain): return item return None today = datetime.date.today().isoformat() with open("ranks.csv", "a", newline="") as f: out = csv.writer(f) for params in CHECKS: data, credits = fetch(params) hit = find(data.get("organic_results", []), DOMAIN) out.writerow([ today, params["query"], params["location"], hit["position"] if hit else "", hit["rank_absolute"] if hit else "", hit["link"] if hit else "not found", data.get("search_url", ""), credits, ]) time.sleep(1) ``` Each row holds the date, keyword, location, `position`, `rank_absolute`, the ranking URL, the `search_url` and the credits the call used. The one-second pause keeps the script within the free tier's 1 request a second. Run it from cron once a day; a paying account runs at least 5 requests a second, so you can shorten the pause. ### What should the job do with errors? Every error comes back with an HTTP status and a JSON body with `code`, `message` and `request_id`. A `rate_limited` (429) or `temporarily_unavailable` (503) response carries `Retry-After`, which the script honours. Treat `invalid_parameters` (422) as a bug in your check list and `source_error` (502) as a day to retry later. Requests have no idempotency key, so a client timeout may hide a call that succeeded and was billed; keep the timeout generous. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and [HTTP 429 Too Many Requests](https://perceptlayer.com/blog/http-429-too-many-requests) covers backoff in more detail. ## What does daily rank tracking cost? Daily rank tracking costs one credit per keyword, per location, per device, per page, per day. Only successful calls are billed, so a failed check followed by a successful retry costs 1 credit, not 2. Multiply your keyword list by the contexts you track and by the days in the month, and you have the monthly credit bill. | Plan | Arithmetic | Credits a month | | --- | --- | --- | | 30 keywords, 1 location, page 1 | 30 × 1 × 30 days × 1 credit | 900 | | 50 keywords, 2 locations, page 1 | 50 × 2 × 30 days × 1 credit | 3,000 | | 200 keywords, 2 devices, page 1 | 200 × 2 × 30 days × 1 credit | 12,000 | | 200 keywords, 2 devices, pages 1 and 2 | 200 × 2 × 2 × 30 days × 1 credit | 24,000 | The 100 free credits on signup that come with a verified email cover the first 3 days of the first plan, and after that it fits the Starter pack's 10,000 credits for 11 months. The second fits the Starter pack's 10,000 credits for three months, and the last two fit the Build pack's 50,000. Purchased credits last 12 months, with no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) for how debits work. To try it, run the `search` endpoint in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search) with one of your own keywords, check that your domain shows up in `organic_results`, then [get a free API key](https://perceptlayer.com/signup) and schedule the script. [SERP API: What It Returns](https://perceptlayer.com/blog/serp-api-explained) covers the rest of the response if you want to track more than organic positions. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How much does a rank tracking API call cost? Each successful call to `GET /v1/google-search/search` costs 1 credit, and one call checks one keyword in one search context for one page of results. A failed call costs nothing and returns `X-Credits-Used: 0`. Tracking 50 keywords in 2 locations daily is 50 × 2 × 30 = 3,000 credits a month. The pricing page lists what credit packs cost. ### Can I track rankings in different countries and on mobile? Yes. The `search` endpoint takes `location`, `gl`, `hl`, `google_domain` and `uule` for the search context, and `device` with one of `desktop`, `tablet` or `mobile`. Each combination is a separate call at 1 credit. Keep the parameters fixed per keyword from day to day, and log `search_url` so every stored position records the search that produced it. ### What is the difference between position and rank\_absolute? `position` numbers the entries in `organic_results`. `rank_absolute` differs from it in the recorded response: three local result modules have `rank_absolute` 1, 2 and 3, and the first organic result has `position` 1 with `rank_absolute` 4. Store both, so you can report organic position or on-page placement without collecting history again. ### How fast can I run rank checks? Request rates are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second, 60 a minute. Paying accounts run at least 5 a second, 300 a minute, depending on the pack. Every response carries `RateLimit-Remaining` and `RateLimit-Reset`, and a 429 carries `Retry-After`. The rate limits docs have the details. ### Can an AI agent check rankings? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Google Search endpoints with `search_endpoints`, reads their parameters with `get_endpoint` (both free) and runs a search with `call_endpoint`, which spends credits only on success and reports the credits used and remaining. The agent can then scan `organic_results` for a domain itself. rank tracking seo google search serp data python ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 8 min read ## [Scrape Google Search Results with Python](https://perceptlayer.com/blog/scrape-google-search-results-python) Get Google results in Python as JSON: organic\_results, related\_questions and related\_searches from one call to /v1/google-search/search, at 1 credit a page. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Oct 2026 Perceptlayer 7 min read ## [SERP API: What It Returns and What a Query Costs](https://perceptlayer.com/blog/serp-api-explained) A SERP API returns a results page as JSON: organic results, People also ask, related searches, local results. Real responses from 3 engines, 1 credit each. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Jul 2026 Perceptlayer 7 min read ## [Google AI Overview API: Get AI Overviews as JSON](https://perceptlayer.com/blog/google-ai-overview-api) Google has no AI Overview API. GET /v1/google-search/search-ai-overview takes a query, hl and gl, costs 1 credit, and suits daily keyword tracking. --- title: "Scrape Google Search Results with Python | Perceptlayer" description: "Get Google results in Python as JSON: organic_results, related_questions and related_searches from one call to /v1/google-search/search, at 1 credit a page." url: https://perceptlayer.com/blog/scrape-google-search-results-python --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Scrape Google Search Results with Python 25 Oct 2026 Perceptlayer 8 min read To scrape Google search results with Python, you can fetch google.com with `requests` and parse the HTML with BeautifulSoup, or call a search endpoint that returns the results page as JSON. The first route means maintaining selectors against markup you don't control. The second is one `GET /v1/google-search/search` call with a `query`, which returns `organic_results`, `related_questions` (People also ask) and `related_searches` as named fields for 1 credit. This guide shows the Python for the second route, the parameters, a recorded response, pagination and the cost. ## Key takeaways - `GET /v1/google-search/search` takes one required parameter, `query`, and returns the results page as JSON with `organic_results`, `related_questions`, `related_searches`, `local_results` and `pagination`. - Each organic result has `position`, `title`, `link`, `displayed_link`, `snippet` and `source`, plus `rank_absolute`, which counts every block on the page, not only organic links. - A successful call costs 1 credit and a failed call costs nothing, returning `X-Credits-Used: 0`. Checking 30 queries a day for 30 days is 900 credits; the 100 free credits on signup cover the first three days. - The response's `pagination` entries carry `start` values (10 and 20 in the recording), and the endpoint takes a `start` parameter of the same name; no recording shows a second page yet, so check one in the playground before you rely on it. ## Why does requests plus BeautifulSoup on google.com break? A homemade Google scraper breaks because every part of it depends on things outside your code. Your parser finds results by HTML structure and class names that you didn't write, that nobody documents for you, and that can change between one run and the next. When they do, the selectors match nothing and the script returns an empty list without raising an error, so the failure is silent. The second weak point is the response itself. Your script has to decide whether the HTML it received is a results page at all. If it gets back a consent form, a challenge page or a CAPTCHA instead, the same selectors also find nothing, and the only way to tell those cases apart is more parsing code. A challenge page is a signal to stop. Don't try to get around it with rotating proxies or CAPTCHA solvers, and read Google's terms of service before you automate anything against google.com. Then there's the work that isn't parsing: pacing requests, retrying, logging how many results each page returned so you notice when it drops to zero, and reading positions correctly when maps, questions and other blocks sit above the first organic link. [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) builds a `requests` and BeautifulSoup scraper for a practice site and covers when to stop maintaining one. For Google, the alternative is to ask for the page as JSON. ## How do you get Google results as JSON in Python? Send a `GET` request to `https://api.perceptlayer.com/v1/google-search/search` with your search terms in `query` and your API key in the `X-API-Key` header. The response is the results page broken into named fields, so the Python is a request and a few dictionary lookups, with no HTML parsing and no selectors. Here is the call as cURL first: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` The same request in Python, reading organic results, People also ask questions and related searches: ```python import os import requests API = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def google_search(query, **params): resp = requests.get( f"{API}/v1/google-search/search", params={"query": query, **params}, headers=HEADERS, timeout=60, ) if resp.status_code != 200: try: error = resp.json().get("error", {}) except ValueError: # a body that isn't JSON error = {} raise RuntimeError(f"{resp.status_code} {error.get('code')}: {error.get('message')}") print("credits used:", resp.headers.get("X-Credits-Used"), "remaining:", resp.headers.get("X-Credits-Remaining")) return resp.json() data = google_search("best restaurants in Berlin", hl="en", safe="off") for result in data.get("organic_results", []): print(result["position"], result["title"], result["link"]) for item in data.get("related_questions", []): print("People also ask:", item["question"]) for item in data.get("related_searches", []): print("Related search:", item["query"]) ``` Use `.get()` for the blocks. A results page only has a People also ask box or local results for some queries, so code that indexes `data["related_questions"]` directly will fail on the queries without one. Keys start with `sk_live_`; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the header and the `api_key` query parameter for clients that can't send headers. ## Which parameters does the search endpoint take? The search endpoint takes one required parameter, `query`, and 29 optional ones. The table lists the ones most search scripts reach for, with their types and the allowed values the catalogue gives. Nothing beyond these types and values is documented, so don't assume defaults or page sizes; test a value in the playground and compare the response with what you expected. | Parameter | Type | Required | Allowed values or limits | | --- | --- | --- | --- | | `query` | string | yes | Your search terms | | `hl` | string | no | Up to 2 characters; the recorded request used `en` | | `gl` | string | no | Up to 2 characters | | `location` | string | no | Up to 500 characters | | `google_domain` | string | no | Up to 50 characters | | `device` | string | no | `desktop`, `tablet`, `mobile` | | `safe` | string | no | `active`, `off`; the recorded request used `off` | | `tbm` | string | no | `isch`, `vid`, `nws`, `lcl`, `shop`, `pts` | | `start` | integer | no | No range documented | | `page` | integer | no | No range documented | | `amount` | integer | no | No range documented | | `nfpr` | integer | no | `0`, `1` | | `filter` | integer | no | `0`, `1` | | `include_thumbnails` | string | no | `0`, `1`, `true`, `false` | The rest ( `uule`, `cr`, `lr`, `tbs`, `as_qdr`, `udm` and others) are on the [Search endpoint page](https://perceptlayer.com/apis/google-search/search). The [Search Advanced endpoint](https://perceptlayer.com/apis/google-search/search-advanced) takes the same parameters plus `fetch_ai_overview`, and the [Google Search API page](https://perceptlayer.com/apis/google-search) lists all seven endpoints, including [Search Light](https://perceptlayer.com/apis/google-search/search-light) and autocomplete. ## What does the response contain? The response is one JSON object per results page, with a top-level field for each block: `search_information`, `organic_results`, `related_questions`, `related_searches`, `people_also_search_for`, `local_results`, `filters`, `pagination` and `serp_results`, which records each block's type and absolute rank. This is the recorded response to the request above, trimmed with `…`: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "displayed_link": "https://andershusa.com › best-restaurants-berlin-german...", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. It holds two Michelin stars, …", "source": "Anders & Kaitlin", "rank_group": 1, "rank_absolute": 4 }, … ], "related_searches": [ { "query": "Best restaurants in Berlin for tourists", "link": "https://www.google.com/search?safe=off&gl=us&hl=en&complete=0&pws=0&nfpr=1&q=Best+restaurants+in+Berlin+for+tourists" }, … ], "related_questions": [ { "question": "What is the coolest restaurant in Berlin?", "next_page_token": "fc=EqEBCmJBSmlUNHRMWjV0cUtnRWF3THBmd2poWERESG9Zd1NDdjV1eVBaTnlyQUpwWHptbXpvWEl3cEcteUc4clBmTmM2RmVqZ3gxeFBSR2Q2YnhWUXRYTV9fbU9TZ25Oa3RSM2JJQRIXZlBEYWFyWDFHc1RtN…" }, … ], "pagination": [ { "start": 10, "link": "https://www.google.com/search?q=best+restaurants+in+Berlin&safe=off&gl=us&hl=en&complete=0&pws=0&nfpr=1&start=10&sstk=…" }, … ], … } ``` | Field | What the recording holds | | --- | --- | | `organic_results[]` | `position`, `title`, `link`, `redirect_link`, `displayed_link`, `snippet`, `snippet_highlighted_words`, `source`, `rank_group`, `rank_absolute` | | `related_questions[]` | `question` and a `next_page_token` | | `related_searches[]` | `query` and `link` | | `people_also_search_for[]` | `name`, `query` and `link` | | `local_results.places[]` | `title`, `rating`, `reviews`, `price`, `type`, `website`, `phone`, `address`, `hours` | | `pagination[]` | `start` and `link` | Read positions with care. The first organic result has `position` 1 but `rank_absolute` 4, because local results sat above it on the page. If you report rankings, store both. [SERP API: What It Returns and What a Query Costs](https://perceptlayer.com/blog/serp-api-explained) compares this shape with the Bing and DuckDuckGo responses. ## How do you get the second page of results? The recorded response's `pagination` array lists further pages, each with a `start` value (10, then 20) and a Google link containing the same `start`. The search endpoint accepts a `start` parameter, and the names match, so passing a `pagination[].start` value back as `start` is the natural way to ask for the next page. No recording shows a second page yet, though, so treat this as untested and check one in the playground first. Write the loop so it stops on its own if paging doesn't behave as expected. This version collects up to `max_pages` pages, deduplicates by `link`, and stops when the response lists no further `start`, or when a page adds no new links: ```python def collect_organic(query, max_pages=3, **params): seen = {} start = None for _ in range(max_pages): page_params = dict(params) if start is not None: page_params["start"] = start data = google_search(query, **page_params) new = 0 for result in data.get("organic_results", []): if result["link"] not in seen: seen[result["link"]] = result new += 1 if new == 0: break # nothing new: stop rather than pay for repeats starts = [p["start"] for p in data.get("pagination", []) if start is None or p["start"] > start] if not starts: break start = min(starts) return list(seen.values()) results = collect_organic("best restaurants in Berlin", max_pages=2, hl="en", safe="off") print(len(results), "unique organic results") ``` Every page is a separate call at 1 credit, so `max_pages=2` costs at most 2 credits per query. The endpoint also takes a `page` parameter; the recording doesn't show how it relates to `start`, so pick one and keep it consistent within a pull. ## What does scraping Google results this way cost? Each successful call costs 1 credit, and each call returns one results page, so the cost is queries × pages × runs. Failed calls cost nothing and return `X-Credits-Used: 0`, so a retry after a 429 or a 502 doesn't add to the bill. Every account gets 100 free credits after verifying an email address, with no credit card. | Job | Calculation | Credits a month | | --- | --- | --- | | 30 queries a day, first page | 30 × 1 × 30 | 900, inside the Starter pack's 10,000 | | 100 queries a day, first page | 100 × 1 × 30 | 3,000, inside the Starter pack's 10,000 | | 100 queries a day, two pages | 100 × 2 × 30 | 6,000, inside the Starter pack's 10,000 | | 500 queries a day, two pages | 500 × 2 × 30 | 30,000, inside the Build pack's 50,000 | Purchased credits last 12 months, and there's no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how the balance works. Speed is set by your account's rate: 1 request a second on a free account, and at least 5 a second on a paying one. A 429 response carries `Retry-After` with the seconds to wait. At 5 requests a second, 3,000 searches take 10 minutes; [Concurrent API Requests in Python](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) shows how to run a batch at that rate without tripping the limit. ## How do you handle errors in the script? Every error returns an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`, and no error costs credits. The `google_search()` function above raises on any non-200 status with the code and message, which is enough for a one-off script. A batch job should sort the errors into ones worth retrying and ones that need you. Retry `rate_limited` (429) and `temporarily_unavailable` (503) after the `Retry-After` seconds, and `source_error` (502) after a short backoff. Stop on `invalid_api_key` (401), `invalid_parameters` (422) and `insufficient_credits` (402): the service is prepaid, nothing more is debited once the balance runs out, and there's no automatic top-up. One case does cost: a request whose reply was lost to a client timeout may have succeeded and been billed, because requests have no idempotency key. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and [HTTP 429 Too Many Requests](https://perceptlayer.com/blog/http-429-too-many-requests) covers backoff. Run `best restaurants in Berlin`, then a query of your own, in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search) and compare the response with your browser. When the fields fit, [get a free API key](https://perceptlayer.com/signup) and run the script above. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Is it legal to scrape Google search results? It depends on your jurisdiction, how you collect the results and what you do with them, so read Google's terms of service before you automate anything against google.com. Store what you need, don't republish other sites' snippets wholesale, and don't collect personal data from results without a lawful basis. Data from the search endpoint is collected from publicly available sources and returned as found at the time of the call. ### How many results does one call return? One call returns one results page. In the recorded response for `best restaurants in Berlin`, `search_information.organic_results_count` is 6, alongside local results, People also ask questions and related searches. The count varies by query, and the catalogue doesn't document a page size, so read the length of `organic_results` rather than assuming one. ### Can I get People also ask questions without the organic results? Every search response that has a People also ask box includes it in `related_questions`, each with a `question` and a `next_page_token`. You pay the same 1 credit whether you read the questions, the organic results or both, so there's no saving in asking for less. Read the block you need and ignore the rest. ### Does a failed search cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status, a JSON error with a `code` and a `request_id`, and `X-Credits-Used: 0`. The exception to watch is a client timeout: the request may have succeeded and been billed even though your script never saw the reply. ### Can an AI agent search Google this way? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the endpoint with `search_endpoints`, reads its parameters with `get_endpoint` (both free) and runs it with `call_endpoint`, which spends credits only on success and reports the credits used and remaining. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. google search python serp scraping people also ask ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 10 Nov 2026 Perceptlayer 7 min read ## [Google Search Scraper or API: What You Get](https://perceptlayer.com/blog/google-search-scraper-vs-api) A Google Search scraper parses every block on the page. Seven endpoints return them as JSON at 1 to 3 credits a call, with a recorded Berlin search. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Nov 2026 Perceptlayer 8 min read ## [Bing Scraper or API: Ten Result Types as JSON](https://perceptlayer.com/blog/bing-scraper-vs-api) A Bing scraper next to 10 Bing endpoints at 1 credit a call: a recorded web search with position, url and domain, and 0.1 credits per ranking tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 7 min read ## [Rank Tracking API: Track Google Positions as JSON](https://perceptlayer.com/blog/rank-tracking-api) Build a daily rank check from one Google search call per keyword and location: read organic\_results position and link, store them, 1 credit a check. --- title: "Substack API: Get Publication Posts as JSON | Perceptlayer" description: "Substack documents RSS feeds and an export, not a public API. Four endpoints return a publication, its posts list, one post and comments at 1 credit a call." url: https://perceptlayer.com/blog/substack-api-publication-posts --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Substack API: Get Publication Posts as JSON 24 Oct 2026 Perceptlayer 6 min read Substack doesn't document a public API. What it documents is an RSS feed for every publication, at `yourpublication.substack.com/feed`, and an export that lets a writer download their own posts and subscriber list. For public posts as JSON, four endpoints cover the gap: `publication`, `posts` (sorted by `new` or `top`, paged with `offset` and `limit`), `post` by slug, and `comments`. Each costs 1 credit per successful call. This guide shows when the RSS feed is enough, how to pull a newsletter's archive with the endpoints, and what that costs. ## Key takeaways - Substack's documented ways out are the RSS feed at `/feed` and the writer's own export from Settings; there's no documented public API. - `GET /v1/substack/posts` takes a `publication` plus optional `sort` ( `new` or `top`), `offset` and `limit`; `GET /v1/substack/post` takes `publication` and a post `slug`. - An archive pull is one `posts` call per page plus one `post` call per article: 200 articles is about 200 credits, plus the listing pages. - All four endpoints are restricted: accept the restricted-endpoint terms first, use public posts only, and never collect subscriber data. ## Does Substack have an official API? No public one. Substack's help centre documents two ways to get content out. Every publication has an RSS feed at its address followed by `/feed`, such as `yourname.substack.com/feed` ( [Substack support: RSS feed](https://support.substack.com/hc/en-us/articles/360038239391-Is-there-an-RSS-feed-for-my-publication), 2026). And a writer can export their own publication from Settings, which produces a zip with their posts, subscriber list and stats ( [Substack support: export](https://support.substack.com/hc/en-us/articles/360037466012-How-do-I-export-my-posts), 2026). Developers sometimes call Substack's internal web endpoints directly, the ones its own site uses. Those aren't documented, can change without notice, and are governed by Substack's terms, so we don't recommend building on them. Use what Substack documents first. If you want new posts from a few newsletters, the RSS feed is free, official and enough. If you're the writer and want your own archive or subscribers, use the export: it's the only legitimate route to subscriber data. ## When is the RSS feed enough, and when isn't it? The RSS feed is enough when you need recent posts from a known publication in a feed reader, a Slack channel or a simple script. It's a standard format every language can parse, and it's free. It falls short in three cases: a feed may hold only a publication's recent posts rather than its full archive, it's ordered by date only, and it has no comment data. | Need | RSS feed | Export | Endpoints | | --- | --- | --- | --- | | New posts from a publication | Yes | Your own only | Yes, `posts` with `sort=new` | | Full archive of a publication | May hold only recent posts | Your own only | Yes, page `posts` with `offset` | | Most popular posts | No | No | Yes, `posts` with `sort=top` | | One post by URL | In the feed if recent | Your own only | Yes, `post` by `slug` | | Comments on a post | No | No | Yes, `comments` (restricted) | | Subscriber list | No | Your own only | No, never | | Cost | Free | Free | 1 credit per successful call | If your need sits in the first column, stop here and use the feed. The rest of this guide is for the archive, popularity and many-publications cases. ## How do you get a publication's posts as JSON? Call `posts` with the publication's name, a sort order and a page. The `publication` parameter is the publication's name (up to 64 characters); the catalogue's example uses `slowboring`. This is that example request: ```bash curl "https://api.perceptlayer.com/v1/substack/posts?publication=slowboring&sort=new&offset=0&limit=2" \ -H "X-API-Key: $API_KEY" ``` | Endpoint | Required | Optional | Returns | | --- | --- | --- | --- | | `GET /v1/substack/publication` | `publication` | | The publication's details | | `GET /v1/substack/posts` | `publication` | `sort` ( `new`, `top`), `offset`, `limit` | A page of the publication's posts | | `GET /v1/substack/post` | `publication`, `slug` (up to 300 characters) | | One post | | `GET /v1/substack/comments` | `publication`, `post_id` (up to 32 characters) | | A post's comments | A post's `slug` is the last part of its URL: for `yourname.substack.com/p/some-post-title` it's `some-post-title`. We didn't run these requests for this post, and we haven't recorded a response from the Substack endpoints yet, so we can't show the fields. Run `posts` in the playground on the [Substack API page](https://perceptlayer.com/apis/substack) to see what each item carries, including the slug and ID you pass to `post` and `comments`, and how large a `limit` the endpoint accepts. Send the key in the `X-API-Key` header; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ## How do you pull a newsletter's archive? Page through `posts` with `sort=new`, raising `offset` by `limit` each time until a page comes back empty, then fetch each post you need with `post`. A minimal Python version: ```python import os import time import requests API = "https://api.perceptlayer.com/v1/substack" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): resp = requests.get(f"{API}/{path}", params=params, headers=HEADERS, timeout=90) if resp.status_code == 429: time.sleep(int(resp.headers.get("Retry-After", "5"))) return get(path, **params) resp.raise_for_status() return resp.json() def list_pages(publication, limit=20): offset = 0 while True: page = get("posts", publication=publication, sort="new", offset=offset, limit=limit) if not page: break yield page offset += limit for page in list_pages("slowboring"): print(page) # inspect the shape once, then pick out slugs and fields break ``` We didn't run this against the live API; we ran it with a mocked HTTP client that answered a 429 and then one page, which it retried and printed. It stops at the first page and prints it on purpose: without a recorded response we don't know whether `posts` returns a list or an object with a list inside, so check the shape once and adjust the stop condition and the slug field before you run the full loop. Store each post's slug as you go, so a re-run only fetches new posts. ### What does an archive pull cost? Each successful call costs 1 credit, and failed calls cost nothing. A 200-post archive at 20 posts a page is 10 listing calls, plus 200 `post` calls if you need each full post: 210 credits. Checking 50 newsletters weekly for new posts is 50 × 4 = 200 credits a month. Both are more than the 100 free credits every account gets once, after verifying an email address, which cover a 50-post archive (3 listing calls plus 50 `post` calls) or the first two weekly checks of 50 newsletters; ongoing use needs a pack. See [pricing](https://perceptlayer.com/pricing) for packs. Every successful response reports `X-Credits-Used` and `X-Credits-Remaining`, and the [credits docs](https://docs.perceptlayer.com/credits) explain balances. ## What are the terms for these endpoints? All four Substack endpoints are restricted endpoints. They work after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard; before that, a call returns `restricted_endpoint` (403). Use them for public posts. Paid posts behind a paywall are the writer's paid content, not public data. Comments carry commenters' names, so use them only in aggregate, such as counts or topics, and never to profile or contact people. There's no subscriber endpoint, and nothing here should be used to build lists of readers. Respect the writer, too: quote briefly and link back, as you would with any publication. Data is collected from publicly available sources and returned as found at the time of the call. To start, accept the terms, then run `publication` and `posts` for a newsletter you read in the playground on the [Substack API page](https://perceptlayer.com/apis/substack). For turning posts into model input, see [Website to Markdown: Clean Page Text for LLMs](https://perceptlayer.com/blog/website-to-markdown-for-llms); other sources are under [Social media](https://perceptlayer.com/verticals/social). [Get a free API key](https://perceptlayer.com/signup) to run the archive script. ## APIs in this post - [Substack **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/substack) ## Frequently asked questions ### Is there an official Substack API? Substack doesn't document a public API. It documents an RSS feed for each publication at `/feed` and an export of a writer's own posts, subscribers and stats from Settings. Its site uses internal endpoints, but they're undocumented and can change without notice. The endpoints here return public posts as JSON at 1 credit per call. ### How do I get all posts from a Substack newsletter? Call `GET /v1/substack/posts` with the `publication`, `sort=new`, an `offset` and a `limit`, and raise `offset` by `limit` until a page comes back empty. Each page costs 1 credit. Then fetch full posts with `GET /v1/substack/post` by `slug`, 1 credit each. If you only need recent posts, the free RSS feed may be enough. ### Can I get a Substack newsletter's subscribers? Only your own, through Substack's export in your publication's Settings. Subscriber lists of other newsletters are private, and no endpoint here returns them. Collecting readers' details without a lawful basis would break privacy law and the restricted-endpoint terms. ### Can I read paywalled Substack posts through the API? No. The endpoints return public content as found; paid posts are the writer's paid content. If you subscribe to a newsletter, read it on Substack or in your email. For your own paid posts, use Substack's export, which includes your full archive. ### What happens if a Substack call fails? You get an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, and you aren't charged. `restricted_endpoint` (403) means the terms haven't been accepted; `not_found` (404) usually means a wrong `publication` or `slug`; `rate_limited` (429) carries `Retry-After`. The [errors docs](https://docs.perceptlayer.com/errors) list every code. substack newsletters substack api rss content data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "TikTok API: Official Options and Public Trend Data" description: "TikTok's Research API is for vetted researchers; Display and Content Posting APIs act for signed-in users. Trend endpoints cover hashtags at 1 credit." url: https://perceptlayer.com/blog/tiktok-api-trend-data --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # TikTok API: Official Options and Public Trend Data 24 Oct 2026 Perceptlayer 6 min read TikTok has several official APIs, and each serves a narrow audience. The Research API gives public-content data to approved non-commercial researchers; the Display API and Content Posting API let an app read or post for a TikTok user who signs in; the Commercial Content API covers ads. None of them is a general data feed for a company that wants to follow what's trending. For that, aggregate trend endpoints return trending hashtags by country, hashtag ("challenge") details and posts, and music, at 1 credit a call. This post compares the routes and says which fits which job. ## Key takeaways - The TikTok Research API is for academic institutions in the US, EEA, UK, Canada or Switzerland and some not-for-profit research bodies; applicants need independence from commercial interests and a research proposal. - The Display API reads a signed-in user's profile and public videos with scopes such as `user.info.basic` and `video.list`; the Content Posting API posts for users, and unaudited apps can only post privately. - `GET /v1/tiktok/trending-hashtags` takes a `country_code` and an optional `time_range` of `7` or `30` days; `challenges-search`, `challenges-posts` and `music-posts` follow a hashtag or sound. - All TikTok endpoints in the catalogue are restricted: accept the restricted-endpoint terms first, use them for public and aggregate data, and don't profile individuals. ## What official TikTok APIs are there, and who are they for? TikTok for Developers offers four API families, each tied to a specific kind of user: researchers, apps acting for signed-in users, and ads transparency. Matching your job to one of them is the first step, because most commercial analytics jobs, such as a brand tracking trends across a market, fit none of them. | API | What it does | Who can use it | | --- | --- | --- | | Research API | Public videos, comments and accounts for research | Approved non-commercial researchers | | Display API | Read a signed-in user's profile and public videos | Apps the user authorises through Login Kit | | Content Posting API | Post videos and photos for a signed-in user | Apps the user authorises; private-only until audited | | Commercial Content API | Ads and commercial content | Approved applicants; a research client is issued on approval | The Research API is the closest thing to a data feed, and it's deliberately limited. TikTok lists eligible applicants as academic institutions in the US, EEA, UK, Canada or Switzerland and not-for-profit or independent research bodies in the EU, and asks for demonstrated expertise, independence from commercial interests, a research proposal, data security commitments and ethical review ( [TikTok Research Tools](https://developers.tiktok.com/products/research-api/), 2026). Brands, agencies and analytics startups don't qualify. The Display API reads data only for users who sign in and grant scopes: `user.info.basic` for the basic profile and `video.list` for that user's public videos ( [TikTok scopes reference](https://developers.tiktok.com/docs/en/tiktok-api-scopes), 2026). The Content Posting API publishes for signed-in users; TikTok's guidelines say content posted by unaudited clients is restricted to private viewing until the app passes an audit ( [Content Sharing Guidelines](https://developers.tiktok.com/docs/en/content-sharing-guidelines), 2026). Both are the right tools for apps built around TikTok users. ## What do the trend endpoints return? The catalogue's TikTok API has 29 endpoints, all `GET`, all 1 credit per successful call; this post uses the aggregate ones, which describe what's popular rather than who posted it. Failed calls cost nothing and return `X-Credits-Used: 0`. You authenticate with one API key in the `X-API-Key` header. | Endpoint | Required | Optional | Use | | --- | --- | --- | --- | | `GET /v1/tiktok/trending-hashtags` | `country_code` (2 characters) | `time_range`: `7` or `30` | What's trending in a country | | `GET /v1/tiktok/challenges-search` | `keywords` | `count`, `cursor` | Find hashtags on a topic | | `GET /v1/tiktok/challenges-details` | `challenge_id` or `challenge_name` | | One hashtag's details | | `GET /v1/tiktok/challenges-posts` | `challenge_id` or `challenge_name` | `region`, `count`, `cursor` | Posts under a hashtag | | `GET /v1/tiktok/music-details` | `url` | | One sound's details | | `GET /v1/tiktok/music-posts` | `music_id` | `count`, `cursor` | Posts using a sound | | `GET /v1/tiktok/feed-search` | `keywords` | `region`, `publish_time`, `sort_type`, `count`, `cursor` | Posts matching a keyword | | `GET /v1/tiktok/regions` | | | Supported region codes | The catalogue's example call searches hashtags: ```bash curl "https://api.perceptlayer.com/v1/tiktok/challenges-search?keywords=cosplay&count=10&cursor=0" \ -H "X-API-Key: $API_KEY" ``` And trending hashtags in the US over 7 days: ```bash curl "https://api.perceptlayer.com/v1/tiktok/trending-hashtags?country_code=US&time_range=7" \ -H "X-API-Key: $API_KEY" ``` We didn't run these requests, and we haven't recorded a response from the TikTok endpoints yet, so this post doesn't show one. Run them in the playground on the [TikTok API page](https://perceptlayer.com/apis/tiktok) to see the fields, and check `regions` for the codes `region` accepts. ### What are the terms for these endpoints? Every TikTok endpoint in the catalogue is a restricted endpoint. They work after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard; until then a call returns `restricted_endpoint` (403). Use them for public content and aggregate analysis: which hashtags and sounds are rising, how much a topic is posted about. Don't build profiles of individual people, track specific users, or use the data to contact anyone. The catalogue also has user-level endpoints; this post doesn't cover them, for that reason. Data is collected from publicly available sources and returned as found at the time of the call. ## How do the two routes compare? The routes don't really compete: they serve different people. The official APIs are for researchers who qualify and for apps acting for signed-in users, and they cost nothing within TikTok's terms. The trend endpoints are for teams that want public, aggregate signals, such as rising hashtags in a market, without a research affiliation or a user signing in. | | Research API | Display / Content Posting APIs | Trend endpoints | | --- | --- | --- | --- | | Access | Application; non-commercial researchers only | App review; each user signs in | One API key, after accepting the restricted terms | | Data | Public videos, comments, accounts for research | One signed-in user's profile and videos; posting | Trending hashtags, hashtag and sound posts, keyword search | | Commercial use | No | Yes, within TikTok's terms | Yes, within the restricted-endpoint terms | | Write actions | No | Posting (private until audited) | No | | Cost | No charge | No charge | 1 credit per successful call | ### What does tracking trends cost? Cost follows calls. Checking trending hashtags in 10 countries daily is 10 × 30 = 300 credits a month; the 100 free credits on signup cover the first 10 days. Adding one page of posts for each of the top 20 hashtags in each country is 10 × 20 × 30 = 6,000 more, so 6,300 in all, inside the Starter pack's 10,000. A weekly 30-day snapshot ( `time_range=30`) in the same 10 countries is 40 credits a month. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ## Which should you use? Start from who you are and what you need, because eligibility decides most of it: researchers have a free official route, apps for creators have another, and commercial trend tracking has neither. If the job needs data about specific people, stop there; none of these routes is for that. The verdicts per use case: - **Academic research on TikTok content**: apply for the Research API. It's built for that, covers comments and accounts under research terms, and costs nothing. - **An app where creators sign in** (a scheduler, an analytics dashboard for a creator's own account): the Display and Content Posting APIs, with Login Kit. - **Brand or agency trend tracking** (which hashtags and sounds are rising in a market): the trend endpoints, under the restricted-endpoint terms, aggregated by hashtag, sound and country. - **Feeding trends to an AI agent or a content-planning tool**: the trend endpoints through MCP; the agent finds them with `search_endpoints` and spends credits only on successful calls. [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) shows the pattern. - **Monitoring what specific people post**: none of these. That's profiling individuals, which the restricted-endpoint terms don't allow. To see the data, accept the restricted-endpoint terms in your dashboard, then run `trending-hashtags` for your market in the playground on the [TikTok API page](https://perceptlayer.com/apis/tiktok). Other social sources are under [Social media](https://perceptlayer.com/verticals/social). To start, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [TikTok **1 credit per call** · 31 endpoints](https://perceptlayer.com/apis/tiktok) ## Frequently asked questions ### Does TikTok have a public API? Not a general one. TikTok's official APIs serve approved researchers (Research API), apps acting for signed-in users (Display and Content Posting APIs) and ads transparency (Commercial Content API). There's no self-serve feed of public TikTok data for businesses; trend endpoints such as `trending-hashtags` fill that gap at 1 credit per call. ### How do I get access to the TikTok Research API? Create a TikTok for Developers account with a professional email and submit the research application. TikTok asks for an eligible institution, a research proposal, independence from commercial interests, data security commitments and ethical review. Academic access covers the US, EEA, UK, Canada and Switzerland, with separate routes for some not-for-profits and EU vetted researchers. ### Can I get trending TikTok hashtags by country? Yes. `GET /v1/tiktok/trending-hashtags` takes a two-character `country_code` and an optional `time_range` of `7` or `30` days, for 1 credit per successful call. Follow a hashtag with `challenges-details` and `challenges-posts`. It's a restricted endpoint, so accept the restricted-endpoint terms first. ### Is it legal to collect TikTok data? It depends on the data, the purpose and where you are. Aggregate, public signals such as trending hashtags carry the least risk; data about identifiable people brings privacy law into play. Use the restricted endpoints only within their terms, don't profile individuals, and get legal advice for commercial data products. ### What happens if a TikTok call fails? You get an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, and you aren't charged. `restricted_endpoint` (403) means the terms haven't been accepted yet; `invalid_parameters` (422) usually means a missing required parameter such as `country_code`. The [errors docs](https://docs.perceptlayer.com/errors) list every code. tiktok tiktok api social media data trends research api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Nov 2026 Perceptlayer 9 min read ## [TikTok Scraper or API: Hashtag, Sound and Trend Data](https://perceptlayer.com/blog/tiktok-scraper-vs-api) A TikTok scraper next to 31 TikTok endpoints at 1 credit a call: trending hashtags by country, hashtag and sound posts, and 2 credits per hashtag tracked a day. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Nov 2026 Perceptlayer 8 min read ## [Twitter Scraper or X API: Options for Public Data](https://perceptlayer.com/blog/twitter-scraper-vs-api) Scraping X, X's own developer API, or 20 X endpoints at 1 credit a call for public tweets, threads and trends: upkeep, terms and a verdict per use case. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Nov 2026 Perceptlayer 8 min read ## [Pinterest Scraper or API: What You Get](https://perceptlayer.com/blog/pinterest-scraper-vs-api) A DIY Pinterest scraper versus 6 Pinterest endpoints at 1 credit a call: pin search, board pins, upkeep, terms and the credits per search term tracked. --- title: "YouTube Data API Quota: Limits, Costs and Alternatives" description: "YouTube Data API quota: 100 search.list calls and 10,000 units a day by default, 200 units per caption download. The arithmetic, and a per-call alternative." url: https://perceptlayer.com/blog/youtube-data-api-quota --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # YouTube Data API Quota: Limits, Costs and Alternatives 24 Oct 2026 Perceptlayer 6 min read The YouTube Data API is Google's official API for YouTube: search, video and channel details, playlists, comments and captions, called with a Google Cloud API key or OAuth. Its quota is what limits most projects. By default a project gets 100 `search.list` calls a day in their own bucket and 10,000 units a day for everything else, a caption download costs 200 units and needs edit rights on the video, and more quota requires a compliance audit. This post works through the arithmetic for a search-heavy job and shows where per-call endpoints fit instead. ## Key takeaways - Default quota is 100 `search.list` calls a day, 100 `videos.insert` calls, and 10,000 units a day for all other methods combined, per Google's documentation as of 2026. - Costs per call vary: `videos.list` is 1 unit, `captions.list` 50 units and `captions.download` 200 units; even invalid requests cost at least one unit. Quotas reset at midnight Pacific Time. - Downloading captions through the official API needs OAuth and permission to edit the video, so it doesn't fetch transcripts of other people's videos. - The catalogue's 15 YouTube endpoints, including `/v1/youtube/search`, `/v1/youtube/video` and `/v1/youtube/transcript`, cost 1 credit per successful call with no daily cap, and are restricted endpoints: you accept the restricted-endpoint terms first. ## How does the YouTube Data API quota work? Every request to the YouTube Data API is charged against your Google Cloud project's daily quota, in units. A project that enables the API gets a default allocation of 100 `search.list` calls a day, 100 `videos.insert` calls a day, and 10,000 units a day combined for all other methods ( [YouTube Data API overview](https://developers.google.com/youtube/data/getting-started), 2026). Search moved into its own bucket in 2026: Google's revision history records the move to a more granular quota system starting with `videos.insert` and `search.list` on 1 June 2026 ( [revision history](https://developers.google.com/youtube/data/revision_history), 2026). Google's quota calculator sets out the rest: every request, including an invalid one, costs at least one unit, and daily quotas reset at midnight Pacific Time ( [Quota calculator](https://developers.google.com/youtube/data/determine_quota_cost), 2026). Older guides that say a search costs 100 units describe the previous system; check the calculator and your project's Quotas page in the Cloud console for current figures. | Method | What it does | Cost | | --- | --- | --- | | `search.list` | Search videos, channels, playlists | 1 call from the 100-a-day search bucket | | `videos.list` | Video details and statistics | 1 unit | | `channels.list` | Channel details | 1 unit | | `captions.list` | List a video's caption tracks | 50 units | | `captions.download` | Download one caption track | 200 units, OAuth, edit permission on the video | ## What does a search-heavy job cost in quota? Work it out per day, because the quota is daily. Say you track 300 keywords: each day you search each keyword once and then fetch details for the top 20 videos per keyword. The details are cheap: `videos.list` takes a comma-separated list of IDs, so one call per keyword covers its 20 videos, and 300 calls cost 300 units. The searches are the problem: 300 `search.list` calls against a default of 100 a day. | Daily job | Search calls | Other units | Fits the default? | | --- | --- | --- | --- | | 50 keywords, details for top 20 | 50 | 50 | Yes | | 300 keywords, details for top 20 | 300 | 300 | No: 3 times the search allowance | | Transcripts for 60 of your own videos | 0 | 60 × 250 = 15,000 (list + download) | No: over 10,000 units | To go beyond the default you apply for more. Google's guide says you must first complete an audit showing your project complies with the YouTube API Services Terms of Service, then submit the Audit and Quota Extension Form with a justification for the quota you need ( [Quota and compliance audits](https://developers.google.com/youtube/data/guides/quota_and_compliance_audits), 2026). The developer policies add that extra quota is for the approved use case only and that splitting work across several Cloud projects to get more quota isn't allowed. If your app is a YouTube integration (uploading, managing your own channel, reading your own captions, acting for signed-in users), this is the path: it's the only one with write access and user authorisation, and it costs nothing in money. ## Can you get transcripts through the official API? Only for videos you can edit. `captions.download` requires OAuth 2.0 authorisation and that the authorised user has permission to edit the video; it costs 200 units per call, and finding the track with `captions.list` costs another 50 ( [captions.download](https://developers.google.com/youtube/v3/docs/captions/download), 2026). That suits a creator exporting their own subtitles. It doesn't let a research tool, an AI agent or a summariser fetch the transcript of someone else's public video. That gap is the main reason people look past the official API. Transcripts are what a model needs to summarise or answer questions about a video, and at 250 units each, even your own videos run out of daily quota at 40 transcripts. ## What do the per-call endpoints cover? The catalogue's YouTube API has 15 endpoints for public YouTube data, all `GET`, all 1 credit per successful call, with no daily cap beyond the account's request rate. Failed calls cost nothing and return `X-Credits-Used: 0`. You authenticate with one API key in the `X-API-Key` header, with no Cloud project or OAuth. | Group | Endpoints | Key parameters | | --- | --- | --- | | Search and discovery | `search`, `suggestions`, `trending`, `related` | `query`, `type`, `order`, `videoDuration`, `publishedAfter`, `gl`, `hl` | | Videos | `video`, `chapters`, `comments` | `video_id` | | Transcripts | `transcript`, `transcript-by-video-id` | `video_id` or `videoId`, `language` | | Channels | `channel`, `channel-videos`, `channel-playlists`, `channel-community` | `channel_id` | | Playlists and locales | `playlist`, `locales` | `playlist_id` | The catalogue's example search: ```bash curl "https://api.perceptlayer.com/v1/youtube/search?query=programming+tutorial" \ -H "X-API-Key: $API_KEY" ``` We didn't run this request, and we haven't recorded a response from the YouTube endpoints yet, so this post doesn't show one. Run `search`, then `video` and `transcript` with an ID from the results, in the playground on the [YouTube API page](https://perceptlayer.com/apis/youtube) to see the fields. All 15 are restricted endpoints. They work after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard, and a call before that returns `restricted_endpoint` (403). Use them for public video data and aggregate analysis; don't use comments or channel data to profile or contact individuals. Data is collected from publicly available sources and returned as found at the time of the call. ## How do the two compare for the same job? For the 300-keyword job above, the per-call route needs 300 searches and, if the search results carry the fields you need, nothing else: 300 credits a day, 9,000 a month, inside the Starter pack's 10,000. Add a `video` call for each of the top 20 results and it's 300 + 6,000 = 6,300 calls a day, so compare the fields a search returns with what you need before you add detail calls. Transcripts for 100 videos a day are 100 × 30 = 3,000 credits a month. See [pricing](https://perceptlayer.com/pricing) for what credits cost. | | YouTube Data API | Per-call endpoints | | --- | --- | --- | | Auth | API key or OAuth from a Cloud project | One key in `X-API-Key` | | Daily limit | 100 searches, 10,000 units by default; more after an audit | None; per-account request rate | | Write actions, user data | Yes | No | | Transcripts of others' videos | No | Yes, 1 credit | | Cost | No charge within quota | 1 credit per successful call | | Terms | YouTube API Services Terms | Restricted-endpoint terms | Use the official API for anything that acts on YouTube or for signed-in users, and for light read-only jobs that fit the default quota. Use per-call endpoints when the job outgrows the daily search allowance or needs transcripts of public videos. For a pipeline that feeds transcripts to a model, [RAG with Live Web Data](https://perceptlayer.com/blog/rag-with-live-web-data) covers when to index and when to fetch live. To try it, [get a free API key](https://perceptlayer.com/signup), accept the restricted-endpoint terms, and run a search in the playground. ## APIs in this post - [YouTube **1 credit per call** · 15 endpoints](https://perceptlayer.com/apis/youtube) ## Frequently asked questions ### How much is the YouTube Data API quota per day? By default, 100 `search.list` calls, 100 `videos.insert` calls, and 10,000 units for all other methods combined, per Google's documentation as of 2026. Most read methods such as `videos.list` cost 1 unit; `captions.download` costs 200. Quotas reset at midnight Pacific Time, and more quota needs a compliance audit and an extension request. ### Is the YouTube Data API free? Yes, there's no charge within your quota; the limit is the daily allocation, not money. Going beyond it means applying for an extension after a compliance audit, which Google may decline. The per-call endpoints here cost 1 credit per successful call, with 100 free credits after verifying an email address. ### Why did my YouTube API quota run out so fast? Usually because of searches or captions. Search now has its own allowance of 100 calls a day by default, and `captions.list` plus `captions.download` cost 250 units per video. Every request counts, invalid ones included, and retries in a loop add up. Check the Quotas page in the Cloud console to see which method used it. ### Can I get YouTube comments without the official API? Yes. `GET /v1/youtube/comments` takes a `video_id` and an optional `limit`, for 1 credit per successful call. It's a restricted endpoint: accept the restricted-endpoint terms first, use comments for aggregate analysis such as sentiment or topics, and don't collect commenters' identities to profile or contact them. ### What happens if a YouTube call fails? You get an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, and you aren't charged. `restricted_endpoint` (403) means the terms haven't been accepted; `not_found` (404) means no data for that ID; `rate_limited` (429) carries `Retry-After`. The [errors docs](https://docs.perceptlayer.com/errors) list every code. youtube data api quota youtube api transcripts video data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Nov 2026 Perceptlayer 8 min read ## [YouTube Scraper or API: What You Get](https://perceptlayer.com/blog/youtube-scraper-vs-api) A YouTube scraper versus 15 YouTube endpoints at 1 credit a call: search, video, channel, comments, transcripts, trending, and the cost per video tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. --- title: "Skyscanner API: Place Lookup and Fare Calendars" description: "Skyscanner's own API is for approved partners. Two endpoints cover place lookup and a month's fares on one route, at 1 credit a call." url: https://perceptlayer.com/blog/skyscanner-api-flight-search --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Skyscanner API: Place Lookup and Fare Calendars 22 Oct 2026 Perceptlayer 5 min read Skyscanner's official API, the Skyscanner Travel API, is only for approved commercial partners: you apply to its partnerships team, and access goes to established businesses with a large audience whose searches lead to bookings. If you don't qualify, or you need flight prices for research, monitoring or an agent rather than a booking product, two endpoints cover Skyscanner place lookup and fare calendars: `autocomplete` to find place IDs, and `calendar` for a month of fares on one route. Each costs 1 credit per successful call. For full itineraries on a date, the Kiwi.com and Google Flights endpoints take a route and a departure date. ## Key takeaways - The Skyscanner Travel API needs an approved partner application; Skyscanner says it suits established businesses with a large audience, and keys go in an `x-api-key` header once approved. - `GET /v1/skyscanner/autocomplete` takes a `query` (and optional `is_destination`) and returns Skyscanner's places for it. - `GET /v1/skyscanner/calendar` takes `origin`, `destination` and `month`: one call, 1 credit, for a month on a route, against 30 calls for 30 daily searches. - For itineraries on one date, `GET /v1/kiwi/flights-search` and `GET /v1/google-flights/one-way` take `origin`, `destination` and `departure_date`. ## Can you get the official Skyscanner API? Only as a partner. Skyscanner offers its Travel API to commercial partners and reviews each application; its partner site says established businesses with a large audience can apply ( [Skyscanner Partners](https://www.partners.skyscanner.net/product/travel-api), 2026). Its developer documentation says you submit an application to the partnerships team, which contacts you if it's successful, and that approved keys go in an `x-api-key` header on every request ( [Skyscanner developer docs](https://developers.skyscanner.net/docs/intro), 2026). Skyscanner's contact page for the API has listed exclusions such as students, early-stage start-ups and low-traffic sites. If you're building a travel product that sends users to book, apply: that's what the partner API is for, and it comes with Skyscanner's support and terms. If you're a data team tracking fares, a researcher, or a developer giving an agent flight prices, you're probably not the audience it's built for, and the endpoints below are the practical route. Data from them is collected from publicly available sources and returned as found at the time of the call. ## How do you look up Skyscanner places? `GET /v1/skyscanner/autocomplete` takes a `query` of up to 100 characters, such as a city or airport name, and an optional `is_destination` flag for when you're looking up where someone is flying to: ```bash curl "https://api.perceptlayer.com/v1/skyscanner/autocomplete?query=london" \ -H "X-API-Key: $API_KEY" ``` Cache the places you use: they don't change, so you only pay to look each one up once. We didn't run these requests for this post, and we haven't recorded a response from the Skyscanner endpoints yet, so we can't show what comes back. Run `autocomplete` in the playground on the [Skyscanner API page](https://perceptlayer.com/apis/skyscanner) to see its format. ## How do you get a month of fares on one route? Use `calendar`, which takes an `origin`, a `destination` and a `month` in one call. It's meant for questions like "which day is cheapest to fly in March?": one request instead of one search per day. We haven't recorded its response, so confirm in the playground that it returns what your job needs. The parameters are all strings and nothing more is documented about their format, so confirm in the playground whether `origin` and `destination` take the IDs `autocomplete` returns, and how `month` is written. ```bash curl "https://api.perceptlayer.com/v1/skyscanner/calendar?origin=&destination=&month=" \ -H "X-API-Key: $API_KEY" ``` Replace the three placeholders before you run it. A sensible workflow is calendar first, to find the cheap days, then a date search on Kiwi.com or Google Flights for the itineraries on those days. For more on what fare data can and can't tell you, see [Flight Price Data: What Fare Tracking Can and Cannot Show](https://perceptlayer.com/blog/flight-price-data-fare-tracking). ## What does scanning a month on one route cost? Each successful call costs 1 credit and a failed call costs nothing, returning `X-Credits-Used: 0`. That makes the choice between calendar and daily searches a factor of 30, and it's the main lever on a fare tracker's bill: scan months with `calendar`, then spend date searches only on the days worth a closer look. | Job | Calls | Credits | | --- | --- | --- | | One route, one month, calendar | 1 | 1 | | One route, one month, a search per day | 30 | 30 | | 50 routes, calendar for the next 3 months, weekly | 50 × 3 × 4 | 600 a month, a year of it within the Starter pack's 10,000 | | 200 routes, calendar daily for the next month | 200 × 30 | 6,000 a month, within the Starter pack's 10,000 | | Add 3 Kiwi.com or Google Flights searches per route on the cheapest days | 200 × 3 × 30 | 18,000 more, so 24,000 in all, within the Build pack's 50,000 | Place lookups add one credit per new place, once, if you cache them. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Free accounts run at 1 request a second, so 200 calendar calls take under 4 minutes; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list faster rates. ### Which other flight sources should you compare? Fares for the same route differ by site, so a fare tracker usually checks more than one, and the Skyscanner endpoints here don't search a single date. The catalogue also has Google Flights and Kiwi.com endpoints at 1 credit a call: [Google Flights API](https://perceptlayer.com/blog/google-flights-api) and [Kiwi.com API: Search Fares and Cheapest Dates](https://perceptlayer.com/blog/kiwi-flights-api-cheapest-dates) cover them. For an agent that plans trips across flights and hotels, see [AI Travel Planning Agent: Flights and Hotels via MCP](https://perceptlayer.com/blog/ai-travel-planning-agent-mcp). Start by running `autocomplete` for your home city in the playground on the [Skyscanner API page](https://perceptlayer.com/apis/skyscanner), then `calendar` for a route you know. Other travel sources are under [Travel](https://perceptlayer.com/verticals/travel). When the fields fit, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Skyscanner **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/skyscanner) ## Frequently asked questions ### Is the Skyscanner API free? Skyscanner's partner API is offered to approved commercial partners under Skyscanner's terms; there's no self-serve public tier. The endpoints here cost 1 credit per successful call, and every account gets 100 free credits after verifying an email address, enough for 100 calendar calls. ### How do I get a Skyscanner API key? For the official Travel API, apply through Skyscanner's partner site; the partnerships team reviews applications and contacts successful applicants. For the endpoints here, sign up at [/signup](https://perceptlayer.com/signup), verify your email and send the key, which starts with `sk_live_`, in the `X-API-Key` header. ### Can I book flights through these endpoints? No. They return search results and fares as found at the time of the call; booking happens on the airline's or agent's site. If you're building a product where users book, Skyscanner's partner API, which is built around bookings, is the better fit. ### How do I find the cheapest day to fly? Call `GET /v1/skyscanner/calendar` with the route and the month: one call, 1 credit, covers the month. Then search the cheapest days on Kiwi.com or Google Flights to see itineraries. Fares change often, so treat a calendar price as a signal to search, not a quote. ### What happens if a search fails? You get an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, and you aren't charged. `invalid_parameters` (422) usually means a missing required parameter; `rate_limited` (429) comes with a `Retry-After` header. The [errors docs](https://docs.perceptlayer.com/errors) list every code. skyscanner flights travel data fare tracking flight search ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Nov 2026 Perceptlayer 9 min read ## [Google Flights Scraper or API: What You Get](https://perceptlayer.com/blog/google-flights-scraper-vs-api) Compare a Google Flights scraper with 9 endpoints at 1 credit a call: a recorded JFK to LAX search with price, stops, CO2 and a booking\_token per flight. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Booking.com Scraper or API: What You Get](https://perceptlayer.com/blog/booking-com-scraper-vs-api) A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 9 min read ## [Vrbo Scraper or API: What You Get](https://perceptlayer.com/blog/vrbo-scraper-vs-api) A Vrbo scraper vs 6 endpoints at 1 credit a call: a recorded Lake Tahoe search with stay\_total, nightly\_original and rating, and the cost per listing. --- title: "Spotify API: Official Web API vs Public Music Data" description: "The Spotify Web API needs an OAuth app and limits new apps; 18 public-data endpoints cover artists, top tracks, playlists and charts, most at 1 credit a call." url: https://perceptlayer.com/blog/spotify-api-public-music-data --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Spotify API: Official Web API vs Public Music Data 22 Oct 2026 Updated 12 Nov 2026 Perceptlayer 8 min read Spotify's official API is the Spotify Web API: a REST API you call with an OAuth access token from an app you register on Spotify for Developers. It's the right choice when your users sign in with Spotify and you act on their library or playback. For public catalogue data, such as artists, top tracks, playlists and charts, it has become harder to use: since late 2024 new apps can't call several endpoints, and since 2026 development-mode apps have tight user and quota limits. This post compares the official route with 18 public-data endpoints, most of them 1 credit a call. ## Key takeaways - The Spotify Web API uses OAuth 2.0 access tokens from a registered app. It's the only route for user actions such as reading a user's library, editing playlists or controlling playback. - Since 27 November 2024, new apps can't use Related Artists, Recommendations, Audio Features, Audio Analysis and some playlist endpoints. Extended access has been limited to established organisations since May 2025. - Development-mode apps now need a Premium account owner and are capped at five authorised users, per Spotify's February 2026 changes. - The catalogue's Spotify API has 18 `GET` endpoints, including `/v1/spotify/search`, `/v1/spotify/artist-top-tracks`, `/v1/spotify/playlist-tracks` and `/v1/spotify/charts`, with no OAuth: 11 cost 1 credit per successful call, and 7 are priced by how much they return, such as `playlist-tracks` and `charts` at 1 credit per 100 tracks. ## How does the official Spotify Web API work? The Spotify Web API is a REST API over Spotify's catalogue and users' accounts. You register an app on Spotify for Developers to get a client ID and secret, then request an OAuth 2.0 access token and send it with each call. Catalogue-only calls can use the client credentials flow; anything about a user, such as their saved tracks, playlists or what's playing, needs that user to sign in and grant scopes. That design suits apps where people log in with Spotify: a playlist tool, a DJ app, a listening-stats site. It's free to call within Spotify's rate limits, which apply over a rolling 30-second window and answer with a 429 and `Retry-After` when exceeded ( [Spotify for Developers: rate limits](https://developer.spotify.com/documentation/web-api/concepts/rate-limits), 2026). It comes with Spotify's Developer Terms, which govern what you may store and show. If your product needs a user's own Spotify data or needs to act on their account, the Web API is the only legitimate route, and the rest of this post doesn't change that. ## What changed for new Spotify apps since 2024? Access for new apps has narrowed in three steps. On 27 November 2024, Spotify announced that new Web API use cases could no longer use Related Artists, Recommendations, Audio Features, Audio Analysis, Get Featured Playlists, Get Category's Playlists, 30-second preview URLs in multi-get responses, or algorithmic and Spotify-owned editorial playlists ( [Spotify for Developers](https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api), 2024). Apps that already had extended access kept it. From 15 May 2025, extended access has been reserved for established, scalable use cases, and Spotify accepts applications only from organisations, not individuals ( [Spotify for Developers](https://developer.spotify.com/blog/2025-04-15-updating-the-criteria-for-web-api-extended-access), 2025). Its quota modes page lists requirements including a legally registered business and at least 250,000 monthly active users ( [Quota modes](https://developer.spotify.com/documentation/web-api/concepts/quota-modes), 2026). Development mode tightened in February 2026: the app owner needs Spotify Premium, and each app is limited to five authorised users ( [Spotify for Developers](https://developer.spotify.com/blog/2026-02-06-update-on-developer-access-and-platform-security), 2026). A July 2026 update raised the number of development-mode client IDs per account and moved quota to the account level ( [Web API quota updates](https://developer.spotify.com/blog/2026-07-23-web-api-quota-updates), 2026). Check Spotify's changelog before you plan around any of this: the rules have changed several times in two years. ## What do the public-data endpoints cover? The catalogue's Spotify API has 18 endpoints for public catalogue data, all `GET`, with no OAuth app or user sign-in. Eleven cost 1 credit per successful call. Seven are priced by how much they return: `playlist-tracks` and `charts` cost 1 credit per 100 tracks (up to 10), `album-tracks` 1 per 50 tracks and `show-episodes` 1 per 50 episodes (up to 20), `album` and `artist` 1, or 2 when a second lookup is needed, and `get-many` 1 per id found, or 2 for an id that needs a second lookup (up to 50 ids, at most 100 credits). Failed calls cost nothing and return `X-Credits-Used: 0`. You authenticate with one API key in the `X-API-Key` header, the same key that works for all 480 websites in the catalogue. | Group | Endpoints | Required parameter | | --- | --- | --- | | Search | `search`, `search-suggestions` | `q` | | Artists | `artist`, `artist-top-tracks`, `artist-discography`, `artist-related` | `id` | | Albums and tracks | `album`, `album-tracks`, `track`, `track-colors`, `get-many` | `id` ( `image_uri` for `track-colors`; `get-many` takes optional `ids[]` and `type`) | | Playlists | `playlist`, `playlist-tracks` | `id` | | Podcasts | `show`, `show-episodes`, `episode` | `id` | | Charts | `charts` | `key` | | Discovery | `discovery-audio-mix-seed` | `track_id` | List endpoints take paging parameters: `search` and `artist-discography` take `limit` and `offset`; `album-tracks`, `playlist-tracks`, `show-episodes` and `charts` take `limit` and an `all` flag. A search request looks like this: ```bash curl "https://api.perceptlayer.com/v1/spotify/search?q=daft+punk&limit=5" \ -H "X-API-Key: $API_KEY" ``` We didn't run this request, and we haven't recorded a response from the Spotify endpoints yet, so this post doesn't show one. Run it in the playground on the [Spotify API page](https://perceptlayer.com/apis/spotify) to see what each response contains, and try `charts` there too, since its accepted `key` values aren't listed in the reference. What these endpoints don't do is anything on a user's behalf. There's no login, no library, no playback and no playlist editing. Data is collected from publicly available sources and returned as found at the time of the call. ## How do the two routes compare? The two routes overlap on public catalogue reads and nowhere else. The official API owns everything involving a user, from libraries to playback, and costs nothing within its limits. The public-data endpoints are simpler for read-only catalogue work, because there's no app review, token flow or user cap, and they cover some data that's closed to new Spotify apps. | | Spotify Web API | Public-data endpoints | | --- | --- | --- | | Auth | OAuth 2.0 token from a registered app | One API key ( `X-API-Key`) | | User data and actions | Yes, with the user's consent and scopes | No | | Catalogue reads | Yes, within your app's access level | Search, artists, albums, tracks, playlists, podcasts, charts | | Related artists for a new app | Not available since November 2024 | `artist-related` endpoint | | Development limits | Premium owner, five authorised users | None per user; per-account request rate | | Rate limit | Rolling 30-second window | 1 request a second free, at least 5 a second paid | | Cost | Free within Spotify's limits | 1 credit per successful call for most endpoints, more for large playlists, charts and batches; failed calls cost 0 | | Terms | Spotify Developer Terms | Perceptlayer terms; data as found | ### What does a tracking job cost? Cost follows calls. A label tracking the top tracks of 500 artists weekly makes 500 × 4 = 2,000 calls a month, so 2,000 credits. Adding one daily `charts` call is 30 to 300 more, since `charts` costs 1 credit per 100 tracks returned. The Starter pack's 10,000 credits cover about four months of that (4 × 2,300 = 9,200 at most); the 100 free credits you get once, after verifying an email address, are enough to test the calls. Pulling every track of 1,000 playlists once is at least 1,000 credits: `playlist-tracks` costs 1 credit per 100 tracks returned, so a playlist with more than 100 tracks costs more than 1 credit. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ## Which should you use? Use the official API when the work involves a Spotify user, and consider the public-data endpoints when it's read-only analysis of the public catalogue. If you're unsure, ask whether anyone signs in: if they do, it's the Web API; if the job runs unattended over public artists, playlists and charts, it's the endpoints. The verdicts per use case: - **An app where users sign in with Spotify** (playlist builders, stats, players): the Web API. Nothing else can act on a user's account. - **A personal project for you and a few friends**: the Web API in development mode, if you have Premium and need five users or fewer. - **Music market research** (which artists' top tracks change, chart movement, playlist contents over time): the public-data endpoints. No OAuth app, no user cap, and the same key covers other sources such as YouTube and app stores. - **An AI agent that answers music questions**: the public-data endpoints through MCP. The agent finds them with `search_endpoints` and runs them with `call_endpoint`; [What Is an MCP Server?](https://perceptlayer.com/blog/what-is-an-mcp-server) shows the full exchange. - **A product built on audio features or recommendations**: neither, unless your app already has extended access. Those endpoints are closed to new Spotify apps, and the catalogue doesn't offer audio features either. To see the data before deciding, run `search` and then `artist-top-tracks` with an `id` from the result in the playground on the [Spotify API page](https://perceptlayer.com/apis/spotify), or [get a free API key](https://perceptlayer.com/signup). Other music and media sources are under [Apps and media](https://perceptlayer.com/verticals/apps). ## APIs in this post - [Spotify **1 credit per call** · 18 endpoints](https://perceptlayer.com/apis/spotify) ## Frequently asked questions ### Is the Spotify API free? The Spotify Web API costs nothing to call, but it needs a registered app, OAuth tokens and, in development mode since February 2026, a Premium account owner, with at most five authorised users per app. The public-data endpoints need no app and most cost 1 credit per successful call (the ones that return long track lists cost more, by how much they return), with 100 free credits after verifying an email address. ### Can I still get related artists from Spotify? Not through a new Spotify app: Related Artists is among the endpoints Spotify closed to new Web API use cases on 27 November 2024, and only apps that already had extended access kept it. The catalogue includes `GET /v1/spotify/artist-related`, which takes an artist `id` and costs 1 credit per successful call; run it in the playground on the Spotify API page to see what it returns. ### How do I get a Spotify API key? For the official API you create an app in the Spotify for Developers dashboard to get a client ID and secret, then exchange them for an OAuth access token. For the public-data endpoints you create a free account at [/signup](https://perceptlayer.com/signup) and send the key, which starts with `sk_live_`, in the `X-API-Key` header. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the details. ### Can I get a user's playlists or listening history? Only through the official Web API, with that user's sign-in and the right scopes. The public-data endpoints read public catalogue items, such as a public playlist by its `id`, and have no access to anyone's account, listening history or private playlists. ### What happens if I send too many requests? You get a 429 with a `Retry-After` header giving the seconds to wait, from either route. On Perceptlayer the limit is per account, 1 request a second on a free account, and a 429 costs nothing. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate for each pack. spotify music data web api oauth charts ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Nov 2026 Perceptlayer 7 min read ## [Spotify Scraper or API: What You Get](https://perceptlayer.com/blog/spotify-scraper-vs-api) A Spotify scraper vs 18 Spotify endpoints: playlist-tracks at 1–10 credits, charts at 1–10, top tracks at 1, and how to budget a playlist and chart tracker. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. --- title: "Steam API: Game Details, Prices and Reviews as JSON" description: "Steam API guide: how to get a Steam Web API key, what it covers, and app, reviews and search endpoints for store prices and reviews by appid at 1 credit a call." url: https://perceptlayer.com/blog/steam-api-store-data --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Steam API: Game Details, Prices and Reviews as JSON 22 Oct 2026 Perceptlayer 7 min read The Steam API most people mean is the Steam Web API, Valve's official API at `api.steampowered.com`. It needs a free key from a non-limited Steam account, allows 100,000 calls a day, and is strongest on player, stats and ownership data. For store data by appid, such as a game's details and price in a given country and its user reviews, the catalogue's Steam API has `app`, `reviews` and `search` endpoints at 1 credit a call with no Steam account. This guide covers both: getting a key, and pulling store data. ## Key takeaways - A Steam Web API key comes from `steamcommunity.com/dev/apikey`. You need a Steam account that isn't limited, usually meaning at least $5 spent on Steam, and a domain name to register. - Valve's terms cap a standard key at 100,000 Steam Web API calls a day. - `GET /v1/steam/app` takes an `appids` integer plus optional `cc` (country) and `l` (language); `GET /v1/steam/reviews` takes an `appid` and filters such as `review_type`, `language` and `day_range`, with a `cursor` for paging. - Each successful call costs 1 credit. Tracking 200 games' store data and newest reviews daily is 200 × 2 × 30 = 12,000 credits a month. ## What does the official Steam Web API cover? The Steam Web API is Valve's HTTP API for Steam's community and game services. Its public interfaces cover players and their games: profile summaries, friends lists, owned games, achievements and game stats. Most methods need a key, and some return data only for profiles their owners have made public. Publishers get extra methods through a separate publisher key ( [Steamworks: Web API overview](https://partner.steamgames.com/doc/webapi_overview), 2026). That makes it the right tool for anything about Steam users who've chosen to share: a stats site, a "what are my friends playing" bot, achievement tracking. It's free, documented and official. Store data is a different area. For user reviews Valve documents its own method, `IUserReviewsService/GetAppReviews`, which replaces the older `appreviews` store route, with filters for sort order, language, purchase type and a cursor for paging ( [Steamworks: User Reviews](https://partner.steamgames.com/doc/store/getreviews), 2026). If you're comfortable calling it directly within Valve's terms, do. The endpoints below are for when you'd rather use one API key across many sources and get JSON back with the same auth, errors and billing as everything else. ## How do you get a Steam API key? You get a Steam Web API key from the Steam Community developer page at `steamcommunity.com/dev/apikey`, signed in to your Steam account. Valve asks for a domain name for the app that will use the key and that you accept the Steam Web API Terms of Use. The terms make you responsible for keeping the key confidential and cap it at 100,000 calls a day ( [Steam Web API Terms of Use](https://steamcommunity.com/dev/apiterms), 2026). The account can't be a limited user account. Valve lists access to the Steam Web API among the features limited accounts can't use ( [Steam Support](https://help.steampowered.com/faqs/view/71D3-35C2-AD96-AA3A), 2026). An account usually stops being limited once at least $5 has been spent on Steam, for example by adding funds to the wallet or buying a game; free games and retail key activations don't count. Two cautions. Never share the key: anyone with it can make calls charged to your daily limit and your account. And never paste it into a site that asks for it to "check your inventory"; that's a common scam on Steam. ## Which store endpoints does the catalogue's Steam API have? The catalogue's Steam API has four `GET` endpoints, each 1 credit per successful call. Three of them cover the store: `search` finds games and their appids by name, `app` returns a game's store data for an appid, and `reviews` returns its user reviews. The fourth, `profile`, looks up a player profile; it's personal data, so this guide doesn't use it. | Endpoint | Required | Optional | | --- | --- | --- | | `GET /v1/steam/search` | `term` (string, up to 255 characters) | `l` (language), `cc` (2-character country) | | `GET /v1/steam/app` | `appids` (integer) | `cc` (2-character country), `l` (language) | | `GET /v1/steam/reviews` | `appid` (integer) | `language`, `num_per_page`, `purchase_type`, `filter`, `review_type`, `day_range`, `cursor`, `include_histogram` | | `GET /v1/steam/profile` | `identifier` (string) | `include_html` | Send the key in the `X-API-Key` header; it starts with `sk_live_`. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ## How do you find a game's appid and store data? Search by name first, because every other store endpoint takes the numeric appid, and a name can match more than one store item, so check which result you take before you use its appid. Pass the store language in `l` and the country in `cc` so the results match the store you care about. This is the catalogue's example request: ```bash curl "https://api.perceptlayer.com/v1/steam/search?term=portal&l=english&cc=US" \ -H "X-API-Key: $API_KEY" ``` Take the appid of the game you want from the results and pass it to `app` as `appids`. Store prices differ by country, so set `cc` to the store region you care about and `l` to the language for text fields. A game's appid is also in its store URL: `store.steampowered.com/app//…`. ```bash curl "https://api.perceptlayer.com/v1/steam/app?appids=&cc=US&l=english" \ -H "X-API-Key: $API_KEY" ``` Replace `` with the number before you run it. We didn't run these requests for this post, and we haven't recorded a response from the Steam endpoints yet, so we can't show what comes back. Run `search` and then `app` in the playground on the [Steam API page](https://perceptlayer.com/apis/steam) to see the fields before you build on them. Data is collected from publicly available sources and returned as found at the time of the call. ## How do you pull a game's reviews? Call `reviews` with the `appid` and the filters you need, then page with `cursor`. Each call returns one page of reviews and a cursor for the next, so you choose how deep to go: one page of the newest reviews for daily monitoring, or every page for a full history. Most filters take fixed values: | Parameter | Values | | --- | --- | | `filter` | `all`, `recent`, `updated` | | `review_type` | `all`, `positive`, `negative` | | `purchase_type` | `all`, `steam`, `non_steam` | | `language` | `all`, `english`, `german`, `schinese`, `japanese` and 26 more | | `day_range` | An integer number of days | | `num_per_page` | An integer | | `include_histogram` | `true` or `false` | | `cursor` | The value from the previous page | A request for the newest English reviews: ```bash curl "https://api.perceptlayer.com/v1/steam/reviews?appid=&filter=recent&language=english&review_type=all" \ -H "X-API-Key: $API_KEY" ``` For a full history, use `filter=recent` and keep passing the cursor from each page until a page comes back empty. Valve's documentation notes that its default "helpful" ordering widens the day range until it finds results, so a recent-first order is the one that ends ( [Steamworks: User Reviews](https://partner.steamgames.com/doc/store/getreviews), 2026). For daily monitoring, one page of `filter=recent` per game is usually enough: store each review once and skip ones you've seen. Reviews carry reviewers' identities. Keep the text, rating and dates you need for analysis and leave out names and profile links. [Summarise Restaurant Reviews with an AI Agent](https://perceptlayer.com/blog/ai-restaurant-review-summary-agent) shows a pattern for summarising review text that works the same way for games. ## What does tracking a list of games cost? Each successful call costs 1 credit and a failed call costs nothing, returning `X-Credits-Used: 0`. So the cost of a tracking job is games × calls per game × runs, and you can work it out before you start. Store data is one call per game per region; reviews are one call per page. | Job | Calls a month | Credits | | --- | --- | --- | | 30 games, store data daily | 30 × 30 | 900, within the Starter pack's 10,000; the 100 free credits cover the first 3 days | | 200 games, store data and one page of new reviews daily | 200 × 2 × 30 | 12,000, within the Build pack's 50,000 | | 1,000 games, store data weekly in 3 regions | 1,000 × 3 × 4 | 12,000 | | Full review history of one game | One call per page | Depends on the number of reviews | Every successful response reports `X-Credits-Used` and `X-Credits-Remaining`, so a job can log its spend as it runs. Free accounts run at 1 request a second, so the 200-game daily job's 400 calls take under 7 minutes. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) for faster rates. To start, run `search` with a game you know in the playground on the [Steam API page](https://perceptlayer.com/apis/steam), then `reviews` with its appid. Other game and app stores are under [Apps and media](https://perceptlayer.com/verticals/apps). When it fits, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Steam **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/steam) ## Frequently asked questions ### Is the Steam API free? The official Steam Web API costs nothing, but needs a key from a non-limited Steam account and is capped at 100,000 calls a day under Valve's terms. The catalogue's Steam endpoints need no Steam account and cost 1 credit per successful call, with 100 free credits after verifying an email address. ### Why can't I get a Steam API key? Usually because the account is limited. Valve doesn't give limited user accounts access to the Steam Web API; spending at least $5 on Steam, such as adding wallet funds or buying a game, normally lifts the limit. You also need to enter a domain name and accept the Steam Web API Terms of Use. ### Can I get Steam prices for different countries? Yes. Pass a two-character country code in `cc` to `GET /v1/steam/app`, with the game's appid in `appids`. One call returns one region, so tracking three regions costs three credits per game per run. Prices are returned as the store shows them at the time of the call. ### How do I get all reviews for a Steam game? Call `GET /v1/steam/reviews` with the `appid` and `filter=recent`, then pass the `cursor` from each response into the next request until a page comes back empty. Each page costs 1 credit. For a busy game this is many pages, so store what you've fetched and later pull only the newest page. ### What happens if a call fails? You get an HTTP status and a JSON body `{"error": {"code", "message", "request_id"}}`, and you aren't charged. `invalid_parameters` (422) usually means a parameter is the wrong type, such as a non-numeric `appid`; `not_found` (404) means no data for those parameters. The [errors docs](https://docs.perceptlayer.com/errors) list every code. steam video games game reviews steam api key prices ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Nov 2026 Perceptlayer 7 min read ## [Steam Scraper or API: What You Get](https://perceptlayer.com/blog/steam-scraper-vs-api) A Steam scraper vs 4 Steam endpoints at 1 credit a call: reviews filtered by language, type and day range, regional store data by cc, and the cost per game. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Target API: Product Search and Prices as JSON](https://perceptlayer.com/blog/target-api-product-data) Search Target products as JSON with tcin, price.current, price.regular, is\_on\_sale and rating per result: 1 credit a page of 24, product lookups 1–2 credits. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Google Hotels API: Hotel Prices for Your Dates as JSON](https://perceptlayer.com/blog/google-hotels-api) One GET to /v1/google-hotels/search returns Paris hotels with nightly rate, total rate and rating for your dates as JSON. Parameters, a response and cost. --- title: "MLS API: How to Get MLS Listing Data | Perceptlayer" description: "An MLS API means a RESO Web API feed licensed through an MLS or broker. Compare it with Zillow and Redfin listing endpoints at 1 credit a call." url: https://perceptlayer.com/blog/mls-api-listing-data --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # MLS API: How to Get MLS Listing Data 20 Oct 2026 Perceptlayer 6 min read There's no single public MLS API. MLS data comes from many separate regional multiple listing services, and you get it through the RESO Web API, the industry's standard interface, under a licence from a specific MLS, usually as a broker, an agent or a vendor working for one. If you don't qualify, or you need listings across many markets without a broker relationship, listing-portal endpoints return the listings that Zillow and Redfin show publicly, at 1 credit a call. This post compares the two routes and says which fits which job. ## Key takeaways - MLS data is licensed, not open. RESO sets the standard (the RESO Web API, built on OData) but provides no data or credentials; access comes from each MLS under its data licence. - The licence type limits the use: IDX feeds are for public display on brokers' sites, VOW feeds for a brokerage's registered clients, and broker back-office (BBO) feeds for internal tools. - Listing portals show MLS-sourced listings publicly. The recorded Zillow search response names the source MLS in `propertyDisplayRules.mls.mlsName`, and Redfin's search returns an `mls_number` per listing. - `GET /v1/redfin/search` takes a `region_id`, `region_type` and `market`; the recorded Seattle response returned `count` 350 with price, beds, baths, sqft and status per home, for 1 credit. ## What is an MLS API? An MLS API is the interface a multiple listing service offers for its listing data, and in the US and Canada that interface is increasingly the RESO Web API. RESO, the Real Estate Standards Organization, publishes the standard: a RESTful API built on OData V4, plus the Data Dictionary that fixes field names such as `ListPrice` and `StandardStatus` across MLSs ( [RESO Web API](https://www.reso.org/reso-web-api/), 2026). The standard is shared; the data isn't. RESO states that it doesn't provide MLS data, property records or access to other organisations' APIs, and that credentials come from the MLS or its data provider after you agree to that MLS's data use and licensing policies ( [RESO FAQ](https://www.reso.org/ht-faq/new-faq-question-156/), 2026). So "getting an MLS API" means getting a licence from each MLS whose market you need, then connecting to its RESO Web API endpoint or to a platform that distributes its feed. Some MLSs share one distribution platform. The Zillow listing recorded below names its source as "NWMLS as distributed by MLS GRID", which is how a Seattle listing reaches portals. ## Who can get MLS data, and for what? MLS data goes to MLS participants and the vendors they authorise, and each licence comes with a permitted use. NAR's IDX policy lets participants display other participants' listings on their own websites and apps, with rules on attribution and refresh, and bars using IDX listings for any other purpose ( [NAR: Internet Data Exchange](https://www.nar.realtor/about-nar/policies/internet-data-exchange-idx), 2026). RESO distinguishes the three common licence types: | Feed | Who gets it | Permitted use | | --- | --- | --- | | IDX | Brokers and their website vendors | Public display of other brokers' listings | | VOW | Brokers running a virtual office website | Display to the brokerage's registered clients | | BBO | Brokers | Internal back-office tools, not public display | In Canada, REALTOR.ca's Data Distribution Facility (DDF) is the permission-based route for member websites, and anyone who wants to work with its data must sign a data access agreement ( [CREA: REALTOR.ca DDF](https://www.crea.ca/technology/realtor-ca-for-realtors/realtor-ca-tools/realtor-ca-ddf/), 2026). If you're a broker, an agent, or a vendor building for one, this is the route to take. You get the full listing record in standard fields, often fields portals don't show, with the MLS's blessing. If you're a data team, an investor or a researcher with no brokerage, the licences generally don't cover you, and analysis across markets may fall outside what IDX allows. ## What do listing-portal endpoints return instead? Listing-portal endpoints return the listings a portal shows the public, as JSON, without an MLS licence. Each call costs 1 credit, and failed calls cost nothing. Data is collected from publicly available sources and returned as found at the time of the call, so it's the portal's view of the listing, not the MLS record. A Redfin search for one region, recently sold: ```bash curl "https://api.perceptlayer.com/v1/redfin/search?region_id=16163®ion_type=6&market=seattle&sold_within_days=30" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to one home: ```json { "data": { "properties": [ { "property_id": 124182, "listing_id": 224635828, "address": "2517 25th Ave W", "city": "Seattle", "state": "WA", "zip": "98199", "price": 2750000, "beds": 3, "baths": 4, "sqft": 3570, "lot_size": 5120, "year_built": 2005, "property_type": 1, "status": "Coming Soon", "latitude": 47.6416879, "longitude": -122.3893426, "url": "/WA/Seattle/2517-25th-Ave-W-98199/home/124182", "mls_number": "2222589287335410617" }, … ], "count": 350, "region_id": 16163, "region_type": 6 } } ``` Note that the two homes in this recording have `status` "Coming Soon" even though the request set `sold_within_days`, so check the status field rather than assuming the filter. `GET /v1/redfin/locations` turns a place name into the `region_id` and `region_type` the search needs. [Redfin API: Search Homes, Then Property and Valuation](https://perceptlayer.com/blog/redfin-api-property-valuation) covers those endpoints. Zillow's search takes coordinates and a radius, or a bounding box: ```bash curl "https://api.perceptlayer.com/v1/zillow/search?latitude=47.6062&longitude=-122.3321&radius_mi=5&listing_category=category1&page_size=20" \ -H "X-API-Key: $API_KEY" ``` Its recorded response, trimmed to the fields an MLS comparison cares about: ```json { "data": { "listings": [ { "zpid": 2068074790, "address": { "streetAddress": "1124 Sunset Avenue SW", "zipcode": "98116", "city": "Seattle", "state": "WA" }, … "bathrooms": 6, "bedrooms": 4, "livingArea": 7870, "yearBuilt": 2015, "propertyType": "singleFamily", "listing": { "listingStatus": "forSale", "marketingStatus": "active", … }, "price": { "value": 14000000, "pricePerSquareFoot": 1779 }, "estimates": { "zestimate": 13068300 }, … "propertyDisplayRules": { "canShowAddress": true, "canShowOnMap": true, "mls": { "mlsName": "NWMLS as distributed by MLS GRID", "mlsStatus": "Active" }, … }, … }, … ] } } ``` ## How do the two routes compare? The two routes answer different questions. An MLS feed is the authoritative record for one market, under a licence that limits who you are and what you do with it. Portal endpoints are the public view across markets, under no MLS licence, with the portal's field names and whatever the portal chooses to show. | | MLS feed (RESO Web API) | Listing-portal endpoints | | --- | --- | --- | | Who can get it | MLS participants and their authorised vendors | Anyone with an API key | | How | Licence per MLS, then credentials | One key in `X-API-Key` | | Coverage | One MLS's market per licence | Whatever each portal shows: the US (Zillow, Redfin) | | Field names | RESO Data Dictionary, consistent across MLSs | Each portal's own ( `price.value`, `price`, …) | | Fields | Full listing record, including fields portals hide | What the portal displays, plus portal estimates such as `zestimate` | | Use limits | IDX, VOW or BBO terms | Perceptlayer terms; data as found | | Freshness | Feed updates, with refresh rules for display | As of each call | | Cost | MLS and vendor fees, set per MLS | 1 credit per successful call | ### What does a market scan cost? Portal calls are priced per call. Scanning 20 US regions on Redfin weekly is 20 × 4 = 80 calls a month if each region fits one page, plus one call per extra page. Adding a Zillow search over the same 20 areas doubles it to 160 credits a month. The 100 free credits on signup cover the first two weekly scans on both portals (2 × 40 = 80 credits), and a Starter pack of 10,000 credits covers a year of it (12 × 160 = 1,920). A daily scan of 200 regions on both portals is 200 × 2 × 30 = 12,000 credits, inside the Build pack's 50,000. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ## Which should you use? Pick the route your role and use allow. If you have or can get an MLS licence for the use you have in mind, it's the better source for that market; if you can't, portal data is the public alternative. - **A broker or agent website showing listings**: an IDX feed from your MLS. It's what IDX is for, and the display rules come with it. - **A tool for a brokerage's own clients or staff**: VOW or BBO access through the brokerage. - **Investment or market research across many metros**: portal endpoints. No MLS licence covers casual cross-market analysis, and one key covers several portals. [Real Estate Listing Data: Fields That Matter for Valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields) covers what to keep. - **An AI agent that answers property questions**: portal endpoints through MCP; [Build an AI Property Research Agent](https://perceptlayer.com/blog/ai-property-research-agent) shows one. - **Records the portals don't show** (agent remarks, showing instructions, full history): only the MLS, under a licence that allows it. Whichever you choose, match listings across sources by address and coordinates rather than IDs; [Deduplicate Listings Across Sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers that. To see the portal data first, run a search in the playground on the [Redfin API page](https://perceptlayer.com/apis/redfin) or the [Zillow API page](https://perceptlayer.com/apis/zillow), or [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Zillow **1 credit per call** · 20 endpoints](https://perceptlayer.com/apis/zillow) - [Redfin **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/redfin) ## Frequently asked questions ### Is there a free MLS API? Not in the sense of open public access. Each MLS licenses its own data, usually only to participants and their vendors, and fees vary by MLS. RESO publishes the API standard but no data. Portal endpoints aren't free either, but every account gets 100 free credits on signup, enough for 100 searches at 1 credit each. ### Can I get MLS data without being a real estate agent? Usually not directly. MLS licences go to participants, mostly brokers, and to vendors they authorise, and permitted uses are tied to the licence type. A developer can work as a vendor for a broker. Without that, the public listing portals are the practical source, with the portal's view of each listing rather than the MLS record. ### Do Zillow and Redfin listings come from the MLS? Many do. The recorded Zillow response names its source as "NWMLS as distributed by MLS GRID" in `propertyDisplayRules.mls.mlsName`, and Redfin's search returns an `mls_number` for each home. Portals also carry listings from other sources, so check those fields if MLS origin matters to you. ### What is the RESO Web API? It's the real estate industry's standard API for MLS data, published by the Real Estate Standards Organization and built on the OData V4 protocol. It pairs with the RESO Data Dictionary, which standardises field names across MLSs. Access to any particular MLS's Web API still requires that MLS's licence and credentials. ### How do I get a listing by MLS number? With an MLS licence, query your MLS's feed by its listing ID field. On Redfin, `mls_number` appears in search results alongside the `property_id` that the property endpoint takes. mls real estate reso web api idx listings ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Oct 2026 Updated 24 Oct 2026 Perceptlayer 7 min read ## [Redfin API: Search Homes, Then Property and Valuation](https://perceptlayer.com/blog/redfin-api-property-valuation) Four Redfin endpoints at 1 credit each: find a region, search homes with a real JSON response, then call property and valuation by property\_id. --- title: "Real Estate API: Property Listing Data by Country" description: "Real estate API by country: Zillow and Redfin (US), Rightmove (UK), Idealista (Spain), ImmobilienScout24 (Germany), Domain (Australia). 1 credit a call." url: https://perceptlayer.com/blog/real-estate-data-apis-by-country --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Real Estate API: Property Listing Data by Country 20 Oct 2026 Perceptlayer 7 min read A real estate API returns property listings as JSON: price, address, bedrooms, size, coordinates and a listing ID, for a location you choose. Which one you need depends on the country, because each market has its own dominant portal: Zillow and Redfin in the US, Rightmove in the UK, Idealista in Spain, ImmobilienScout24 in Germany and Domain in Australia. Below is one table of the search endpoint for each, with field names from recorded responses, then a short section per source. Every call costs 1 credit, and failed calls cost nothing. ## Key takeaways - Six portals in five countries, one API key: every search endpoint here is a `GET` under `/v1/{portal}/search` (Idealista's is `/v1/idealista/map-search` in the recording) at 1 credit per successful call. - Field names differ by portal: Zillow's price is `price.value`, Rightmove's `price.amount` with `currencyCode`, Redfin's and Idealista's a plain `price`, Domain's a text `display_price`. - Searches report totals you can plan around: the recorded London search on Rightmove returned `count` 60,081, Berlin rentals on ImmobilienScout24 `total_results` 11,396. - Searches are capped per sweep on some portals: the Rightmove recording notes about 1,000 records over 41 pages, and Zillow's says `page * page_size` must not exceed 1,000. Split large areas into smaller ones. ## Which real estate API covers which country? Each country's listings live mostly on one or two portals, so a real estate API for several countries is really several APIs with one interface. This table lists the search endpoint for each, the parameters the recorded call used, and the fields a valuation or market model reads first. All figures come from recorded responses; data is collected from publicly available sources and returned as found at the time of the call. | Country | Portal | Search endpoint | Recorded request | Price | Size | Recorded total | | --- | --- | --- | --- | --- | --- | --- | | US | Zillow | `/v1/zillow/search` | Seattle, 5-mile radius | `price.value`, `pricePerSquareFoot` | `livingArea` (sq ft) | `total_matching_count` 2,058 | | US | Redfin | `/v1/redfin/search` | Seattle region, sold within 30 days | `price` | `sqft` | `count` 350 | | UK | Rightmove | `/v1/rightmove/search` | London, `channel=BUY` | `price.amount`, `currencyCode` | `displaySize` (text) | `count` 60,081 | | Spain | Idealista | `/v1/idealista/map-search` | Madrid province, homes for sale | `price`, `priceByArea` | `size` (m²) | `total` 33,943 | | Germany | ImmobilienScout24 | `/v1/immobilienscout24/search` | Berlin, apartments to rent | `price`, `price_formatted` | `size_m2` | `total_results` 11,396 | | Australia | Domain | `/v1/domain-com-au/search` | Pyrmont NSW, buy | `display_price` (text) | Not in search results | `total_results` 85 | Two things stand out. Units differ: square feet in the US, square metres in Spain and Germany, and Rightmove gives size as display text such as "1,285 sq. ft.". And some prices are text, not numbers: Domain's `display_price` is the advertised wording, so parse it carefully or fetch the listing. [Real Estate Listing Data: Fields That Matter for Valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields) covers which fields to keep and how to normalise them. ## How do you get US listings from Zillow? Call the [Zillow API](https://perceptlayer.com/apis/zillow)'s search endpoint with an area. It takes a location as coordinates and a radius, a bounding box, a polygon or region IDs, plus filters for price, beds, baths, size, year built and status, and returns up to a page of listings with Zillow's own estimate attached. The recorded call searched 5 miles around central Seattle: ```bash curl "https://api.perceptlayer.com/v1/zillow/search?latitude=47.6062&longitude=-122.3321&radius_mi=5&listing_category=category1&page_size=20" \ -H "X-API-Key: $API_KEY" ``` Each listing carries `zpid`, `address`, `bedrooms`, `bathrooms`, `livingArea`, `yearBuilt`, `propertyType`, `price.value`, `price.pricePerSquareFoot` and Zillow's own `estimates.zestimate`. The first recorded listing was a 4-bed, 7,870 sq ft house at `price.value` 14,000,000 with a `zestimate` of 13,068,300. The response's `paging_note` says `page * page_size` must not exceed 1,000. [How to Get Zillow Listings as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) covers the parameters. ## How do you search US homes on Redfin? The [Redfin API](https://perceptlayer.com/apis/redfin)'s search works by region rather than coordinates: `GET /v1/redfin/locations` turns a place name into a `region_id` and `region_type`, and the search takes those with a `market`. Optional filters include price, beds, baths, property types, status and `sold_within_days`, so the same call covers active and recently sold homes. ```bash curl "https://api.perceptlayer.com/v1/redfin/search?region_id=16163®ion_type=6&market=seattle&sold_within_days=30" \ -H "X-API-Key: $API_KEY" ``` Each home has `property_id`, `listing_id`, `address`, `zip`, `price`, `beds`, `baths`, `sqft`, `year_built`, `status`, coordinates and an `mls_number`. The recording returned `count` 350. Redfin's separate `valuation` endpoint takes a `property_id`; [Redfin API: Search Homes, Then Property and Valuation](https://perceptlayer.com/blog/redfin-api-property-valuation) walks through it. ## How do you get UK listings from Rightmove? The [Rightmove API](https://perceptlayer.com/apis/rightmove)'s search takes a `channel` (to buy or rent) and a `location`, with optional radius, price and bedroom filters, property type and sort. Prices come back as a number with a currency code, and sizes as display text. The recorded call searched London for sale: ```bash curl "https://api.perceptlayer.com/v1/rightmove/search?location=London&channel=BUY" \ -H "X-API-Key: $API_KEY" ``` Each property has `id`, `bedrooms`, `bathrooms`, `displayAddress`, `propertySubType`, `displaySize`, `price.amount` with `currencyCode` `GBP`, coordinates, `firstVisibleDate` and `addedOrReduced`. The recording reported `count` 60,081 and a `record_limit` note: Rightmove caps a single search sweep at roughly 1,000 records over 41 pages, so narrow the location to go deeper. [Rightmove API: UK Property Data](https://perceptlayer.com/blog/rightmove-api-property-data) has the details, and UK sold prices have their own `sold-property` endpoint. ## How do you get Spanish listings from Idealista? The [Idealista API](https://perceptlayer.com/apis/idealista)'s endpoints all take a `country` code ( `es`, `it`, `pt` or `fr`), so the same calls cover more than Spain. Map search needs `country`, `operation`, `property_type` and `mode`, plus a `location_id` from the `locations` endpoint, and returns price per square metre and price drops alongside the basics: ```bash curl "https://api.perceptlayer.com/v1/idealista/map-search?country=es&mode=listings&property_type=homes&operation=sale&location_id=0-EU-ES-28" \ -H "X-API-Key: $API_KEY" ``` Listings carry `propertyCode`, `price`, `priceByArea`, `size`, `rooms`, `bathrooms`, `propertyType`, `province`, `municipality`, `district`, coordinates and, when a price has fallen, `priceDropValue` and `priceDropPercentage`. The Madrid recording reported `total` 33,943; its first listing was a 480 m² chalet at `price` 2,200,000 with an 8% price drop. [Idealista API: Spanish Property Listings as JSON](https://perceptlayer.com/blog/idealista-api-property-listings) covers the filters. ## How do you get German listings from ImmobilienScout24? The [ImmobilienScout24 API](https://perceptlayer.com/apis/immobilienscout24)'s search takes a `location` and an optional `type`, such as apartments to rent, with price, room and size ranges and paging. Results are compact: one flat object per listing with the price, rooms, size in square metres and coordinates. The recorded call searched Berlin apartments to rent: ```bash curl "https://api.perceptlayer.com/v1/immobilienscout24/search?location=Berlin&type=apartment-rent" \ -H "X-API-Key: $API_KEY" ``` Results have `id`, `title`, `price`, `price_formatted`, `rooms`, `size_m2`, `address`, `lat`, `lon`, `url`, `is_private` and a relative `published` time such as "vor 16 Tagen". The recording returned `total_results` 11,396 over `total_pages` 570; the first result was a 2-room, 52 m² flat at `price` 362. A `price-insights` endpoint takes a `location` for area-level figures. See [ImmobilienScout24 API: German Property Listings as JSON](https://perceptlayer.com/blog/immobilienscout24-api-listings). ## How do you get Australian listings from Domain? The [Domain API](https://perceptlayer.com/apis/domain-com-au)'s search takes a `mode` (such as `buy`) and a location as `suburb`, `suburbs[]`, `region`, `state` or `postcode`, with filters for property type, bedrooms, bathrooms, car spaces, price and land area. Prices come back as the advertised text, not a number: ```bash curl "https://api.perceptlayer.com/v1/domain-com-au/search?mode=buy&suburb=Pyrmont&state=NSW&page=1" \ -H "X-API-Key: $API_KEY" ``` Listings have `listing_id`, `listing_slug`, `display_address`, `display_price`, `bedrooms`, `bathrooms`, `carspaces` and `property_type`. The Pyrmont recording returned `total_results` 85 over 9 pages of 10. Domain also has `suburb-insights` and `auction-results` endpoints; [Domain.com.au API: Australian Listings and Suburb Data](https://perceptlayer.com/blog/domain-com-au-api-listings) covers them. ## How do you choose and what does it cost? Choose by country first, then by the fields your model needs: Zillow if you want Zillow's estimate, Redfin for MLS numbers and valuations, Idealista for price drops, Rightmove or ImmobilienScout24 for the UK and German markets, Domain for Australian suburbs and auctions. In the US, query both portals and deduplicate by address; [Deduplicate Listings Across Sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) shows how. Other markets in the catalogue include the UK's [Zoopla](https://perceptlayer.com/blog/zoopla-api-property-listings-sold-prices) and Australia's [realestate.com.au](https://perceptlayer.com/blog/realestate-com-au-api-listings). Every search page is one call at 1 credit. A weekly scan of 50 areas in each of the five countries, one page per area, is 50 × 5 × 4 = 1,000 calls a month. The 100 free credits on signup cover the first 100 of those calls, and the Starter pack's 10,000 covers 10 months of the scan. Ten pages per area daily in 20 areas is 10 × 20 × 30 = 6,000 credits, inside the Starter pack's 10,000. Failed calls cost nothing. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Keep in mind what listing data measures: asking prices for homes on the market now. Official indices measure completed sales instead; the UK House Price Index uses completed sales at the end of conveyancing ( [GOV.UK](https://www.gov.uk/government/publications/about-the-uk-house-price-index/about-the-uk-house-price-index), 2026), and the FHFA index in the US is a repeat-sales index built from mortgage transactions ( [FHFA](https://www.fhfa.gov/data/hpi), 2026). Use listings for what's available and how it's priced today, and the indices to check the trend. To compare portals on your own market, run a search in the playground on any API page, or [get a free API key](https://perceptlayer.com/signup). For an agent that queries them for you, see [Build an AI Property Research Agent](https://perceptlayer.com/blog/ai-property-research-agent). ## APIs in this post - [Zillow **1 credit per call** · 20 endpoints](https://perceptlayer.com/apis/zillow) - [Redfin **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/redfin) - [Rightmove **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/rightmove) - [Idealista **1 credit per call** · 22 endpoints](https://perceptlayer.com/apis/idealista) - [ImmobilienScout24 **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/immobilienscout24) - [Domain.com.au **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/domain-com-au) ## Frequently asked questions ### Is there one real estate API for every country? No single portal covers every country, so a global real estate API means one endpoint per national portal behind one key. Here, Zillow and Redfin cover the US, Rightmove the UK, Idealista Spain and three more countries by `country` code, ImmobilienScout24 Germany and Domain Australia. Field names and units differ, so normalise before you compare markets. ### How do I get every listing in a city? Split the city into smaller areas and page through each. Some portals cap a single search: the Rightmove recording notes about 1,000 records over 41 pages, and Zillow's says `page * page_size` must not exceed 1,000. Narrower locations, price bands or bedroom bands keep each search under the cap. Each page costs 1 credit. ### Do these APIs include sold prices? Some do. Redfin's search takes `sold_within_days`, Rightmove has a `sold-property` endpoint, Domain's search takes `mode=sold` and `sold_date_range` and it has `auction-results`, and Zillow's search takes listing status filters. Coverage of sold data varies by market and portal, so check the relevant API page before you plan a sold-price model. ### Can I use real estate listing data commercially? That depends on the market, the data and your use. Listing descriptions and photos are the advertisers' content, and agents' names are personal data. Data here is collected from publicly available sources and returned as found; store the fields you need for analysis, and get legal advice before republishing listings. ### What happens if a search fails? You get an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, and you aren't charged: the response carries `X-Credits-Used: 0`. `invalid_parameters` (422) usually means a missing required parameter, such as Redfin's `market`. The [errors docs](https://docs.perceptlayer.com/errors) list every code. real estate api property data listings international housing ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Sept 2026 Perceptlayer 6 min read ## [Realestate.com.au API: Australian Listings as JSON](https://perceptlayer.com/blog/realestate-com-au-api-listings) Search realestate.com.au by location and channel (buy, rent, sold), then open each listing by URL. Parameters, a recorded Sydney response and the cost. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 9 min read ## [Zillow Listings API: Get Property Data as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) One GET to /v1/zillow/search returns listings near a point as JSON with price, beds, baths and address. Parameters, a real response, 1 credit per call. --- title: "Crexi API: Commercial Real Estate Listings as JSON" description: "Crexi API guide: search commercial property for sale or lease by state, price, cap rate or map area, then fetch listing and auction details at 1 credit." url: https://perceptlayer.com/blog/crexi-api-commercial-real-estate --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Crexi API: Commercial Real Estate Listings as JSON 18 Oct 2026 Perceptlayer 6 min read The Crexi API most people look for is a way to read Crexi's commercial real estate listings as data. Crexi's own Listing API works the other way: it sends listings into Crexi from MLSs, brokerages and data providers under an agreement. To read listings, six endpoints cover Crexi: `search` for properties for sale, `lease-search` for space for lease, and `listing`, `auction`, `lease-listing` and `lease-spaces` for details by ID. Each costs 1 credit per successful call. This guide covers the parameters and what it costs to track a metro's inventory weekly. ## Key takeaways - Crexi's official Listing API is for partners sending listings to Crexi; Crexi's help centre says partners sign agreements and receive an API token before using it. - `GET /v1/crexi/search` filters sale listings by `state`, `property_type`, `trading_status`, `min_price`/ `max_price`, `min_cap_rate` and a map box ( `min_latitude` to `max_longitude`), with `sort`, `order`, `page` and `per_page`. - `GET /v1/crexi/lease-search` filters lease listings by `location`, `property_type` and `min_rate`/ `max_rate`, sortable by `rate`, `building_sqft` or date. - Details come from four ID endpoints: `listing`, `auction`, `lease-listing` and `lease-spaces`, each taking an integer `id`. ## Does Crexi have an official API? Crexi has a Listing API, but it's for putting listings into Crexi, not reading them out. Crexi's help centre describes it as the way MLSs, large brokerages and data providers send their listings to the marketplace, and says partners contact Crexi, sign agreements and receive an API token before they use the documentation ( [Crexi help centre: Listing API](https://learn.crexi.com/en/articles/6654150-listing-api-overview), 2026). Individual brokers posting their own listings don't need it. If you run an MLS or a brokerage that wants its listings on Crexi, that's your route, and Crexi has been signing such partnerships; in 2026 Florida's Stellar MLS began sending listings to Crexi automatically ( [RISMedia](https://www.rismedia.com/2026/08/11/stellar-mls-partners-crexi-expand-commercial-listing-exposure-nationwide/), 2026). If you want to analyse what's listed on Crexi, whether to watch a market, source deals or feed a model, read on. Data from the endpoints below is collected from publicly available sources and returned as found at the time of the call. ## How do you search properties for sale? Call `search` with the filters you need; every parameter is optional. Filter by `state`, by `property_type`, by `trading_status`, by price range, by a minimum cap rate, or by a map box of latitudes and longitudes, and sort by `rank`, `price`, `activated_on`, `updated_on` or `time_remaining` (for auctions). This request is for sale listings in Texas with a cap rate of at least 7, newest first: ```bash curl "https://api.perceptlayer.com/v1/crexi/search?state=TX&min_cap_rate=7&sort=activated_on&order=desc&page=1&per_page=20" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Notes | | --- | --- | --- | | `state` | string | Up to 200 characters | | `property_type` | string | Up to 300 characters | | `trading_status` | string | Up to 200 characters | | `min_price`, `max_price` | number | Asking price range | | `min_cap_rate` | number | Minimum cap rate | | `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude` | number | A map box | | `include_unpriced` | boolean | Include listings without an asking price | | `sort` | string | `rank`, `price`, `activated_on`, `updated_on`, `time_remaining` | | `order` | string | `asc` or `desc` | | `page`, `per_page` | integer | Paging | Nothing more is documented about the string filters, so check in the playground how `state` is written (a code such as `TX` or a name) and which values `property_type` and `trading_status` accept. We didn't run this request, and we haven't recorded a response from the Crexi endpoints yet, so this post can't show the fields. Run it in the playground on the [Crexi API page](https://perceptlayer.com/apis/crexi) first. A map box is often more useful than a state for a metro: draw the box around the metro once, then pass its four corners on every run. It catches listings across state lines, as in metros that span two states. ## How do you search space for lease? Call `lease-search`, which has its own filters because lease listings are priced by rate, not by price. It takes a `location` (up to 100 characters), a `property_type`, a rate range with `min_rate` and `max_rate`, and sorting by `rank`, `date_activated`, `date_updated`, `building_sqft` or `rate`. The catalogue's example request asks for three results: ```bash curl "https://api.perceptlayer.com/v1/crexi/lease-search?per_page=3" \ -H "X-API-Key: $API_KEY" ``` A filtered version, for space in one city sorted by rate: ```bash curl "https://api.perceptlayer.com/v1/crexi/lease-search?location=Austin%2C+TX&sort=rate&order=asc&per_page=20" \ -H "X-API-Key: $API_KEY" ``` Commercial lease rates can be quoted in different units, such as per square foot per year or per month, so check in the playground which unit a result's rate is in before you compare `min_rate` and `max_rate` across markets. Send the key in the `X-API-Key` header; keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ## How do you get listing, auction and lease-space details? Use the four detail endpoints with an ID from a search result. Each takes one required integer `id` and returns one record, so the pattern is search to find listings, then details only for the ones you'll analyse. Sale listings and auctions have their own endpoints, and a lease listing's individual spaces come from a separate call: | Endpoint | Use it for | | --- | --- | | `GET /v1/crexi/listing` | A sale listing's details | | `GET /v1/crexi/auction` | A listing sold by auction | | `GET /v1/crexi/lease-listing` | A lease listing's details | | `GET /v1/crexi/lease-spaces` | The individual spaces available in a lease listing | ```bash curl "https://api.perceptlayer.com/v1/crexi/listing?id=

" \ -H "X-API-Key: $API_KEY" ``` Replace the placeholder with an ID from `search` before you run it. Search results are usually enough for counts and price trends; fetch details only for the listings you'll look at closely, because each detail call is another credit. Store what you need about the property. If a response includes broker names or contact details, treat them as business contacts under the marketing and privacy rules where you are. ## What does tracking a metro's inventory weekly cost? Each successful call costs 1 credit, and a failed call costs nothing, returning `X-Credits-Used: 0`. Tracking is search pages plus detail calls for new listings. Say a metro has 600 active sale listings and 400 lease listings and you fetch 20 per page: that's 30 + 20 = 50 search calls per weekly snapshot. | Job | Calls a month | Credits | | --- | --- | --- | | One metro, sale and lease, weekly snapshot | 50 × 4 | 200 | | Details for about 60 new listings a week | 60 × 4 | 240 | | 10 metros, both of the above | 10 × 440 | 4,400, inside the Starter pack's 10,000 | | 10 metros, daily snapshots instead of weekly | 10 × (50 × 30 + 240) | 17,400, inside the Build pack's 50,000 | The 100 free credits every account gets once, after verifying an email address, cover two weekly snapshots of one metro (100 search calls). After that, one metro at 440 credits a month needs a pack: a year of it, 5,280 credits, fits in the Starter pack's 10,000. These figures are illustrative: check your metro's real listing counts in the playground, and the largest `per_page` it accepts, before you budget. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and [Incremental API Data Pulls](https://perceptlayer.com/blog/incremental-api-data-pulls) for fetching only what changed with `sort=updated_on`. Store each listing by its ID with the date you saw it, so a weekly run can tell new, changed and removed listings apart. To combine Crexi with residential sources, see [Real Estate API: Property Listing Data by Country](https://perceptlayer.com/blog/real-estate-data-apis-by-country); to start, run `search` for your state in the playground on the [Crexi API page](https://perceptlayer.com/apis/crexi), or [get a free API key](https://perceptlayer.com/signup). Other property sources are under [Real estate](https://perceptlayer.com/verticals/real-estate). ## APIs in this post - [Crexi **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/crexi) ## Frequently asked questions ### Is there a public Crexi API for reading listings? Crexi's documented Listing API is for partners sending listings into Crexi, after an agreement and an API token. For reading listings as JSON, the endpoints here cover sale search, lease search and details for listings, auctions and lease spaces, at 1 credit per successful call, with no partner agreement. ### Can I filter Crexi listings by cap rate? Yes. `GET /v1/crexi/search` takes `min_cap_rate`, alongside price, state, property type, trading status and a map box. Listings without a stated cap rate may not match a cap-rate filter, so run the search with and without it in the playground to see how many you'd miss. ### How do I find Crexi auctions? Search sale listings with `sort=time_remaining` to bring auctions ending soonest to the top, and filter with `trading_status` if your market uses it. Then fetch each auction's details with `GET /v1/crexi/auction` and its integer `id`, for 1 credit per call. ### How often should I refresh Crexi data? Weekly is enough for most market tracking, and a weekly snapshot keeps costs low. Refresh daily only for deal sourcing where speed matters, and use `sort=updated_on` to fetch recently changed listings first. Data is returned as found at the time of each call. ### What happens if a Crexi call fails? You get an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, and you aren't charged. `invalid_parameters` (422) usually means a wrong type, such as a non-integer `id`; `not_found` (404) means no data for that ID. The [errors docs](https://docs.perceptlayer.com/errors) list every code. crexi commercial real estate cre data lease listings cap rate ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "Web Scraping in JavaScript with Node.js | Perceptlayer" description: "Web scraping in JavaScript with Node 22: fetch and cheerio for static pages, Playwright when a page renders in the browser, or one API call at 1 credit a page." url: https://perceptlayer.com/blog/web-scraping-javascript-node --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Web Scraping in JavaScript with Node.js 18 Oct 2026 Perceptlayer 6 min read Web scraping in JavaScript takes two pieces in Node.js: the built-in `fetch` to download a page and cheerio to query its HTML with CSS selectors, the way you would with jQuery. That covers static pages. When a page builds its content in the browser, `fetch` returns an empty shell, and you need a headless browser such as Playwright, or a scrape endpoint that renders the page for you. This tutorial builds all three for quotes.toscrape.com, a site made for practice, with complete Node 22 code. ## Key takeaways - Node 18 and later ship `fetch`, so a static-page scraper needs one dependency: `cheerio`. `cheerio.load(html)` returns a `$` you query with selectors such as `div.quote span.text`. - Check `robots.txt` (the `robots-parser` package does it), send a `User-Agent` that identifies you, and wait between requests; the script waits 2 seconds. - If the HTML you fetched has none of the elements you see in the browser, the page renders with JavaScript. Use Playwright's `page.content()` after `waitForSelector`, or look for the JSON API the page calls. - `GET /v1/web-scraper/scrape` with `javascript=true` fetches and renders a page in one call for 1 credit; failed calls cost nothing. ## What do you need for web scraping in JavaScript? You need Node.js 18 or later for the built-in `fetch`, plus cheerio to parse HTML. We used Node 22, `cheerio` 1.2.0 and `robots-parser` 3.0.1, and Playwright 1.63 for the rendering step. Install the packages in a new folder: ```bash npm init -y npm install cheerio robots-parser ``` The target is [quotes.toscrape.com](https://quotes.toscrape.com/), a sandbox built for scraping practice and the site Scrapy's own tutorial uses. Each quote sits in a `div.quote` with the text in `span.text`, the author in `small.author` and tags in `div.tags a.tag`; the next page link is in `li.next a` ( [Scrapy tutorial](https://docs.scrapy.org/en/latest/intro/tutorial.html), 2026). It also has a `/js/` version whose quotes are generated by JavaScript, which makes it a good test of the second half of this tutorial. Name your files `.mjs` (or set `"type": "module"` in `package.json`) so `import` and top-level `await` work. ## How do you scrape a static page with fetch and cheerio, step by step? The script below follows the site's pages, checks each URL against `robots.txt`, parses every quote into an object, waits two seconds between pages and writes the result to JSON. It's the whole program; the steps after it explain each part. Save it as `scrape.mjs`: ```javascript import { writeFile } from "node:fs/promises"; import * as cheerio from "cheerio"; import robotsParser from "robots-parser"; const BASE = "https://quotes.toscrape.com/"; const USER_AGENT = "quotes-tutorial/1.0 (you@example.com)"; const DELAY_MS = 2000; const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); async function loadRobots() { const robotsUrl = new URL("/robots.txt", BASE).href; const res = await fetch(robotsUrl, { headers: { "User-Agent": USER_AGENT } }); return robotsParser(robotsUrl, res.ok ? await res.text() : ""); } async function fetchHtml(url) { const res = await fetch(url, { headers: { "User-Agent": USER_AGENT }, signal: AbortSignal.timeout(30_000), }); if (res.status === 404) return null; if (!res.ok) throw new Error(`${res.status} ${res.statusText} for ${url}`); return res.text(); } export function parseQuotes(html, pageUrl) { const $ = cheerio.load(html); const quotes = $("div.quote") .map((_, el) => { const text = $(el).find("span.text").text().trim(); const author = $(el).find("small.author").text().trim(); if (!text || !author) return null; // skip a block whose layout changed const tags = $(el).find("div.tags a.tag").map((_, t) => $(t).text().trim()).get(); return { text, author, tags }; }) .get(); const next = $("li.next a").attr("href"); return { quotes, next: next ? new URL(next, pageUrl).href : null }; } export async function scrape(maxPages = 3) { const robots = await loadRobots(); const all = []; let url = BASE; for (let page = 1; url && page <= maxPages; page++) { if (!robots.isAllowed(url, USER_AGENT)) { console.log(`robots.txt disallows ${url}; stopping`); break; } const html = await fetchHtml(url); if (html === null) break; const { quotes, next } = parseQuotes(html, url); if (quotes.length === 0) { console.log(`page ${page}: no quotes found; the layout changed or the page needs JavaScript`); break; } all.push(...quotes); console.log(`page ${page}: ${quotes.length} quotes`); url = next; await sleep(DELAY_MS); } return all; } if (import.meta.url === `file://${process.argv[1]}`) { const quotes = await scrape(); await writeFile("quotes.json", JSON.stringify(quotes, null, 2)); console.log(`saved ${quotes.length} quotes to quotes.json`); } ``` Run it with `node scrape.mjs`. The site wasn't reachable from the environment we wrote this in, so we tested `parseQuotes()` on HTML with the site's markup and the page loop with a mocked `fetch`. A quote block parsed to `{ text: '“Quote 1a.”', author: 'Author A', tags: [ 'change', 'world' ] }`, a block with no text was skipped, and the loop followed `li.next` across two pages and stopped when the link was gone. Check a few rows against the live site before you rely on it. ### Step 1: check robots.txt once `loadRobots()` downloads `robots.txt` once and `robots.isAllowed()` checks each URL against it for your user agent. The rules are the site's published instructions for automated clients ( [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309), 2022); they aren't permission on their own, so read the site's terms as well. ### Step 2: fetch with a timeout and a real User-Agent `AbortSignal.timeout(30_000)` stops a hung request after 30 seconds, which `fetch` doesn't do by default. A 404 ends the crawl; any other error status throws, because a 403 or 429 means you should stop and look rather than push on. ### Step 3: parse with cheerio `cheerio.load()` parses the HTML; `$("div.quote")` selects every block; `.map(...).get()` turns them into a plain array, and returning `null` from the callback drops a block. `new URL(next, pageUrl)` resolves the relative next-page link. ### Step 4: pace and stop The loop sleeps 2 seconds per page and stops at `maxPages`, at a missing next link or at a page with no quotes. That last check matters: an empty page is how you find out the layout changed. ## What do you do when the page needs JavaScript? First confirm it: if the HTML from `fetch` doesn't contain the text you see in the browser, the page renders its content with JavaScript after loading. On quotes.toscrape.com, `/js/` is that case; the site describes its content as generated by JavaScript ( [toscrape.com](https://toscrape.com/), 2026). You then have three options, from cheapest to heaviest. 1. **Find the data request.** Open the browser's network tab, reload, and look for a JSON response with the data. Calling that URL with `fetch` is faster and steadier than rendering, if the site's terms allow it. 2. **Render with a headless browser.** Playwright runs Chromium, executes the page's scripts and hands you the final HTML, which you parse with the same `parseQuotes()`. 3. **Use a scrape endpoint with rendering.** One HTTP call returns the rendered page; covered in the next section. The Playwright version, as `render.mjs` (install with `npm install playwright` and `npx playwright install chromium`): ```javascript import { chromium } from "playwright"; import { parseQuotes } from "./scrape.mjs"; const url = process.argv[2] ?? "https://quotes.toscrape.com/js/"; const browser = await chromium.launch(); try { const page = await browser.newPage({ userAgent: "quotes-tutorial/1.0 (you@example.com)" }); await page.goto(url, { timeout: 30_000 }); await page.waitForSelector("div.quote", { timeout: 10_000 }); const { quotes } = parseQuotes(await page.content(), url); console.log(`${quotes.length} quotes after rendering`, quotes[0]); } finally { await browser.close(); } ``` We ran it against a local page that inserts a quote with a script 300 ms after load. `parseQuotes()` found 0 quotes in that page's raw HTML and 1 after Playwright rendered it: `{ text: '“Rendered.”', author: 'Author C', tags: [ 'js' ] }`. A browser per page costs far more memory and time than `fetch`, so render only the pages that need it. If a site answers with a CAPTCHA, a challenge page or a block, stop. That's the site saying no to automated access; don't try to get around it with stealth plugins or rotating proxies. Look for an official API or a licensed data source instead. ## How do you get the same page with one API call? The scrape endpoint fetches the page for you, optionally renders its JavaScript, and returns it as `json` or `markdown`. `GET /v1/web-scraper/scrape` takes a required `url` (up to 2048 characters) and optional `javascript`, `include_html` and `response_type`. Each successful call costs 1 credit: ```javascript const endpoint = new URL("https://api.perceptlayer.com/v1/web-scraper/scrape"); endpoint.searchParams.set("url", "https://quotes.toscrape.com/js/"); endpoint.searchParams.set("javascript", "true"); endpoint.searchParams.set("response_type", "markdown"); const res = await fetch(endpoint, { headers: { "X-API-Key": process.env.API_KEY }, signal: AbortSignal.timeout(90_000), }); if (!res.ok) { const { error } = await res.json(); throw new Error(`${res.status} ${error.code}: ${error.message}`); } console.log("credits used:", res.headers.get("X-Credits-Used")); console.log(await res.text()); ``` We didn't run this against the live API, and we haven't recorded a response from this endpoint, so we can't show what it returns. Run it in the playground on the [Web Scraper API page](https://perceptlayer.com/apis/web-scraper) to see the output before you parse it. Errors come back as an HTTP status with `{"error": {"code", "message", "request_id"}}`, and a failed call returns `X-Credits-Used: 0`; the [errors docs](https://docs.perceptlayer.com/errors) list the codes. ### What does each route cost? Your own `fetch` and cheerio scraper costs no credits, only hosting and the time to keep it working. A Playwright scraper costs more hosting, because each page runs a browser. The scrape endpoint costs 1 credit per successful page, rendered or not. | Job | Calls a month | Credits | | --- | --- | --- | | 500 pages weekly | 500 × 4 | 2,000 | | 300 JavaScript pages daily | 300 × 30 | 9,000, within the Starter pack's 10,000 | | 2,000 pages daily | 2,000 × 30 | 60,000, within the Growth pack's 200,000 | Every account gets 100 free credits after verifying an email address; see [pricing](https://perceptlayer.com/pricing) for what credits cost. Calls run at 1 request a second on a free account and at least 5 a second on a paying one; a 429 tells you to wait, and [HTTP 429 Too Many Requests](https://perceptlayer.com/blog/http-429-too-many-requests) shows how to handle it. Pick by the page: `fetch` and cheerio for static HTML you're allowed to collect, Playwright when you need to drive a page yourself, and the endpoint when you'd rather not run browsers. For the Python version of this tutorial, see [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide); for turning pages into model input, see [Website to Markdown](https://perceptlayer.com/blog/website-to-markdown-for-llms). To try the endpoint, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Web Scraper **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/web-scraper) ## Frequently asked questions ### Is JavaScript or Python better for web scraping? Neither is better at the core job: both fetch HTML and query it with selectors. Node is a natural fit if your stack is JavaScript or you drive browsers with Playwright or Puppeteer; Python has Scrapy, a full crawling framework with scheduling and pipelines built in. Pick the language your team maintains, since maintenance is most of a scraper's cost. ### What is cheerio? Cheerio is a Node.js library that parses HTML and lets you query and change it with a jQuery-like API, such as `$("div.quote").find("span.text").text()`. It doesn't run JavaScript or load images and styles, which is why it's fast and why it can't see content a page renders in the browser. ### Do I need Puppeteer or Playwright for web scraping? Only for pages that render their content with JavaScript, or that need clicks and scrolling to reveal it. For static HTML, `fetch` and cheerio are faster and lighter. Check first by searching the fetched HTML for text you can see in the browser; if it's there, you don't need a browser. ### How do I avoid getting blocked when scraping? Scrape only what the site allows: follow `robots.txt` and the terms, identify yourself in the `User-Agent`, keep to one request at a time with a delay, and back off on 429 or 503. If you're blocked anyway, the site doesn't want automated access; stop rather than work around it, and look for an API. ### How much does the scrape endpoint cost per page? One credit per successful call, whether or not you set `javascript=true`, and nothing for a failed call. Every account gets 100 free credits after verifying an email address, and purchased credits last 12 months. The [credits docs](https://docs.perceptlayer.com/credits) explain balances and the `X-Credits-Remaining` header. web scraping javascript node.js cheerio playwright ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 31 Oct 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Extract Data From a Website: Pages, Sites and APIs](https://perceptlayer.com/blog/extract-data-from-website) Three ways to extract data from a website: one page as markdown or JSON, every URL on a site with map, or structured records. 1 credit per call. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 18 Oct 2026 Perceptlayer 7 min read ## [Web Scraping with Python: Requests, Parsing and When to Stop](https://perceptlayer.com/blog/web-scraping-python-guide) A web scraping Python tutorial: requests and BeautifulSoup for a practice site, robots.txt checks, a 2-second delay, CSV output, and when an API costs less. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 8 Aug 2026 Updated 10 Nov 2026 Perceptlayer 11 min read ## [Scraper or API: What Maintaining a Scraper Really Involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost) What a scraper costs to keep running: selector fixes, proxies, retries and monitoring, set against an API at 1 credit per successful call. --- title: "Web Scraping with Python: Requests, Parsing and When to Stop" description: "A web scraping Python tutorial: requests and BeautifulSoup for a practice site, robots.txt checks, a 2-second delay, CSV output, and when an API costs less." url: https://perceptlayer.com/blog/web-scraping-python-guide --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Web Scraping with Python: Requests, Parsing and When to Stop 18 Oct 2026 Perceptlayer 7 min read Web scraping with Python takes two libraries: `requests` to download a page and BeautifulSoup to pull values out of its HTML with CSS selectors. Add a `robots.txt` check, a delay between requests and a CSV writer, and you have a working scraper in about 80 lines. This tutorial builds one for books.toscrape.com, a site made for scraping practice, then covers the point where a scraper costs more to maintain than an API call. ## Key takeaways - `requests.get()` fetches the HTML; `BeautifulSoup(html, "html.parser").select("article.product_pod")` finds each item; `select_one()` and `get_text(strip=True)` read its fields. - Check `robots.txt` with Python's built-in `urllib.robotparser`, send an honest `User-Agent`, and wait between requests. The script below waits 2 seconds per page. - Write the parser so a changed layout skips an item instead of crashing, and log how many items each page returned so you notice when it drops to zero. - Plain Python is enough for static pages on a few sites. Stop when pages need a browser to render, when a site blocks you, or when you're maintaining parsers for many sites. - A page fetched through `/v1/web-scraper/scrape` or a structured endpoint such as `/v1/google-search/search` costs 1 credit, and failed calls cost nothing. ## What do you need for web scraping in Python? You need Python 3, the `requests` library for HTTP and BeautifulSoup for parsing, and nothing else for a static site. Python's standard library covers the rest: `urllib.robotparser` for robots rules, `csv` for output and `time` for pacing. You don't need a browser, a proxy service or a framework to start. Install the two packages with pip: ```bash pip install requests beautifulsoup4 ``` We used Python 3 with `requests` 2.34.2 and `beautifulsoup4` 4.15.0. BeautifulSoup's built-in `html.parser` is enough here; `lxml` is faster on large pages if you install it. The target is [books.toscrape.com](https://books.toscrape.com/), a sandbox bookshop built for people learning to scrape. Each book on a listing page sits in an `
` with the title in an `h3` link, the price in `p.price_color`, a `p.star-rating` whose second class is the rating word, and an availability line. Practising on a sandbox keeps you clear of a real shop's terms while you learn. ## How do you build the scraper, step by step? The scraper below fetches listing pages one at a time, checks each URL against `robots.txt`, parses every book into a dictionary, waits between pages and saves the result to CSV. It's the whole program, about 80 lines, and the five steps after it explain each part and the choices behind it. ```python import csv import time from functools import lru_cache from urllib.parse import urljoin from urllib.robotparser import RobotFileParser import requests from bs4 import BeautifulSoup BASE = "https://books.toscrape.com/" USER_AGENT = "books-tutorial/1.0 (you@example.com)" DELAY_SECONDS = 2 RATINGS = {"One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5} session = requests.Session() session.headers["User-Agent"] = USER_AGENT @lru_cache(maxsize=1) def robots(): parser = RobotFileParser(urljoin(BASE, "/robots.txt")) parser.read() return parser def allowed(url): return robots().can_fetch(USER_AGENT, url) def fetch(url): resp = session.get(url, timeout=30) if resp.status_code == 404: return None resp.raise_for_status() resp.encoding = "utf-8" return resp.text def parse_books(html, page_url): soup = BeautifulSoup(html, "html.parser") books = [] for card in soup.select("article.product_pod"): link = card.select_one("h3 a") price = card.select_one("p.price_color") rating = card.select_one("p.star-rating") stock = card.select_one("p.availability") if not (link and price): continue # skip a card whose layout changed, rather than crash rating_word = next((c for c in rating["class"] if c in RATINGS), None) if rating else None books.append({ "title": link.get("title") or link.get_text(strip=True), "price": float(price.get_text(strip=True).lstrip("£")), "rating": RATINGS.get(rating_word), "in_stock": bool(stock and "In stock" in stock.get_text()), "url": urljoin(page_url, link["href"]), }) return books def scrape(max_pages=3): rows = [] for n in range(1, max_pages + 1): url = urljoin(BASE, f"catalogue/page-{n}.html") if not allowed(url): print(f"robots.txt disallows {url}; stopping") break html = fetch(url) if html is None: break # past the last page books = parse_books(html, url) if not books: break rows.extend(books) print(f"page {n}: {len(books)} books") time.sleep(DELAY_SECONDS) return rows if __name__ == "__main__": rows = scrape() with open("books.csv", "w", newline="", encoding="utf-8") as f: writer = csv.DictWriter(f, fieldnames=["title", "price", "rating", "in_stock", "url"]) writer.writeheader() writer.writerows(rows) print(f"saved {len(rows)} books to books.csv") ``` books.toscrape.com wasn't reachable from the environment we wrote this in, so we couldn't run the script against the live site. We tested `parse_books()` on an HTML snippet with the site's markup (two book cards and one broken card) and the pagination loop with a mocked session. On the snippet, the first card parsed to: ```python {'title': 'A Light in the Attic', 'price': 51.77, 'rating': 3, 'in_stock': True, 'url': 'https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html'} ``` and the broken card was skipped. Run the script yourself and compare a few rows with the pages before you build on it. ### Step 1: check robots.txt before you fetch `robots()` downloads the site's `robots.txt` once and `allowed()` asks it whether your user agent may fetch a URL. The rules are the site's published instructions for automated clients ( [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309), 2022). The RFC is explicit that they aren't access authorization, so also read the site's terms of use; a scraper that obeys `robots.txt` can still break a site's terms. ### Step 2: fetch politely The session sends one `User-Agent` that names your scraper and a contact address, so the site's operators can tell who you are. `timeout=30` stops a hung connection from freezing the job. A 404 returns `None`, which the loop treats as the end of the catalogue; any other error status raises, because a 403 or 503 means you should stop and look, not push on. ### Step 3: parse with CSS selectors `soup.select("article.product_pod")` returns every book card; inside each, `select_one()` finds one element or returns `None`. The `title` attribute holds the full title where the link text is shortened. The rating lives in a class name, so the code picks the class that matches a rating word. Prices arrive as text like `£51.77` and become floats. ### Step 4: paginate with a delay Listing pages follow the pattern `catalogue/page-N.html`. The loop walks them in order, stops at a 404 or an empty page, and sleeps `DELAY_SECONDS` between requests. Two seconds is a cautious default for a small site; if `robots.txt` gives a `Crawl-delay`, `robots().crawl_delay(USER_AGENT)` returns it, and you should use the longer of the two. ### Step 5: save and check the output `csv.DictWriter` writes one row per book. The printed count per page is your monitoring: if a page that used to give 20 rows gives 0, the layout changed. Scrapers fail quietly, so log those counts somewhere you'll see them. To load the rows into a database instead, [Web Data to a Warehouse](https://perceptlayer.com/blog/load-web-data-json-into-postgres) covers Postgres. ## When should you stop scraping and use something else? Stop when keeping the scraper working costs more than the data is worth to you. A scraper for one static site, run weekly, is cheap. The cost grows with every site, every layout change and every page that needs a browser. These are the signals: 1. **The page needs JavaScript.** If `requests` returns HTML without the data, the page builds it in the browser. You now need a headless browser such as Playwright, which is slower and heavier to run. 2. **The site blocks you.** A CAPTCHA, a 403 or a challenge page means the site doesn't want automated access. Don't try to get around it with rotating proxies or CAPTCHA solvers. Look for an official API or a licensed data source, or leave it. 3. **There's an official API.** If the site offers an API with the data you need, use it: it's stable, documented and allowed. 4. **You maintain many parsers.** Each site breaks on its own schedule. Ten sites means ten parsers to watch. 5. **You need search results or listings from large sites.** These change layout often and limit automated access. A structured endpoint returns named fields instead. [Scraper or API: What Maintaining a Scraper Really Involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost) puts numbers on that maintenance. ## What does the same job look like with an API call? An API call replaces the fetching and the parsing. For a page with no structured endpoint, `GET /v1/web-scraper/scrape` takes a `url` (up to 2048 characters) and returns the page as `json` or `markdown` ( `response_type`), with an optional `javascript` parameter for pages that render in the browser. For sites in the catalogue, a structured endpoint returns named fields. Both cost 1 credit per successful call. ```python import os import requests API = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} resp = requests.get( f"{API}/v1/google-search/search", params={"query": "best restaurants in Berlin", "hl": "en", "safe": "off"}, headers=HEADERS, timeout=60, ) resp.raise_for_status() for result in resp.json()["organic_results"]: print(result["position"], result["title"], result["link"]) print("credits used:", resp.headers.get("X-Credits-Used")) ``` We didn't run this against the live API. This is the recorded response to that request, trimmed: ```json { "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "displayed_link": "https://andershusa.com › best-restaurants-berlin-german...", "source": "Anders & Kaitlin", … }, { "position": 2, "title": "Restaurants - Berlin", "link": "https://guide.michelin.com/us/en/berlin-region/berlin/restaurants", … } ], "related_searches": [ { "query": "Best restaurants in Berlin for tourists", … } ], … } ``` There's no selector to maintain: the loop reads `organic_results[].title` and `link`. The [Google Search API page](https://perceptlayer.com/apis/google-search) lists its seven endpoints, and the [Web Scraper API page](https://perceptlayer.com/apis/web-scraper) has the scrape endpoint. ### What does it cost compared with your own scraper? Your own scraper costs no credits but costs your time and its hosting. An API call costs 1 credit, and a failed call costs nothing and returns `X-Credits-Used: 0`. A weekly job of 500 pages is 500 × 4 = 2,000 credits a month; every account gets 100 free credits once, after verifying an email address, enough for a 100-page test, and the Starter pack holds 10,000, or 5 months of that job. A daily job of 2,000 pages is 2,000 × 30 = 60,000 credits a month, within the Growth pack's 200,000. See [pricing](https://perceptlayer.com/pricing) for what credits cost. The API has limits too: 1 request a second on a free account and at least 5 a second on a paying one. If you exceed them you get a 429 with `Retry-After`; [HTTP 429 Too Many Requests](https://perceptlayer.com/blog/http-429-too-many-requests) shows how to handle it. To compare on your own target, run the scrape endpoint in the playground on the [Web Scraper API page](https://perceptlayer.com/apis/web-scraper) with a URL you'd otherwise parse, or [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Web Scraper **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/web-scraper) - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Is web scraping with Python legal? It depends on the site, the data and where you are, not on the language. Public pages are generally lower risk than pages behind a login, and personal data brings privacy law into play. Read the site's terms, respect `robots.txt`, don't collect personal data without a lawful basis, and don't get around blocks. For anything commercial, ask a lawyer. ### Which is better for scraping, BeautifulSoup or Scrapy? BeautifulSoup is a parser; Scrapy is a crawling framework with scheduling, retries, throttling and pipelines built in. For one site and a few hundred pages, `requests` and BeautifulSoup are simpler. For many pages and sites, Scrapy saves you writing the plumbing yourself. Neither renders JavaScript on its own. ### Why does my scraper return empty results? Usually the data isn't in the HTML you downloaded: the page loads it with JavaScript after the first response. Print `resp.text` and search it for a value you can see in the browser. If it isn't there, look for the JSON request the page makes in your browser's network tab, use a headless browser, or call the scrape endpoint with `javascript` set. ### How fast can I scrape a website? As slowly as the job allows. Follow any `Crawl-delay` in `robots.txt`, keep to one request at a time on small sites, and back off at the first 429 or 503. A 2-second delay is a cautious default for a small site. Scraping faster than a site can serve hurts its other visitors and gets you blocked. ### How much does scraping a page through the API cost? One credit per successful call, for the scrape endpoint and for nearly every structured endpoint. Failed calls cost nothing. Every account gets 100 free credits once, after verifying an email address, and purchased credits last 12 months. The [credits docs](https://docs.perceptlayer.com/credits) explain how balances work. web scraping python beautifulsoup requests robots.txt ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 9 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Handle Web Data API Errors in Python: 4xx, 5xx and Timeouts](https://perceptlayer.com/blog/handle-web-data-api-errors-python) Map the API's error codes to retry, fix or stop in Python: 429 and 503 honour Retry-After, 4xx stops, and failed calls cost 0 credits. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 31 Oct 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Extract Data From a Website: Pages, Sites and APIs](https://perceptlayer.com/blog/extract-data-from-website) Three ways to extract data from a website: one page as markdown or JSON, every URL on a site with map, or structured records. 1 credit per call. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. --- title: "Google Maps Scraper or Places Data API: What You Get" description: "Compare building a Google Maps scraper with the official Places API and place endpoints at 1 credit a call: fields, upkeep, terms and a verdict per use case." url: https://perceptlayer.com/blog/google-maps-scraper-vs-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Maps Scraper or Places Data API: What You Get 15 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read A Google Maps scraper is a program that drives a browser through Google Maps, scrolls the results panel and reads business names, ratings, addresses and reviews off the page. It works until the page changes, and Google's terms restrict automated collection. You have two other routes: Google's own Places API, which is official but limits what you may store, and place endpoints that return the same business data as JSON at 1 credit a call. This post compares the three and gives a verdict per use case. ## Key takeaways - A do-it-yourself Google Maps scraper needs a headless browser, because the results load with JavaScript as you scroll, and its selectors break whenever the page layout changes. - Google's Places API is the official route. Google's Maps Platform terms bar customers from scraping, exporting or bulk-downloading Maps content for use outside its services, so it suits apps that show places, not datasets. - `GET /v1/google-maps/simple-search` takes a `query` and returns places with `name`, `rating`, `review_count`, `full_address`, `phone_numbers`, coordinates and a `business_id`, for 1 credit. - `GET /v1/google-maps/reviews` takes that `business_id` and returns reviews with `rating`, `timestamp` and `review_text`, plus a `nextPage` token, also 1 credit per call. - Collect business data, not people: leave reviewers' names and profile links out of anything you store. ## What does building a Google Maps scraper involve? A Google Maps scraper is a browser automation script, not a simple HTTP request. Maps loads its results in a side panel with JavaScript and adds more as you scroll, so plain `requests` plus an HTML parser gets almost nothing. You need a headless browser such as Playwright or Selenium, a script that searches, scrolls, clicks each place and reads the details panel, and code to turn the page's text into fields. The work doesn't stop at the first run. The panel's markup uses generated class names that change without notice, so a scraper that worked last month can return empty rows today. Running a browser per job takes memory and time, which caps how many places you can collect an hour. And large sites limit automated traffic, so a scraper that runs at any volume starts seeing blocks and challenge pages. When that happens, stop: getting around a site's protections with rotating proxies or CAPTCHA solvers isn't a fix we'd recommend. Then there are the terms. Google's Maps Platform terms define Google Maps Content broadly, places data and business listings included, and bar customers from extracting, exporting or scraping it for use outside Google's services ( [Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms), 2026). That clause binds the official API's customers; Google's consumer terms also govern the Maps website itself. Read both before you build anything that collects Maps data at scale. For what keeping any scraper alive costs over time, see [Scraper or API: What Maintaining a Scraper Really Involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost). ## What does Google's official Places API give you? Google's Places API is the supported way to search places and fetch their details, and for an app that shows places to its users it's the right first choice. You get stable, documented responses and Google's own field definitions. Billing is per request by SKU, and since 1 March 2025 each Core Services SKU has a free monthly usage threshold instead of the old monthly credit: 10,000 billable events for Essentials SKUs, 5,000 for Pro and 1,000 for Enterprise ( [Google Maps Platform](https://developers.google.com/maps/billing-and-pricing/march-2025), 2025). The limits are about what you do with the data. The same terms that bar scraping also restrict caching and bar creating datasets based on Maps content. So the official API fits "show the user nearby restaurants on a map", and it doesn't fit "build a spreadsheet of every dentist in Texas with their ratings". If your job is the first kind, use it. [Google Places API Alternative](https://perceptlayer.com/blog/google-maps-places-api-alternative) goes through the official API's fields and pricing in more detail. ## What do the place endpoints return? The place endpoints return Google Maps business data as JSON, one call per search page or per place. The Google Maps API has 12 endpoints, all `GET`: two searches, autocomplete, business details, photos, photo metadata, posts, popular times, reviews, a single review, a contributor's reviews and directions. Each costs 1 credit per successful call, except `reviews`, which costs 1 per page fetched. A failed call costs nothing and returns `X-Credits-Used: 0`. The usual path is a search, then details or reviews for the places you keep: ```bash curl "https://api.perceptlayer.com/v1/google-maps/simple-search?query=restaurants+in+new+york" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed to the first place: ```json { "items": [ { "name": "Altair Restaurant NYC", "review_count": 1225, "rating": 4.8, "website": "https://www.altairnyc.com/", "domain": "altairnyc.com", "latitude": 40.7556565, "longitude": -73.9936282, "business_id": "0x89c2591598891521:0x4ebcde18610e64", "subtypes": [ "New American restaurant", "Restaurant" ], "full_address": "351 W 38th St, New York, NY 10018, United States", "timezone": "America/New_York", "phone_numbers": [ "+1 929-561-6131" ], "place_id": "ChIJIRWJmBVZwokRZA5hGN68TgA=", "city": "New York", "zip_code": "10018", "state": "New York", "country_code": "US", … }, … ], "pagination": { "current_page": 0, "total_results": 173, "has_more": false } } ``` Each place carries both a `business_id` and Google's `place_id`, so you can join this data to anything keyed on either. Pass `business_id` to the reviews endpoint: ```bash curl "https://api.perceptlayer.com/v1/google-maps/reviews?business_id=0x60188b88b7d8f7ab%3A0x2133080e9923eaac" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed, with reviewer names and profile links left out: ```json { "items": [ { "review_source": "Google", "review_id": "Ci9DQUlRQUNvZENodHljRjlvT25kVUxXTmpaamhNWjFac016WTVSMjlqUVRCb1VYYxAB", "rating": 5, "timestamp": 1779471094452, … "review_text": [ "A must do! Easy access via Yamanote line > Shibuya > exit Hachiko exit and walk to the 41 or 42 bus (suica card OK) then four stops to Sugekari Elem Sch > once …" ], "review_language": [ "en" ], "is_google_review": true }, … ], "nextPage": "CjEIARIpCgoAP7_LADY2____EhBrFsVuDgXaYeq0lg4AAAAAGgn92PQCY8g0lvwYACIA" } ``` The reviews endpoint also takes `sort` (1 to 4), `search` to filter by a word, and `page` for the next page token. [Google Maps Reviews API](https://perceptlayer.com/blog/google-maps-reviews-api-parameters) covers its parameters, and [Google Maps Business Data API](https://perceptlayer.com/blog/google-maps-business-data-api) covers search. ## How do the three routes compare? The three routes trade control, permission and upkeep differently, and none wins on every row. A scraper gives you control and no per-call bill, at the price of maintenance and terms risk. The official API gives you permission and stability, at the price of storage limits. Place endpoints give you JSON and stable field names without a browser, at a per-call credit cost. | | DIY scraper | Google Places API | Place endpoints | | --- | --- | --- | --- | | Setup | Headless browser, scroll and click logic, parsers | Google Cloud project, billing, API key | API key; `X-API-Key` header | | What you get | Whatever you parse from the page | Google's documented place fields | `items[]` with name, rating, review count, address, phone, coordinates, `business_id`, `place_id` | | Reviews | Parsed from the page | Limited to what the API returns per place | Paged with `nextPage`; `sort` and `search` filters | | Maintenance | High: selectors and flows break | Low | Low | | Speed | One browser per job | API calls | API calls; 1 request a second free, at least 5 a second paid | | Storage and reuse | Governed by Google's terms | Restricted by the Maps Platform terms | Data collected from publicly available sources, returned as found | | Cost | Your hosting and time | Per request by SKU, after free monthly thresholds | 1 credit per successful call; failed calls cost 0 | ### What does 1,000 places cost? On the place endpoints, cost follows calls, not places. A search call returns a page of places, so 1,000 places from search costs one credit per page you fetch; check how many places your query returns per page in the playground before you plan a run. Fetching reviews for each of those 1,000 places is 1,000 calls × 1 credit = 1,000 credits per page of reviews. A worked plan: a local SEO team tracks 300 businesses, pulling one page of reviews for each every week. That's 300 × 4 = 1,200 credits a month, plus a weekly search to catch new competitors. That's more than the 100 free credits, which cover a first week's pull for 100 businesses; the Starter pack's 10,000 covers about eight months of it. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ## Which route should you choose? Choose by what you'll do with the data, because that decides which terms and which costs apply. The verdicts below assume you need the data more than once; for a one-off look at ten places, open Google Maps in a browser. - **An app that shows places to users** (a store locator, a "near me" search): use Google's Places API. It's the official route, it's built for display, and the storage limits match that use. - **A dataset of local businesses for analysis** (market sizing, lead lists of businesses, coverage maps): use the place endpoints. You get `items[]` with stable field names, and you don't maintain a browser. - **Monitoring ratings and reviews for a set of businesses**: use the reviews endpoint with each `business_id`, on a schedule. Store `rating`, `timestamp` and `review_text`; skip reviewer identities. - **A one-off research question from an agent**: give the agent the endpoints through MCP. [Summarise Restaurant Reviews with an AI Agent](https://perceptlayer.com/blog/ai-restaurant-review-summary-agent) does exactly this. - **Learning how scraping works**: build a scraper against a practice site, not Google Maps. [Web Scraping with Python](https://perceptlayer.com/blog/web-scraping-python-guide) starts there. To compare before you decide, run `simple-search` with your own query in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps), then `reviews` with a `business_id` from the result. When the fields fit, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### Is scraping Google Maps legal? It depends on your jurisdiction and how you collect and use the data, and Google's terms restrict automated collection of Maps content. Business information such as names, addresses and ratings is lower risk than personal data; reviewer names and profiles are personal data in many jurisdictions. Get legal advice for commercial use, and don't get around blocks or challenges. ### Can I get Google Maps reviews without a scraper? Yes. `GET /v1/google-maps/reviews` takes a `business_id` from a search and returns reviews with `rating`, `timestamp`, `review_text` and `review_language`, plus a `nextPage` token for more. Each successful call costs 1 credit. Store the review content you need and leave out reviewers' names and profile links. ### Does a failed Google Maps call cost credits? No. Only a successful response debits credits. A failed call returns an HTTP status, a JSON error with a `code` and `request_id`, and `X-Credits-Used: 0`. A rate-limited call returns 429 with a `Retry-After` header. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ### How do I get phone numbers and websites for businesses? `simple-search` returns `phone_numbers`, `website` and `domain` for each place where Google Maps shows them, alongside the address and coordinates. For one place you already know, `business-details` takes its `business_id`. These are businesses' published contact details; use them in line with marketing and privacy rules where you are. ### Can an AI agent search Google Maps? Yes. Through the MCP server at `https://perceptlayer.com/mcp`, an agent finds the Google Maps endpoints with `search_endpoints`, reads their parameters with `get_endpoint` (both free) and runs them with `call_endpoint`, which spends credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. google maps scraping places data local business data reviews ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 9 min read ## [Google Reviews Scraper or API: What You Get](https://perceptlayer.com/blog/google-reviews-scraper-vs-api) A Google reviews scraper versus the reviews endpoint: rating, timestamp, review\_text and a nextPage token per call, at 1 credit per business checked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 7 min read ## [Trustpilot Scraper or API: Ratings and Review History](https://perceptlayer.com/blog/trustpilot-scraper-vs-api) A Trustpilot scraper vs a 1-credit company-reviews call: the recorded Amazon response, its star breakdown, and 2,340 pages × 1 credit for a full history. --- title: "HTTP 429 Too Many Requests: What It Means and How to Fix It" description: "A 429 Too Many Requests response means you hit a rate limit. Read Retry-After, wait that long, then retry; a tested Python loop and the headers to watch." url: https://perceptlayer.com/blog/http-429-too-many-requests --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # HTTP 429 Too Many Requests: What It Means and How to Fix It 15 Oct 2026 Perceptlayer 7 min read HTTP 429 Too Many Requests means the server is rate limiting you: you sent more requests than it allows in some window of time. It isn't a bug in your request. The fix is to wait the number of seconds in the response's `Retry-After` header, retry, and then send requests more slowly so you stop hitting the limit. This post covers what the status code means, the headers that tell you how long to wait, and a tested Python retry loop. ## Key takeaways - 429 is defined in RFC 6585: the client sent too many requests in a given amount of time. The server may say how long to wait in `Retry-After`. - `Retry-After` is either a number of seconds or an HTTP date. Parse both, wait at least that long, and cap the number of retries. - With no `Retry-After`, back off exponentially (2, 4, 8 seconds…) with random jitter so parallel workers don't retry at the same moment. - Headers such as `RateLimit-Remaining` and `RateLimit-Reset` let you slow down before you get a 429 at all. - On Perceptlayer a 429 costs nothing: it returns `X-Credits-Used: 0`, and `Retry-After` gives the seconds until the per-minute window resets. ## What does 429 Too Many Requests mean? The 429 status code says the user has sent too many requests in a given amount of time, which is rate limiting. RFC 6585 defines it, and says the response should explain the condition and may include a `Retry-After` header saying how long to wait before making a new request ( [RFC 6585](https://www.rfc-editor.org/rfc/rfc6585), 2012). The same RFC says a 429 response must not be stored by a cache. The RFC deliberately leaves the counting to the server. It doesn't say how the server identifies "the user" or how it counts: a limit can apply per resource, across a whole server, or across a set of servers. In practice an API usually counts per API key or per account, and a website per IP address or session. So a 429 tells you two things: your request was probably fine, and you sent it too soon. Retrying at once makes it worse, because every rejected request usually still counts against the limit. ## Who is sending the 429, and is it you or them? The 429 comes from whichever server enforces the limit, and that decides what you can do about it. If you call an API, its rate limit is in its docs and its headers, and you fix the 429 by slowing your client down. If you're a visitor on a website and see a 429 page, the site has decided your browser or network sent too many requests, and the only fix on your side is to wait. Shared limits cause most surprises. When several scripts or workers use one API key, or one account, they draw on the same budget, so each one can be well under the limit while together they're over it. An office or a cloud provider's IP range can look like one heavy user to a website that limits by IP. If you run the server and your own users see 429s, check the limit's scope first. A per-IP limit behind a proxy or load balancer may be counting every user as the proxy's address. ## How do you read Retry-After and RateLimit headers? `Retry-After` is the header to read first, because it's the server telling you exactly when to come back. RFC 9110 defines its value as either an HTTP date or a number of seconds to wait after receiving the response ( [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110#field.retry-after), 2022). Servers also send it on 503 Service Unavailable responses, to say how long the service is expected to be down. | Header | Example | What it tells you | | --- | --- | --- | | `Retry-After` | `17` or `Wed, 21 Oct 2026 07:28:00 GMT` | When to retry | | `RateLimit-Limit` | `300` | Requests allowed in the window | | `RateLimit-Remaining` | `12` | Requests left in this window | | `RateLimit-Reset` | `17` | Seconds until the window resets | | `RateLimit-Policy` | `300;w=60` | The quota and the window length in seconds | The `RateLimit-*` names come from the IETF HTTP APIs working group's draft on rate-limit headers. The current draft folds them into two structured fields, `RateLimit-Policy` and `RateLimit` ( [draft-ietf-httpapi-ratelimit-headers](https://github.com/ietf-wg-httpapi/ratelimit-headers), 2026), and many APIs still send older names, often with an `X-` prefix. Read whichever your API documents, and treat them as hints: the draft itself says available quota is not a guarantee the next request will be served. ## How do you fix a 429 in your code? Retry the request after the wait the server asked for, and stop after a few attempts. The loop below handles `Retry-After` as seconds or as a date, falls back to exponential backoff when the header is missing, adds jitter, and gives up rather than sleeping for an unreasonable time. It retries only 429 and 503; other errors such as 400 or 401 won't fix themselves, so it returns them for your code to handle. ```python import random import time from datetime import datetime, timezone from email.utils import parsedate_to_datetime import requests RETRYABLE = {429, 503} def retry_after_seconds(value): """Retry-After is either delay-seconds or an HTTP-date (RFC 9110).""" if not value: return None if value.strip().isdigit(): return int(value) try: when = parsedate_to_datetime(value) except (TypeError, ValueError): return None return max(0, (when - datetime.now(timezone.utc)).total_seconds()) def get_with_retry(url, params=None, headers=None, max_attempts=5, max_wait=120): for attempt in range(1, max_attempts + 1): resp = requests.get(url, params=params, headers=headers, timeout=60) if resp.status_code not in RETRYABLE: return resp if attempt == max_attempts: break wait = retry_after_seconds(resp.headers.get("Retry-After")) if wait is None: wait = min(2 ** attempt, 60) # no header: exponential backoff wait += random.uniform(0, 1) # jitter, so parallel workers don't retry in step if wait > max_wait: break print(f"{resp.status_code}, waiting {wait:.1f}s (attempt {attempt})") time.sleep(wait) resp.raise_for_status() return resp ``` We tested it against a local mock server that answered a 429 with `Retry-After: 2`, then a 503 with no header, then a 200: ```text 429, waiting 2.9s (attempt 1) 503, waiting 5.0s (attempt 2) final 200 after 3 requests ``` The first wait followed the header, the second fell back to backoff. Most HTTP clients have this built in under another name, such as `urllib3`'s `Retry` with `respect_retry_after_header`, so check yours before writing your own. [Handle Web Data API Errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) covers the other status codes. ## How do you stop getting 429s in the first place? Send requests no faster than the limit, and let one place in your code decide the pace. Retrying fixes the request in front of you; pacing fixes the cause. 1. **Know the number.** Read the API's documented limit, or `RateLimit-Limit` and `RateLimit-Policy`, and convert it to the unit you schedule in. 2. **Throttle at the source.** A token bucket or a semaphore in front of all workers keeps the total rate under the limit, however many workers you run. [Concurrent API Requests in Python](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) builds one with asyncio. 3. **Watch `RateLimit-Remaining`.** When it's low, sleep for `RateLimit-Reset` seconds before the next request rather than after a 429. 4. **Don't fetch twice.** Cache responses that don't change within your job, so repeated questions don't spend requests. [Cache Web Data API Responses](https://perceptlayer.com/blog/cache-web-data-api-responses) covers what to cache and for how long. 5. **Stagger scheduled jobs.** If several of your jobs share a key and start in the same minute, they compete for the same window. Start them a few minutes apart. For agents, put the cap in the tool layer, because a model in a loop can issue calls faster than you expect. [MCP Server Rate Limiting](https://perceptlayer.com/blog/mcp-server-rate-limiting-agents) shows where. ## What does a 429 look like on Perceptlayer, and does it cost anything? A 429 from Perceptlayer costs nothing. Rate limits are per account, shared by all its keys, and counted in a fixed one-minute window: a free account gets 1 request a second (60 a minute), and a paying account gets the rate of the credits it's using, at least 5 a second (300 a minute). When the window is full you get status 429, the error code `rate_limited`, `X-Credits-Used: 0`, and a `Retry-After` header with the seconds until the window resets. ```bash curl -i "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en" \ -H "X-API-Key: $API_KEY" ``` We didn't run this request for this post. Responses also carry `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` and `RateLimit-Policy`, and the error body has the usual shape: `{"error": {"code", "message", "request_id"}}`. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rates per pack, and the [errors docs](https://docs.perceptlayer.com/errors) list every code. ### What does that mean for a batch job? A free account can run 60 searches a minute. A job of 3,000 searches therefore needs at least 3,000 ÷ 60 = 50 minutes; paced at that rate it never sees a 429, and it costs 3,000 × 1 credit = 3,000 credits. At a paying account's 300 a minute the same job takes 10 minutes. Firing all 3,000 at once doesn't finish sooner: at most 60 succeed in a window and the rest are rejected with 429 until the window resets. See [pricing](https://perceptlayer.com/pricing) for the rate each pack includes. One caution for retries in general: a request that timed out on your side may still have succeeded on the server. [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers that case. To see the headers on a real response, run a search in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search), or [get a free API key](https://perceptlayer.com/signup) and run the cURL above with `-i`. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How long should I wait after a 429? Wait the number of seconds in the `Retry-After` header, or until the date it gives, plus a second of random jitter. If there's no header, back off exponentially: about 2 seconds, then 4, then 8, with a cap. Retrying immediately usually fails again, because rejected requests often count against the same limit. ### Is a 429 error my fault or the server's? Usually neither is broken. The server is enforcing a limit it chose, and your client exceeded it, often because several workers share one key or account. Slow the client down to the documented rate. A 429 on a website you're browsing means the site is limiting your browser or network; waiting a few minutes is the fix. ### What is the difference between 429 and 503? A 429 says you sent too many requests; a 503 says the server or the service behind it can't handle the request right now, whoever sent it. Both may carry `Retry-After`, and both are worth retrying after the wait. On Perceptlayer, neither costs credits: `rate_limited` (429) and `temporarily_unavailable` (503) both return `X-Credits-Used: 0`. ### Does a 429 count against my credits? Not on Perceptlayer. Only a successful response debits credits; a 429, like every other error, returns `X-Credits-Used: 0` and still reports `X-Credits-Remaining`. On other APIs, check the docs: some count rejected requests toward a daily quota even when they don't bill for them. ### Should I retry a 429 forever? No. Cap the attempts (five is plenty) and the longest wait you'll accept, then fail and log it. A 429 that persists after the reset means your overall rate is too high, and more retries only add load. Fix the pace instead: throttle all workers through one limiter set below the documented limit. http 429 rate limits retry-after python api errors ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 5 Oct 2026 Perceptlayer 8 min read ## [Concurrent API Requests in Python: Asyncio Under Rate Limits](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) A Python asyncio fetcher that paces calls to your per-second limit, honours Retry-After and prices a 20,000-call batch at 20,000 credits. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 9 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Handle Web Data API Errors in Python: 4xx, 5xx and Timeouts](https://perceptlayer.com/blog/handle-web-data-api-errors-python) Map the API's error codes to retry, fix or stop in Python: 429 and 503 honour Retry-After, 4xx stops, and failed calls cost 0 credits. --- title: "Build an ETL Pipeline in Python for Web Data | Perceptlayer" description: "An ETL pipeline in Python for web data: extract Google Shopping prices with retries, transform to typed rows, load into SQLite idempotently, run daily." url: https://perceptlayer.com/blog/etl-pipeline-python-web-data --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Build an ETL Pipeline in Python for Web Data 13 Oct 2026 Updated 25 Oct 2026 Perceptlayer 6 min read An ETL pipeline in Python is three functions and a scheduler: extract data from a source, transform it into clean, typed rows, and load those rows into a database, run on a timer. This tutorial builds one for web data with `requests` and the standard library's `sqlite3`: it pulls Google Shopping prices from an API with retries, keeps the raw responses, turns each result into a typed row, and upserts the rows so a re-run never duplicates anything. The complete pipeline is about 130 lines, and we ran it on a recorded API response. ## Key takeaways - Extract with retries on 429 and 503 only, waiting the `Retry-After` seconds; any other error is raised for that query, and the run moves on to the next one. - Land the raw JSON before transforming it. A transform bug then costs a re-run over files, not new API calls. - Transform into typed rows and check them: the recorded response priced one listing at `"$17.50/mo"`, which `extracted_price` turns into `17.5`, so the pipeline flags monthly prices. - Load with `INSERT … ON CONFLICT DO UPDATE` on a key of date, query, country, product and seller. Running the job twice on one day leaves 3 rows, not 6. - Each query is 1 credit per successful call: 50 queries a day is 1,500 credits a month. ## What does an ETL pipeline in Python need? An ETL pipeline needs a source to extract from, rules to transform with, a store to load into, and something to run it on a schedule. Here the source is `GET /v1/google-shopping/search`, which returns product offers as JSON for a query `q`; the transform turns each offer into a row with a fixed type per column; the store is SQLite, which ships with Python; and the scheduler is cron. ```bash pip install requests export API_KEY=sk_live_... ``` That's the only dependency. We ran the code with Python 3.13; the [`sqlite3` module](https://docs.python.org/3/library/sqlite3.html) comes with Python, and the upsert syntax needs SQLite 3.24 or later ( [SQLite: UPSERT](https://www.sqlite.org/lang_upsert.html), 2026). Get a key free at [/signup](https://perceptlayer.com/signup). Why bother with three stages rather than one script that fetches and inserts? Because each stage fails differently. An extract fails when the network or the source does; a transform fails when the data surprises you; a load fails on constraints. Keeping them apart means you can re-run one without repeating the others, and you can test each with fixtures. ## How do you build the pipeline, step by step? The whole pipeline is one file, `etl.py`, with one section per stage and a `run()` function that ties them together. It extracts each configured query, lands the raw response on disk, transforms it into rows and loads them in one transaction. The four steps after the code explain each stage and the choice behind it. ```python """Daily ETL: Google Shopping prices -> SQLite.""" import json import os import sqlite3 import sys import time from datetime import datetime, timezone from pathlib import Path import requests API = "https://api.perceptlayer.com" QUERIES = [("iphone 15", "us"), ("pixel 9", "us")] RAW_DIR = Path("raw") DB_PATH = "prices.db" # --- Extract ----------------------------------------------------------------- def extract(query, gl, max_attempts=4): """One search, retried on 429/503. Returns the parsed JSON response.""" params = {"q": query, "gl": gl, "hl": "en"} for attempt in range(1, max_attempts + 1): resp = requests.get( f"{API}/v1/google-shopping/search", params=params, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=90, ) if resp.status_code == 200: return resp.json() if resp.status_code in (429, 503) and attempt < max_attempts: time.sleep(int(resp.headers.get("Retry-After", 2 ** attempt))) continue error = resp.json().get("error", {}) raise RuntimeError(f"{resp.status_code} {error.get('code')}: {error.get('message')}") def land_raw(payload, query, gl, run_at): """Keep the untouched response, so a bad transform can be re-run without new calls.""" RAW_DIR.mkdir(exist_ok=True) path = RAW_DIR / f"{run_at:%Y-%m-%d}_{gl}_{query.replace(' ', '-')}.json" path.write_text(json.dumps(payload)) return path # --- Transform --------------------------------------------------------------- def transform(payload, query, gl, run_at): rows, skipped = [], 0 for item in payload.get("shopping_results", []): price = item.get("extracted_price") if not item.get("product_id") or not isinstance(price, (int, float)): skipped += 1 continue rows.append({ "observed_on": run_at.date().isoformat(), "query": query, "gl": gl, "product_id": item["product_id"], "seller": item.get("source") or "", "title": item.get("title"), "price": float(price), "price_text": item.get("price"), "monthly": int("/mo" in (item.get("price") or "")), # instalment, not a purchase price "rating": item.get("rating"), "reviews": item.get("reviews"), "position": item.get("position"), }) return rows, skipped # --- Load -------------------------------------------------------------------- SCHEMA = """ CREATE TABLE IF NOT EXISTS shopping_prices ( observed_on TEXT NOT NULL, query TEXT NOT NULL, gl TEXT NOT NULL, product_id TEXT NOT NULL, seller TEXT NOT NULL, title TEXT, price REAL NOT NULL, price_text TEXT, monthly INTEGER NOT NULL, rating REAL, reviews INTEGER, position INTEGER, PRIMARY KEY (observed_on, query, gl, product_id, seller) ) """ UPSERT = """ INSERT INTO shopping_prices (observed_on, query, gl, product_id, seller, title, price, price_text, monthly, rating, reviews, position) VALUES (:observed_on, :query, :gl, :product_id, :seller, :title, :price, :price_text, :monthly, :rating, :reviews, :position) ON CONFLICT (observed_on, query, gl, product_id, seller) DO UPDATE SET title = excluded.title, price = excluded.price, price_text = excluded.price_text, monthly = excluded.monthly, rating = excluded.rating, reviews = excluded.reviews, position = excluded.position """ def load(conn, rows): with conn: # one transaction per batch: all rows or none conn.executemany(UPSERT, rows) # --- Run --------------------------------------------------------------------- def run(): run_at = datetime.now(timezone.utc) conn = sqlite3.connect(DB_PATH) conn.execute(SCHEMA) failures = 0 for query, gl in QUERIES: try: payload = extract(query, gl) except Exception as exc: # one failed query shouldn't stop the others failures += 1 print(f"extract failed for {query!r}/{gl}: {exc}", file=sys.stderr) continue land_raw(payload, query, gl, run_at) rows, skipped = transform(payload, query, gl, run_at) load(conn, rows) print(f"{query!r}/{gl}: loaded {len(rows)} rows, skipped {skipped}") conn.close() return failures if __name__ == "__main__": sys.exit(1 if run() else 0) ``` ### Step 1: extract with retries `extract()` makes one request per query and retries only what's worth retrying: 429 (rate limited) and 503 (temporarily unavailable), waiting the seconds in `Retry-After`. Anything else, such as a 422 for a bad parameter, raises at once with the API's error `code` and `message`. A failed call costs nothing and returns `X-Credits-Used: 0`, so a retry after an error doesn't double the bill. [Handle Web Data API Errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) covers the full set of status codes. ### Step 2: land the raw response `land_raw()` writes the untouched JSON to `raw/2026-10-25_us_iphone-15.json` before anything else touches it. It's the cheapest insurance in the pipeline: when you change the transform next month, you replay the files instead of re-buying the data. For larger volumes, [Save API JSON to Parquet in Python](https://perceptlayer.com/blog/save-api-json-to-parquet-python) covers a columnar format. ### Step 3: transform into typed rows `transform()` keeps the fields worth keeping and gives each a type: `price` from `extracted_price` as a float, `rating` as a float, `reviews` and `position` as integers. It skips offers with no `product_id` or no numeric price and counts them, so a sudden jump in skipped rows shows up in the log. The transform is also where data checks go, and the recording shows why. This is the response, trimmed: ```json { "search_parameters": { "q": "iphone 15", "gl": "us", "hl": "en", "start": 0, "device": "desktop" }, "shopping_results": [ { "position": 1, "title": "Apple iPhone 15", "source": "Walmart - Wireless Source", "rating": 4.7, "reviews": 45000, "product_id": "4263606017411565992", "price": "$393.73", "extracted_price": 393.73, … }, … { "position": 3, "title": "Apple iPhone 15 - Black - 128GB (with 36 monthly payments + plan)", "source": "T-Mobile", "product_id": "8345423428288821281", "price": "$17.50/mo", "extracted_price": 17.5, … } ], "pagination": { "current_page": 1, "start": 0, "next_start": 10 } } ``` The third offer is a monthly instalment, and its `extracted_price` of `17.5` would read as the cheapest iPhone 15 in the data. The pipeline keeps it, keeps the original text in `price_text`, and sets `monthly = 1` so analysis can exclude it. Expect more cases like this; [Normalise Prices Across Currencies and Sources](https://perceptlayer.com/blog/normalize-prices-multiple-currencies) covers currencies and units. ### Step 4: load idempotently `load()` upserts every row in one transaction. The primary key is the day, the query, the country, the product and the seller, so a second run on the same day updates the same rows instead of adding new ones. That makes the job safe to re-run after a failure, which you will do. Postgres has the same `ON CONFLICT` syntax; [Loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres) adapts it, and [Incremental API Data Pulls](https://perceptlayer.com/blog/incremental-api-data-pulls) covers fetching only what's new. ## What does a run produce? We ran the pipeline with `extract()` replaced by a function returning the recorded response for `iphone 15` in the US, twice in a row. Both runs printed `'iphone 15'/us: loaded 3 rows, skipped 0`, and the table held 3 rows, not 6: ```text ('2026-10-25', '4263606017411565992', 'Walmart - Wireless Source', 393.73, '$393.73', 0) ('2026-10-25', '4379032623638529631', 'Best Buy', 441.0, '$441.00', 0) ('2026-10-25', '8345423428288821281', 'T-Mobile', 17.5, '$17.50/mo', 1) ``` A purchase-price query then leaves out the instalment: ```sql SELECT seller, price, price_text FROM shopping_prices WHERE monthly = 0 AND query = 'iphone 15' AND observed_on = '2026-10-25' ORDER BY price; ``` which returned `('Walmart - Wireless Source', 393.73, '$393.73')` and `('Best Buy', 441.0, '$441.00')`. We also tested `extract()` with a mocked 429 followed by a 200, which retried once and returned the 3 results, and a mocked 422, which raised `422 invalid_parameters: 'q' is required`. We didn't call the live API. ## How do you schedule it and keep it healthy? Schedule it with cron on any machine that stays on, and make the job tell you when it fails. The script exits with status 1 if any query failed, which cron, systemd or a CI runner can alert on. A daily run at 06:15: ```bash 15 6 * * * cd /opt/prices && API_KEY=sk_live_... /usr/bin/python3 etl.py >> etl.log 2>&1 ``` Three checks catch most problems before anyone reads a dashboard: 1. **Row counts.** Log rows loaded and skipped per query, and alert when a query that usually loads 20 rows loads 0. 2. **Failed queries.** The exit status covers them; the log line says which query and why. 3. **Spend.** Every successful response reports `X-Credits-Used` and `X-Credits-Remaining`. Log the remaining balance each run so a top-up never comes as a surprise; when the balance is empty, calls return `insufficient_credits` (402). ### What does it cost to run? Each query is one call, and each successful call costs 1 credit. Deeper results cost one call per page: pass `start` from `pagination.next_start`. | Job | Calls a month | Credits | | --- | --- | --- | | 30 queries, daily | 30 × 30 | 900; the 100 free credits cover the first 3 days, the Starter pack's 10,000 the next 11 months | | 50 queries, daily | 50 × 30 | 1,500 | | 200 queries in 3 countries, daily | 200 × 3 × 30 | 18,000, inside the Build pack's 50,000 | See [pricing](https://perceptlayer.com/pricing) for what credits cost. Requests run at 1 a second on a free account, so the 100 free queries take under 2 minutes; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list faster rates. To adapt the pipeline to another source, change `extract()`'s endpoint and parameters and rewrite `transform()` for its fields; the land and load stages stay the same. Run a query in the playground on the [Google Shopping API page](https://perceptlayer.com/apis/google-shopping) first to see the fields you'll map. ## APIs in this post - [Google Shopping **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/google-shopping) ## Frequently asked questions ### Should I use pandas for an ETL pipeline in Python? Use it when the transform is tabular work, such as joins, group-bys and reshaping, on data that fits in memory. For row-by-row cleaning of API responses, plain dictionaries are simpler, have no dependency and make the types explicit. Many pipelines use both: dictionaries to build rows, pandas or SQL for the analysis afterwards. ### Do I need Airflow to schedule an ETL pipeline? Not for one job. Cron, a systemd timer or a scheduled CI workflow runs a daily script reliably. An orchestrator such as Airflow or Dagster earns its setup when you have many jobs with dependencies between them, need backfills, or want retries and alerts managed in one place. ### How do I make an ETL load idempotent? Give every row a natural key that identifies one observation, such as date, query, country, product and seller, make it the primary key, and load with an upsert ( `INSERT … ON CONFLICT DO UPDATE`). Wrap each batch in a transaction so a failure leaves nothing half-written. Then re-running a day replaces that day's rows instead of duplicating them. ### What happens if the API call fails mid-run? That query raises, the run logs it and moves on to the next query, and the script exits with status 1 at the end so your scheduler can alert. A failed call costs nothing. Because loads are idempotent, re-running the whole job later fills the gap without duplicating the queries that worked. ### Where should the raw responses be stored? Anywhere cheap and durable: a local folder for a small job, object storage such as S3 for anything you need to keep. Name files by date, country and query so a replay can pick the right ones, and set a retention period. Raw responses are your only record of exactly what the source returned on a given day. etl python data pipeline sqlite web data ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 10 Aug 2026 Perceptlayer 7 min read ## [Web Data to a Warehouse: Loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres) Land AutoScout24 search JSON in a Postgres JSONB table, flatten it with a view, then upsert on listing\_id. Code and credit cost per refresh. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "Website to Markdown: Clean Page Text for LLMs | Perceptlayer" description: "Turn a website into markdown with one call (response_type=markdown, 1 credit a page) or with markdownify in Python, then strip what an LLM doesn't need." url: https://perceptlayer.com/blog/website-to-markdown-for-llms --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Website to Markdown: Clean Page Text for LLMs 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read To turn a website into markdown, fetch the page and convert its HTML, keeping headings, links, lists and code and dropping scripts, styles and navigation. You can do it in one call with the scrape endpoint and `response_type=markdown`, at 1 credit a page, or in Python with `requests`, BeautifulSoup and `markdownify`. Either way, check first whether the site already publishes a markdown copy, and trim the result before it goes into a model's context. ## Key takeaways - `GET /v1/web-scraper/scrape` takes a `url` (up to 2048 characters) and returns the page as markdown when you pass `response_type=markdown`. It costs 1 credit, and only on success. - Converting it yourself takes about 20 lines of Python. On one page we measured, 144,674 characters of HTML became 35,584 characters of markdown converted whole, and 22,223 after removing navigation, scripts and footers first. - Some sites already publish a markdown copy of each page at the same URL with `.md` appended, a convention from the llms.txt proposal. Check for it before converting anything. - Strip navigation, cookie banners, footers and image tags before the text reaches a model; they cost context and add nothing. ## Why convert a website to markdown for an LLM? Markdown keeps the structure a model uses to read a page, headings, lists, links, tables and code, and drops the markup it doesn't need. Raw HTML spends most of its length on tags, attributes, inline scripts and styles. Plain text goes too far the other way: it loses which line is a heading and where a link pointed. The difference is large. On the PyPI page for `markdownify`, fetched on 25 October 2026, the HTML was 144,674 characters. Converting the whole document gave 35,584 characters of markdown, about a quarter of the size. Converting only the main content, with navigation and footers removed first, gave 22,223. A model's context window is billed and limited by tokens, so that cut goes straight to cost and to how many pages fit in one prompt. Markdown is also what most retrieval pipelines chunk on: split at `##` headings and each chunk keeps its own topic. [RAG with Live Web Data](https://perceptlayer.com/blog/rag-with-live-web-data) covers when you need chunking at all. ## Does the site already publish markdown? Check this first, because it's free and exact. The llms.txt proposal asks sites to put a markdown file at `/llms.txt` that summarises the site and links to its key pages, and to serve a clean markdown copy of pages at the same URL with `.md` appended ( [llmstxt.org](https://llmstxt.org/), 2024). Documentation sites built with some generators do this by default. So before converting `https://example.com/docs/setup`, try `https://example.com/docs/setup.md` and `https://example.com/llms.txt`. If either exists, it was written for exactly this job, by the people who know which parts of the page matter. It's still a proposal rather than a formal standard, so most sites don't have it, and you'll need one of the two methods below. ## How do you get a page as markdown with one API call? The scrape endpoint fetches a URL and returns it in the format you ask for, so the fetching and the conversion happen in one request and you don't run a parser. Pass the page in `url`, URL-encoded, and set `response_type=markdown`. The other two parameters are optional: ```bash curl "https://api.perceptlayer.com/v1/web-scraper/scrape?url=https%3A%2F%2Fexample.com&response_type=markdown" \ -H "X-API-Key: $API_KEY" ``` We didn't run this request for this post, and we haven't recorded a response from this endpoint, so we can't show its output here. Run it in the playground on the [Scrape endpoint page](https://perceptlayer.com/apis/web-scraper/scrape) with your own URL to see exactly what comes back before you build on it. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `url` | string | Yes | The page to fetch, up to 2048 characters | | `response_type` | string | No | `json` or `markdown` | | `javascript` | boolean | No | Render the page's JavaScript; see the [Web Scraper API page](https://perceptlayer.com/apis/web-scraper) | | `include_html` | boolean | No | Include the page's HTML as well; see the endpoint page | Send the key in the `X-API-Key` header; keys start with `sk_live_`. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the alternatives. For pages that build their content in the browser, a plain fetch gets an empty shell, which is what the `javascript` parameter is for. ### What does it cost per page? Each successful call costs 1 credit, so a page costs 1 credit whether it converts to 2,000 characters or 200,000. A failed call costs nothing and returns `X-Credits-Used: 0`; every successful response reports `X-Credits-Used` and `X-Credits-Remaining`. Some arithmetic: an agent that reads 30 pages a day uses 30 × 30 = 900 credits a month. The 100 free credits you get once, after verifying an email address, cover its first 3 days, and the Starter pack's 10,000 covers 11 months. A documentation crawl of 20,000 pages is 20,000 × 1 credit = 20,000 credits, inside the Build pack's 50,000. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ## How do you convert HTML to markdown yourself in Python? Fetch the HTML, cut it down to the main content, then convert. The library doing the conversion is `markdownify`, which turns HTML into markdown and takes options for heading style and for tags to strip or keep ( [markdownify on PyPI](https://pypi.org/project/markdownify/), 2026). BeautifulSoup does the cutting. Install both with `pip install requests beautifulsoup4 markdownify`. ```python import re import sys import requests from bs4 import BeautifulSoup from markdownify import markdownify STRIP = ["script", "style", "noscript", "svg", "iframe", "form", "nav", "header", "footer", "aside"] def page_to_markdown(url): html = requests.get(url, headers={"User-Agent": "md-fetch/1.0"}, timeout=30).text soup = BeautifulSoup(html, "html.parser") main = soup.find("main") or soup.find("article") or soup.body or soup for tag in main.find_all(STRIP): tag.decompose() md = markdownify(str(main), heading_style="ATX", strip=["img"]) md = re.sub(r"\n{3,}", "\n\n", md).strip() return html, md if __name__ == "__main__": url = sys.argv[1] html, md = page_to_markdown(url) naive = markdownify(html, heading_style="ATX") print(f"html chars: {len(html):,}") print(f"naive markdown chars: {len(naive):,}") print(f"cleaned markdown chars: {len(md):,}") print(md[:600]) ``` We ran this with Python 3, `markdownify` 1.2.3 and BeautifulSoup 4.15.0 against `https://pypi.org/project/markdownify/`. The output began: ```text html chars: 144,674 naive markdown chars: 35,584 cleaned markdown chars: 22,223 # markdownify 1.2.3 Convert HTML to markdown. pip install markdownify … ``` `heading_style="ATX"` writes headings as `#` lines rather than underlines, which is what most chunkers split on. Prefer `
` or `
` when the page has one: it's the cheapest way to drop everything around the content. ### When is the do-it-yourself route enough? It's enough when the pages are static HTML, you fetch a modest number of them, and the sites allow it. It costs nothing per page and you control every rule. It stops being enough when pages render in the browser (a plain `requests.get` returns a near-empty shell), when you need many sites with different layouts, or when you'd rather not maintain fetching code. That trade-off is the subject of [Scraper or API: What Maintaining a Scraper Really Involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost). Either way, read the site's terms and `robots.txt` before you fetch it ( [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309), 2022), keep your request rate low, and don't fetch pages behind a login. ## What should you strip before the markdown reaches a model? Strip anything that isn't the page's content, because it costs tokens on every call and can mislead the model into quoting a menu or a cookie notice. The conversion step handles markup; this step handles content that is valid markdown but useless to a model answering a question about the page. 1. **Navigation, headers and footers.** Menus and link lists repeat on every page of a site. Remove `nav`, `header`, `footer` and `aside` before converting, as the script does. 2. **Scripts, styles, SVG and forms.** They convert to noise or to nothing useful. 3. **Images.** An image becomes a markdown image tag with its alt text and URL; unless the model needs the alt text, drop it with `strip=["img"]`. 4. **Cookie banners and newsletter boxes.** They're often plain `div`s; remove them by a class or id you see on the site. 5. **Long link URLs.** Tracking parameters make links long. If the model only needs the anchor text, convert links with `strip=["a"]`. 6. **Repeated blank lines.** Collapse three or more newlines to two. Then cap the length. If a page is still too long, keep the first sections or split at `##` headings and send only the chunks that match the question. [Trim API Responses for LLM Context](https://perceptlayer.com/blog/trim-api-responses-llm-context) shows the same idea applied to JSON responses. ## How does this fit an agent that reads web pages? An agent needs one tool that takes a URL and returns markdown. You can wrap the Python function above as that tool, or give the agent the scrape endpoint through the MCP server at `https://perceptlayer.com/mcp`. With MCP the agent calls `call_endpoint` with the endpoint ID `web-scraper.scrape` and `{"url": "…", "response_type": "markdown"}`; the result reports the credits used and remaining. Before scraping, the agent should check whether a structured endpoint covers the site: the catalogue has 480 websites and 2,782 endpoints, and a search result or a product listing comes back as named JSON fields, which beat markdown for values like prices and ratings. [MCP Server for Web Scraping](https://perceptlayer.com/blog/mcp-server-for-web-scraping) walks through that search-then-scrape order, and the [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. Try it on a page you care about: run the scrape endpoint in the playground on the [Web Scraper API page](https://perceptlayer.com/apis/web-scraper), or [get a free API key](https://perceptlayer.com/signup) and send the cURL request above. ## APIs in this post - [Web Scraper **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/web-scraper) ## Frequently asked questions ### How much does converting a website to markdown cost? With the scrape endpoint, each successful page costs 1 credit, whatever its length, and a failed call costs nothing. Every account gets 100 free credits after verifying an email address, enough for 100 pages. Converting with your own Python code costs nothing per page, but you run and maintain the fetching yourself. See [pricing](https://perceptlayer.com/pricing) for credit packs. ### Can I convert a whole website, not just one page? Yes, one page at a time. Start from the site's sitemap or its `/llms.txt` if it has one, collect the URLs you need, and convert each. With the scrape endpoint that's one call and 1 credit per URL. Respect the site's `robots.txt` and terms, and pace requests; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) give the per-account limits. ### Why does my converted markdown come out empty? The page probably builds its content with JavaScript, so the HTML you fetched is a shell with no text in it. A plain HTTP fetch can't run scripts. Use a browser automation tool, or call the scrape endpoint with `javascript=true` so the page is rendered before conversion. ### Is markdown better than plain text for RAG? Usually. Markdown keeps headings, so you can split a page into chunks that each cover one topic, and it keeps links and tables, which plain text flattens. Plain text is slightly shorter. If your pipeline never uses structure, plain text works; if it chunks or cites sources, markdown is the better input. ### What happens if the URL fails to load? You get an HTTP status and a JSON error body with a `code`, a `message` and a `request_id`, and you aren't charged. A `source_error` (502) means the source didn't return the page; `invalid_parameters` (422) usually means the `url` is malformed or too long. The [errors docs](https://docs.perceptlayer.com/errors) list every code. markdown llm context web scraping python rag ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 24 Sept 2026 Perceptlayer 8 min read ## [Track Brand Mentions in AI Answers with an API](https://perceptlayer.com/blog/track-brand-mentions-in-ai-answers) A daily Python job that sends fixed prompts to an LLM answers endpoint and Google's AI overview, logs brand mentions and cited domains, at 2 credits per prompt. --- title: "What Is an MCP Server? A Working Example with Web Data" description: "An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs." url: https://perceptlayer.com/blog/what-is-an-mcp-server --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # What Is an MCP Server? A Working Example with Web Data 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read An MCP server is a program that offers an AI application tools, resources and prompts through the Model Context Protocol, an open standard built on JSON-RPC 2.0. The application connects as a client, asks the server what it offers, and lets the model call those tools. A server runs either as a local subprocess (stdio) or as an HTTP endpoint (Streamable HTTP). Below is a real one: the three tools Perceptlayer's server lists, the messages that go over the wire, and what each call costs. ## Key takeaways - An MCP server can offer three primitives: tools (functions the model calls), resources (data the application attaches) and prompts (templates the user picks). - The two standard transports are stdio, where the client launches the server as a subprocess, and Streamable HTTP, where every message is a POST to one URL such as `https://perceptlayer.com/mcp`. - Perceptlayer's server lists three tools: `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only read the catalogue and cost nothing. - `call_endpoint` spends the endpoint's credits (1 for `google-search.search`) only when the call succeeds; a failed call costs nothing. ## What is an MCP server, in the specification's terms? The Model Context Protocol defines three roles. A host is the AI application, such as Claude Desktop or an IDE. A client is the connector inside the host. A server is the service that provides context and capabilities ( [MCP specification](https://modelcontextprotocol.io/specification/2026-07-28), 2026). Every message between client and server is a JSON-RPC 2.0 request, response or notification. So an MCP server is the far end of that connection. It doesn't run the model and it doesn't decide when to call anything. It describes what it can do, in a format every MCP client understands, and it does the work when the client asks. The spec compares this to the Language Server Protocol: one protocol, so each tool doesn't need a custom integration per AI app. That's the practical difference from writing your own function definitions for one model's tool-calling API. A function you define lives in your code and works with that one integration. An MCP server works with any client that speaks the protocol. [MCP vs Function Calling for Live Web Data in Agents](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) compares the two in more depth. ## What can an MCP server offer: tools, resources and prompts? A server can offer any of three primitives, and they differ by who controls them: the model decides when to call a tool, the application decides which resources to attach, and the user picks a prompt. The [server overview in the specification](https://modelcontextprotocol.io/specification/2026-07-28/server) (2026) sets them out as a control hierarchy: | Primitive | Controlled by | What it is | Example | | --- | --- | --- | --- | | Tools | The model | Functions the model can call to act or fetch information | An API request, writing a file | | Resources | The application | Data the client attaches as context | File contents, git history | | Prompts | The user | Templates the user picks | A slash command | Most servers people build for agents are tool servers, because tools are what let a model fetch data it doesn't have. A server doesn't have to offer all three. Perceptlayer's server offers tools only, and says so when a client asks: its declared capabilities are `{"tools": {"listChanged": false}}`. ## How does a client talk to a server: stdio or Streamable HTTP? The specification defines two standard transports, stdio and Streamable HTTP, and the JSON-RPC messages are the same on both ( [MCP transports](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports), 2026). What changes is where the server runs, how a message gets there and who can reach it. A local tool usually ships as a stdio server; a hosted service usually ships as Streamable HTTP. | | stdio | Streamable HTTP | | --- | --- | --- | | Where the server runs | A subprocess the client launches | An independent process, local or remote | | How messages travel | Newline-delimited JSON on `stdin` and `stdout` | Each message is an HTTP POST to one MCP endpoint | | Replies | One message per line on `stdout` | A JSON object or an SSE stream for that request | | Auth | The local user's environment | HTTP headers; the spec says servers should authenticate every connection | | Typical use | Local files, local tools | Hosted APIs shared by many clients | With stdio the server writes only valid MCP messages to `stdout` and may log to `stderr` ( [stdio transport](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/stdio), 2026). With Streamable HTTP the server must validate the `Origin` header to prevent DNS rebinding, and each POST mirrors the protocol version and method into the `MCP-Protocol-Version` and `Mcp-Method` headers ( [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http), 2026). [Remote MCP Server: Streamable HTTP vs Local stdio](https://perceptlayer.com/blog/remote-mcp-server-streamable-http) goes through the remote case in detail. ## What does a real MCP server look like on the wire? A worked example makes the definition concrete. Perceptlayer's server is at `https://perceptlayer.com/mcp`, over Streamable HTTP, and it fronts a catalogue of 480 websites and 2,782 endpoints. Listing 2,782 tools would flood a model's context, so the server lists three and lets the model search. The requests below were run against a local build of the server's code, not the live endpoint, and the responses are trimmed with `…`. ### Step 1: list the tools The client sends `tools/list`. Listing the catalogue is public, so this needs no key. ```bash curl -X POST https://perceptlayer.com/mcp \ -H "Content-Type: application/json" \ -H "MCP-Protocol-Version: 2026-07-28" \ -H "Mcp-Method: tools/list" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}' ``` The result holds three tool definitions, each with a `name`, a `description` and a JSON Schema `inputSchema`: ```json {"jsonrpc":"2.0","id":1,"result":{"resultType":"complete","tools":[{"name":"search_endpoints","title":"Search data endpoints","description":"Find Perceptlayer endpoints for a website or kind of data. The catalogue has 2782 endpoints across 483 sources, so search before calling. …"}, … ],"ttlMs":3600000,"cacheScope":"public", …}} ``` | Tool | Input | What it returns | Credits | | --- | --- | --- | --- | | `search_endpoints` | `query`, optional `vertical` and `limit` | Matching endpoint IDs, credits and required parameters | 0 | | `get_endpoint` | `endpoint` | Every parameter with its type, limits and allowed values | 0 | | `call_endpoint` | `endpoint`, `params` | The endpoint's JSON response, plus credits used and remaining | The endpoint's credits, on success only | ### Step 2: search the catalogue The model calls `search_endpoints` with a few words. Note the extra `Mcp-Name` header, which the spec requires on every `tools/call`. ```bash curl -X POST https://perceptlayer.com/mcp \ -H "Content-Type: application/json" \ -H "MCP-Protocol-Version: 2026-07-28" \ -H "Mcp-Method: tools/call" \ -H "Mcp-Name: search_endpoints" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_endpoints","arguments":{"query":"google search results","limit":3},"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}' ``` The tool result is text content holding JSON: ```json {"total_matches":346,"results":[{"endpoint":"google-search.google-ai-mode-search", …},{"endpoint":"google-search.search","name":"Google Search: Search","method":"GET","credits":1,"tier":"standard","required_params":["query"]}, …],"hint":"More matches exist; refine the query or raise limit."} ``` The model now knows `google-search.search` needs a `query` and costs 1 credit. If it needs more, `get_endpoint` returns the full parameter list, also free. ### Step 3: call the endpoint `call_endpoint` runs the endpoint with the caller's key, sent as `Authorization: Bearer` in the server config. Sent without a key, as in our local run, the server answers with a tool error rather than a protocol error, so the model can read it: ```json {"jsonrpc":"2.0","id":4,"result":{"resultType":"complete","content":[{"type":"text","text":"Error invalid_api_key: Missing, unknown or revoked API key. No API key was sent: add 'Authorization: Bearer ' to this MCP server's configuration. …"}],"isError":true, …}} ``` With a valid key, the first content block is the endpoint's JSON and the second reports the spend, in the form `Credits used: 1. Credits remaining: …`. The JSON is the same as a direct call to `GET /v1/google-search/search`. This is the recorded response for `best restaurants in Berlin`, trimmed: ```json { "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", … }, … ], "related_questions": [ { "question": "What is the coolest restaurant in Berlin?", … } ], … } ``` ## What does each MCP call cost? Only one of the four requests above spends anything. `tools/list`, `search_endpoints` and `get_endpoint` read the catalogue and cost 0 credits. `call_endpoint` costs the endpoint's credits, and only on success; failed calls return `X-Credits-Used: 0` over HTTP and the same zero over MCP. So one answered question costs 0 + 0 + 0 + 1 = 1 credit. An agent that answers 500 questions a day with one search each spends 500 × 1 credit = 500 credits a day, or 15,000 credits over 30 days. That's more than the 100 free credits on signup, and within the Build pack's 50,000. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and [Scheduled AI Agent Runs: Budgeting Credits per Run](https://perceptlayer.com/blog/scheduled-agent-credit-budget) for capping it. Requests run under the account's rate limit: 1 request a second on a free account, at least 5 a second on a paying one. A 429 carries `Retry-After`, which the tool error passes on to the model. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rest. ## How do you connect a client to an MCP server? You give the client the server's URL and transport, plus any auth header, and the client handles the protocol from there: it lists the tools, passes their definitions to the model and sends the calls. Most clients take this as a config entry or one command. For Claude Code, with your key in `API_KEY`: ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` We didn't run this command for this post. For Claude Desktop and Cursor, [How to Add an MCP Server to Claude Desktop and Cursor](https://perceptlayer.com/blog/add-mcp-web-data-tools-claude-desktop) has the config files, and the [AI agents (MCP) docs](https://docs.perceptlayer.com/ai-agents) cover other clients. If your client lists too many tools from too many servers, [MCP Server Too Many Tools](https://perceptlayer.com/blog/mcp-too-many-tools-context) shows how to keep context small. To see what the model gets back before you connect anything, run a search in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search), or [get a free API key](https://perceptlayer.com/signup) and send the requests above. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Is an MCP server the same as an API? No. An MCP server often wraps an API, but it adds a layer a model can use: a self-describing tool list with JSON Schema inputs, discovered at runtime over JSON-RPC. A plain REST API has endpoints a developer reads about in docs. Perceptlayer offers both: the HTTP API at `/v1/...` paths and the MCP server, and `call_endpoint` returns the same JSON as the HTTP call. ### Do I need to run an MCP server myself? Not for a remote one. A Streamable HTTP server runs on someone else's infrastructure and your client connects to its URL. You run a server yourself when it needs local access, such as your files or a local database, which is what stdio is for, or when you're exposing your own API to agents. ### Does listing an MCP server's tools cost credits? No. On Perceptlayer's server, `tools/list`, `search_endpoints` and `get_endpoint` cost nothing and need no API key. Only `call_endpoint` spends credits, it spends the endpoint's listed amount (1 credit for nearly all endpoints), and only when the call succeeds. Every account gets 100 free credits after verifying an email address. ### How does an MCP server authenticate requests? The specification says Streamable HTTP servers should authenticate every connection and defines an authorization framework for HTTP transports. Perceptlayer's server takes your API key as `Authorization: Bearer` or `X-API-Key`, and only `call_endpoint` needs it. [MCP Server Authentication: API Keys vs OAuth](https://perceptlayer.com/blog/mcp-server-api-key-vs-oauth) compares the two approaches. ### What happens when an MCP tool call fails? The server returns a tool result with `isError: true` and a message the model can act on, such as `invalid_parameters`, `rate_limited` with the seconds to wait, or `insufficient_credits`. A failed call costs nothing. [MCP Tool Call Error Handling](https://perceptlayer.com/blog/mcp-tool-call-errors-agent-retries) covers which errors an agent should retry and which it shouldn't. mcp model context protocol ai agents tool calling streamable http ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 11 Oct 2026 Perceptlayer 7 min read ## [Remote MCP Server: Streamable HTTP vs Local stdio](https://perceptlayer.com/blog/remote-mcp-server-streamable-http) A remote MCP server runs over Streamable HTTP: one POST endpoint, auth headers, Origin checks, no sessions. Real responses, and when stdio fits better. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Sept 2026 Perceptlayer 7 min read ## [MCP Server Too Many Tools: Keeping Agent Context Small](https://perceptlayer.com/blog/mcp-too-many-tools-context) One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small. --- title: "Remote MCP Server: Streamable HTTP vs Local stdio" description: "A remote MCP server runs over Streamable HTTP: one POST endpoint, auth headers, Origin checks, no sessions. Real responses, and when stdio fits better." url: https://perceptlayer.com/blog/remote-mcp-server-streamable-http --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Remote MCP Server: Streamable HTTP vs Local stdio 11 Oct 2026 Perceptlayer 7 min read A remote MCP server is an MCP server that runs on someone else's machine and that your AI client reaches over the network, using the Streamable HTTP transport: every message is an HTTP POST to one URL. Compared with a local stdio server, which your client launches as a subprocess, a remote server needs real authentication, must check the `Origin` header, and since the 2026-07-28 revision of the spec keeps no protocol sessions. This post walks through what changes, with real responses from Perceptlayer's server, and when a local server is still the better choice. ## Key takeaways - Streamable HTTP uses one MCP endpoint that accepts POST. Each JSON-RPC request is its own POST, answered with a JSON object or a request-scoped SSE stream. - A remote server must validate `Origin` and should authenticate every connection. Perceptlayer's server answers a foreign `Origin` with `403` and takes an API key as `Authorization: Bearer`. - Requests under the 2026-07-28 spec mirror the version and method into `MCP-Protocol-Version`, `Mcp-Method` and, for tool calls, `Mcp-Name` headers; a missing header gets a `400` with error `-32020`. - Choose stdio when the server needs your local files, tools or network; choose remote when the data lives on a service and many clients share it. ## What makes an MCP server remote? A server is remote when the client talks to it over HTTP instead of over the standard input and output of a process it launched. The MCP specification defines exactly two standard transports. With stdio, the client starts the server as a subprocess and exchanges newline-delimited JSON-RPC over `stdin` and `stdout`. With Streamable HTTP, the server is an independent process that can serve many clients, and each message is a POST to a single MCP endpoint ( [MCP transports](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports), 2026). The protocol on top is identical: the same `tools/list`, the same `tools/call`, the same JSON results. What changes is everything around the message: where the server runs, who can reach it, how it knows who you are, and what happens when the network is slow. A Streamable HTTP server can run on `localhost` too, but "remote MCP server" usually means a hosted one, such as `https://perceptlayer.com/mcp`. If you're new to the protocol itself, [What Is an MCP Server?](https://perceptlayer.com/blog/what-is-an-mcp-server) covers the basics. ## How does Streamable HTTP carry MCP messages? Streamable HTTP maps one JSON-RPC request to one HTTP POST. The server exposes a single endpoint path; the client POSTs each request or notification there; the server answers a request with either `Content-Type: application/json` or an SSE stream scoped to that request, carrying progress notifications before the final response ( [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http), 2026). The 2026-07-28 revision removed the standalone GET stream and protocol-level sessions. Perceptlayer's server takes the simplest form the spec allows: it answers every request with one JSON object and no SSE. These responses come from a local run of the server's code, not the live endpoint. A GET is refused: ```text HTTP/1.1 405 Method Not Allowed Allow: POST ``` Batches are refused too, because the spec has one message per POST: ```json {"jsonrpc":"2.0","error":{"code":-32600,"message":"Batch requests are not supported. Send one message per POST."}} ``` ### Which headers does each request carry? Under the 2026-07-28 spec, each request carries its protocol version and client capabilities in `params._meta`, and mirrors them into headers so proxies and gateways can route without parsing the body. Every POST needs `MCP-Protocol-Version` and `Mcp-Method`; `tools/call`, `resources/read` and `prompts/get` also need `Mcp-Name`. A request that leaves one out is rejected: ```json {"jsonrpc":"2.0","id":1,"error":{"code":-32020,"message":"Header mismatch: Mcp-Method header is missing."}} ``` A version the server doesn't support gets a `400` listing the ones it does, which is how a client negotiates: ```json {"jsonrpc":"2.0","id":1,"error":{"code":-32022,"message":"Unsupported protocol version","data":{"supported":["2026-07-28","2025-11-25","2025-06-18","2025-03-26"],"requested":"2024-11-05"}}} ``` Older clients still work. A client on an earlier revision sends `initialize` first, and the server answers with the version it will speak, its capabilities and its instructions. A request with no version header is treated as the 2025-03-26 revision, which the spec allows. ## How does a remote server know who you are? A local stdio server inherits your environment: it reads credentials from environment variables or files, and the spec says stdio implementations should do exactly that rather than follow its HTTP authorization flow ( [MCP authorization](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization), 2026). A remote server can't see your machine, so the credential travels with each request. The spec's authorization framework for HTTP transports is OAuth 2.1: the MCP server acts as a resource server, and clients discover its authorization server through OAuth Protected Resource Metadata. That fits servers acting on a user's account in another system. A simpler pattern, common for data APIs, is a static key in a header. Perceptlayer's server takes your API key as `Authorization: Bearer` (or `X-API-Key`), which is how Claude Code adds it: ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` We didn't run this command for this post. Listing tools and searching the catalogue need no key; only `call_endpoint` does, and without one it returns a tool error telling the model to add the header. [MCP Server Authentication: API Keys vs OAuth](https://perceptlayer.com/blog/mcp-server-api-key-vs-oauth) compares the two approaches in depth. ## Why does a remote server check the Origin header? Because a web page in your browser can send requests to any URL, including an MCP server, and the server needs to tell a legitimate client from a hostile page. The spec says Streamable HTTP servers must validate `Origin` on every incoming connection to prevent DNS rebinding attacks, must answer an invalid `Origin` with `403 Forbidden`, and when running locally should bind to `127.0.0.1` rather than all interfaces. Server-to-server clients, such as Claude Code or an agent SDK, send no `Origin`, so they pass. A browser request from an unknown site is refused. From the local run: ```text HTTP/1.1 403 Forbidden {"jsonrpc":"2.0","error":{"code":-32600,"message":"Origin not allowed."}} ``` This matters most for servers on `localhost`. A local HTTP server that skips the check can be driven by any website you visit; a stdio server has no network port to attack at all. ## What changes without sessions? Without protocol sessions, each request stands alone: the server keeps no per-client state between POSTs, and any server instance can answer any request. That makes remote servers easy to run behind a load balancer or on serverless platforms. Perceptlayer's server is stateless in this sense. Statelessness doesn't make tool calls idempotent. A `call_endpoint` that times out on your side may still have run, and on Perceptlayer a successful call costs the endpoint's credits (1 for `google-search.search`, from the [Google Search API](https://perceptlayer.com/apis/google-search)) whether or not your client received the reply. Failed calls cost nothing. Two limits shape a remote call's behaviour: | Limit | Value on Perceptlayer | What to do | | --- | --- | --- | | Data source timeout | 60 seconds, then a `timeout` error (not charged) | Set your client's timeout above 60 seconds | | Response size in MCP | 100,000 characters; longer responses are truncated with a note | Ask for less with a page or limit parameter | | Request rate | Per account: 1 a second free, at least 5 a second paid | Honour `Retry-After` on a 429 | [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers the timeout case, and [MCP Server Rate Limiting](https://perceptlayer.com/blog/mcp-server-rate-limiting-agents) covers pacing an agent. ## When is a local stdio server the better fit? Choose stdio when the server's job is on your machine, and remote when the job is on a service. A filesystem server, a git server or a server that drives a local database belongs on stdio: it needs your files and credentials, it should never be reachable from the network, and launching it per client is cheap. A data API, a SaaS integration or anything several people or agents share belongs remote: one deployment, one place to update, no install on each machine. | | Local stdio | Remote Streamable HTTP | | --- | --- | --- | | Runs | As a subprocess of the client | As a service, often hosted | | Install | On every machine that uses it | None; a URL in the client config | | Credentials | From the local environment | A header per request, or OAuth | | Attack surface | No network port | A public endpoint: needs auth and Origin checks | | Shared by many clients | No | Yes | | Updates | Each user upgrades | The operator deploys once | | Typical use | Files, git, local databases, local tools | Data APIs, SaaS actions, team-wide tools | Many setups use both: local servers for the codebase, a remote one for live web data. To try a remote server, add Perceptlayer's with the command above, or follow [How to Add an MCP Server to Claude Desktop and Cursor](https://perceptlayer.com/blog/add-mcp-web-data-tools-claude-desktop). The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover other clients, and you can [get a free API key](https://perceptlayer.com/signup) for the calls. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Is a remote MCP server slower than a local one? Each call adds a network round trip, so yes, by that much. For a data server, the time usually goes on fetching the data, not the transport: a tool that calls the web costs the same either way. Where latency matters, prefer servers that return JSON directly rather than streams you don't need. ### Can a remote MCP server use SSE? Yes. Under Streamable HTTP, the server may answer any request with an SSE stream scoped to that request, carrying progress notifications before the final response; clients must accept both JSON and SSE. The older HTTP+SSE transport from the 2024-11-05 revision is a different, deprecated design. Perceptlayer's server answers every request with plain JSON. ### How do I secure a remote MCP server I run myself? Authenticate every request, with OAuth 2.1 as the spec describes or with keys you can revoke. Validate `Origin` and answer unknown origins with `403`. Serve over HTTPS, apply per-account rate limits, and never log request bodies that may contain user data. If it only serves you, bind it to `127.0.0.1`. ### Does a remote MCP server cost anything to call? That depends on the server. On Perceptlayer's, `tools/list`, `search_endpoints` and `get_endpoint` cost nothing and need no key; `call_endpoint` costs the endpoint's credits, 1 for nearly all endpoints, only on success. Every account gets 100 free credits after verifying an email address; see [pricing](https://perceptlayer.com/pricing). ### Which clients support remote MCP servers? Clients that implement the Streamable HTTP transport can connect by URL; Claude Code takes `--transport http`, and other clients use a URL field or a config entry. Older clients may only support the legacy handshake, which Perceptlayer's server still answers. Check your client's documentation for how it sends custom headers. mcp remote mcp server streamable http stdio ai agents ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. --- title: "SERP API: What It Returns and What a Query Costs" description: "A SERP API returns a results page as JSON: organic results, People also ask, related searches, local results. Real responses from 3 engines, 1 credit each." url: https://perceptlayer.com/blog/serp-api-explained --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # SERP API: What It Returns and What a Query Costs 11 Oct 2026 Perceptlayer 7 min read A SERP API returns a search engine results page as structured JSON instead of HTML: each organic result with its position, title, link and snippet, plus the page's other blocks, such as People also ask questions, related searches and local results. You send a query and options like language and country; you get back named fields your code or agent can read. Below are recorded responses from Google, Bing and DuckDuckGo, how their shapes differ, and the credit cost of daily keyword tracking. ## Key takeaways - A SERP API turns one results page into JSON. On Google that means `organic_results`, `related_questions` (People also ask), `related_searches`, `local_results` and `pagination` in one response. - Each engine's response has its own shape: Google's endpoint returns `organic_results[].link`, Bing's returns `data[].url`, and DuckDuckGo's nests results under `data.organic_results`. - Every search endpoint here costs 1 credit per successful call, and failed calls cost nothing. Tracking 200 keywords daily on one engine is 6,000 credits a month. - The official options have narrowed: Google's Custom Search JSON API is closed to new customers, and Microsoft retired the Bing Search APIs in August 2025. ## What is a SERP API? SERP stands for search engine results page, the page you see after you search. A SERP API runs the search for you and returns that page as data. You don't parse HTML, manage browsers or keep selectors working as the page's layout changes; you read fields. People use them for three kinds of work. SEO teams track where their pages rank for a list of keywords. Product and research teams watch which competitors, questions and features appear for a topic. AI agents use them to answer questions with current information and sources, as in [Verify Agent Answers with Live Search](https://perceptlayer.com/blog/ground-agent-answers-live-search). The official search APIs have mostly closed. Google says its Custom Search JSON API is closed to new customers and existing customers have until 1 January 2027 to move to an alternative ( [Google for Developers](https://developers.google.com/custom-search/v1/overview), 2026). Microsoft retired the Bing Search APIs on 11 August 2025 and points customers to Grounding with Bing Search in its AI agent service, which returns generated answers rather than raw result lists ( [Microsoft Learn](https://learn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement), 2025). If one of those still fits your contract and use, it's the first thing to check. ## What does a SERP API return from Google? Google's results page holds more than ten blue links, and a SERP API breaks it into one field per block: organic results, People also ask questions, related searches, local results, filters and pagination, each with its own named fields. This is the recorded response from `GET /v1/google-search/search` for `best restaurants in Berlin`, trimmed: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "displayed_link": "https://andershusa.com › best-restaurants-berlin-german...", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. It holds two Michelin stars, has been frequently ranked on The World's 50 ...", "source": "Anders & Kaitlin", "rank_group": 1, "rank_absolute": 4 }, … ], "related_searches": [ { "query": "Best restaurants in Berlin for tourists", … }, … ], "related_questions": [ { "question": "What is the coolest restaurant in Berlin?", … }, … ], "local_results": { "places": [ { "position": 1, "title": "BLESS Restaurant", "rating": 4.8, "reviews": 2400, "price": "€20–70", "type": "Asian", "address": "Hausvogteipl. 10, 10117 Berlin, Germany", … }, … ], … }, "pagination": [ { "start": 10, … }, … ], … } ``` Two position fields matter for rank tracking. `position` (and `rank_group`) counts organic results only; `rank_absolute` counts every block on the page, so the first organic result here sits at `rank_absolute` 4 because local results came first. Track both if you report "position 1" to anyone: being the top organic result below a map pack is not the same as being the first thing on the page. | Field | What it holds | Typical use | | --- | --- | --- | | `organic_results` | Position, title, link, snippet, source | Rank tracking, agent sources | | `related_questions` | People also ask questions | Content research | | `related_searches` | Related queries with links | Keyword discovery | | `local_results.places` | Name, rating, review count, price, address | Local SEO | | `pagination` | Links to further pages | Going past page one | | `serp_results` | Each block's type and absolute rank | Page layout over time | The endpoint takes `location`, `gl`, `hl`, `device`, `start` and `page` among its optional parameters, so you can ask for the page a searcher in a given place, language and device type would see. [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json) covers every parameter, and [Google People Also Ask API](https://perceptlayer.com/blog/google-people-also-ask-api) and [Google AI Overview API](https://perceptlayer.com/blog/google-ai-overview-api) cover the blocks that have their own endpoints. ## How do Bing and DuckDuckGo responses differ? Each engine returns its own page, so each endpoint returns its own shape, with different field names for the same idea. Bing's search endpoint returns a flat `data` list with `url` and `domain` per result, and DuckDuckGo's nests `organic_results` inside `data`. This is Bing's recorded response for `best web scraping api`, trimmed: ```json { "data": [ { "position": 1, "title": "Best", "description": "Sep 14, 2026 · Надійний інтернет-провайдер Best ⭐️ Головна ⚡️Швидкість від 200 Мбіт/с до 1 Гбіт/с ⭐️ Працює при …", "url": "https://best.net.ua/", "domain": "best.net.ua" }, { "position": 2, "title": "BEST | English meaning - Cambridge Dictionary", … "url": "https://dictionary.cambridge.org/dictionary/english/best", "domain": "dictionary.cambridge.org" } ], "results_on_page": 10, "source": "bing" } ``` That recording is worth a second look: the top results match the word "best", not the query's meaning. Data comes back as the engine served it at the time of the call, so a SERP API shows you what the engine ranked, good or bad. For Bing, the optional `hl` parameter (language) and `site` and `filetype` filters help steer it. DuckDuckGo's endpoint wraps results in `data`, with pagination you can follow and, for some queries, an AI answer. The recorded response, trimmed to its structure: ```json { "success": true, "data": { "search_parameters": { … }, "organic_results": [ … ], "pagination": { "current": 1, "has_more": true, "next_start": 10, "next": 2 }, "knowledge_graph": { "ai_answer": { … } } }, "meta": { … } } ``` Each item in `organic_results` has `position`, `title`, `link`, `snippet` and `display_url`. Pass `pagination.next_start` back as `start` for the next page. | | Google `search` | Bing `search` | DuckDuckGo `search` | | --- | --- | --- | --- | | Path | `/v1/google-search/search` | `/v1/bing/search` | `/v1/duckduckgo/search` | | Query parameter | `query` | `query` | `q` | | Results array | `organic_results` | `data` | `data.organic_results` | | Result URL field | `link` | `url` | `link` | | Other blocks | Questions, related, local, filters | None in the recording | AI answer in `knowledge_graph` | | Paging | `start`, `page` | `page`, `num` | `start` | | Region or language | `gl`, `hl`, `location` | `hl` | `kl` | | Credits per call | 1 | 1 | 1 | If you query more than one engine, normalise early: map each response to one record with `engine`, `position`, `title`, `url` and `snippet`, and keep the raw response for anything else. [Bing Search API Alternative](https://perceptlayer.com/blog/bing-search-api-alternative-json) and [DuckDuckGo Search API](https://perceptlayer.com/blog/duckduckgo-search-api-json) cover those endpoints' parameters. ## What does daily keyword tracking cost? Each search is one call, and each successful call costs 1 credit, so the cost is keywords × engines × checks per day × days. Failed calls cost nothing and return `X-Credits-Used: 0`, so a retry after an error doesn't double the bill. | Job | Calls a month | Credits | | --- | --- | --- | | 30 keywords, Google, daily | 30 × 30 | 900, inside the Starter pack's 10,000; the 100 free credits cover the first 3 days | | 200 keywords, Google, daily | 200 × 30 | 6,000, inside the Starter pack's 10,000 | | 200 keywords, Google + Bing + DuckDuckGo, daily | 200 × 3 × 30 | 18,000, inside the Build pack's 50,000 | | 1,000 keywords, Google, top 2 pages, daily | 1,000 × 2 × 30 | 60,000, inside the Growth pack's 200,000 | Checking the second page costs a second call. Most rank tracking only needs the first page; fetch deeper only for keywords where you expect to rank lower. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) for how balances work. Purchased credits last 12 months. Rate limits set how fast a batch can run: 1 request a second on a free account, at least 5 a second on a paying one. 6,000 searches at 5 a second take 20 minutes. [Search Result Data for SEO Monitoring](https://perceptlayer.com/blog/search-result-data-seo-monitoring) covers which fields to store from each run. ## What should you check before you rely on a SERP API? Check that it returns the page your users see, in the shape your code needs, at a cost you can predict. A few test calls with queries you know well answer most of it, before you write any parsing code or commit to a volume. These are the questions to answer: 1. **Location and language.** Does it take the country, language and city you care about? Rankings differ by place. 2. **Device.** Mobile and desktop pages differ. Google's endpoint takes `device` ( `desktop`, `tablet`, `mobile`). 3. **Blocks.** Does the response include the blocks you track, such as People also ask or local results, or only organic links? 4. **Position semantics.** Is position counted among organic results or across the whole page? 5. **Failures.** Are failed calls billed? Here they aren't. 6. **Terms.** What may you store and show? Search results contain other sites' titles and snippets. Run a query you know well in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search), then the same one on the [Bing API](https://perceptlayer.com/apis/bing) and [DuckDuckGo API](https://perceptlayer.com/apis/duckduckgo) pages, and compare the responses with what you see in a browser. When the shapes suit you, [get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Bing **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/bing) - [DuckDuckGo **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/duckduckgo) ## Frequently asked questions ### Is using a SERP API legal? Collecting search results to measure rankings or research a topic is common practice, but the rules depend on your jurisdiction, the engine's terms and what you do with the data. Store what you need, don't republish other sites' content wholesale, and avoid collecting personal data from results. Data here is collected from publicly available sources and returned as found at the time of the call. ### How fresh are SERP API results? Each call runs the search when you make it, so the results are what the engine returned at that moment. Rankings move during the day and by location, so record the time, location and device with every result. If you need a fixed snapshot for a report, store the response rather than re-querying later. ### Does a SERP API return ads? That depends on the engine and the endpoint. The Google recording shown here contains organic results, related questions, related searches, local results and filters, and no ads block. Test the queries you care about in the playground before you build a report that depends on ads data. ### How many results does one SERP API call return? One call returns one results page. The Google recording reports `organic_results_count` of 6 for that query, alongside a block of local results; the Bing recording reports `results_on_page` of 10. To go deeper, pass the paging parameter ( `start` or `page`), at 1 credit per extra page. ### Can an AI agent use a SERP API? Yes. An agent can call the search endpoint as a tool and read `organic_results` for sources. Through the MCP server at `https://perceptlayer.com/mcp`, it finds the endpoint with `search_endpoints` and runs it with `call_endpoint`, which reports credits used. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. serp api search results seo rank tracking json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 7 min read ## [Rank Tracking API: Track Google Positions as JSON](https://perceptlayer.com/blog/rank-tracking-api) Build a daily rank check from one Google search call per keyword and location: read organic\_results position and link, store them, 1 credit a check. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Jul 2026 Perceptlayer 7 min read ## [Google AI Overview API: Get AI Overviews as JSON](https://perceptlayer.com/blog/google-ai-overview-api) Google has no AI Overview API. GET /v1/google-search/search-ai-overview takes a query, hl and gl, costs 1 credit, and suits daily keyword tracking. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 10 Nov 2026 Perceptlayer 7 min read ## [Google Search Scraper or API: What You Get](https://perceptlayer.com/blog/google-search-scraper-vs-api) A Google Search scraper parses every block on the page. Seven endpoints return them as JSON at 1 to 3 credits a call, with a recorded Berlin search. --- title: "Cars.com API: Used Car Listings and Price Evaluations" description: "Search Cars.com listings with its six required parameters (zip, radius_miles, stock_type, sort, page, page_size), then listing, dealer and price-eval calls." url: https://perceptlayer.com/blog/cars-com-api-listings-price-evaluation --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Cars.com API: Used Car Listings and Price Evaluations 9 Oct 2026 Perceptlayer 7 min read Cars.com runs its APIs for partners such as dealers and resellers, not as a public developer product. To read Cars.com listings as JSON, call `GET /v1/cars-com/search` with six required parameters: `zip`, `radius_miles`, `stock_type`, `sort`, `page` and `page_size`. Each successful call costs 1 credit. From there, `listing`, `dealer` and `media` open one car by `listing_id` and `zip`, and `price-eval` returns price evaluations for an area. ## Key takeaways - Search needs all six of `zip`, `radius_miles`, `stock_type` ( `all`, `used`, `new` or `cpo`), `sort`, `page` and `page_size`. Leave one out and the call fails with `invalid_parameters` (422), at no cost. - `makes[]`, `models[]`, `year_min`, `year_max`, `fuel_slugs[]`, `transmission_slugs[]` and `seller_type[]` narrow a search; `taxonomy` and `facets` give you valid values first. - Every per-car endpoint ( `listing`, `dealer`, `media`, `model-reviews`) takes the `listing_id` and the same `zip` you searched with. - `price-eval` takes the area parameters, not a listing: `zip`, `radius_miles`, `sort`, `page`, `page_size`, plus an optional `no_accidents` flag. - All 8 Cars.com endpoints cost 1 credit per successful call. Paging a metro area costs one credit per page, so the page count is the bill. ## Does Cars.com have a public API? Not one you can sign up for. Cars.com uses APIs to share listing, inventory, pricing and lead data with its own partners: a Google Cloud case study says it exposes more than 100 APIs and first used its API platform to make listing and performance data available to reseller partners ( [Google Cloud](https://cloud.google.com/customers/cars-dot-com), 2026). There's no self-serve key for outside developers. Its [terms of service](https://www.cars.com/about/terms/) also say you may not use automated means such as robots, crawlers or spiders to collect data from the site (2026). If you need Cars.com data for a commercial product, a partnership with Cars.com is the route that gives you rights to it. The [Cars.com API](https://perceptlayer.com/apis/cars-com) returns what the site shows as JSON for analysis, with the same key as the rest of the catalogue; whether your use is allowed depends on those terms and the law that applies to you, and Perceptlayer can't advise on it. ## Which Cars.com endpoints are there? Eight GET endpoints, each 1 credit per successful call. Two give you valid inputs ( `taxonomy` and `facets`), two work on an area ( `search` and `price-eval`), and four open one car. The per-car endpoints all take the `listing_id` from a search plus a `zip`, so keep the zip you searched with alongside each listing ID. | Endpoint | Returns | Required | | --- | --- | --- | | [`/v1/cars-com/taxonomy`](https://perceptlayer.com/apis/cars-com/taxonomy) | The vehicle taxonomy | none | | [`/v1/cars-com/facets`](https://perceptlayer.com/apis/cars-com/facets) | Search facets for an area | `zip` | | [`/v1/cars-com/search`](https://perceptlayer.com/apis/cars-com/search) | A page of listings | `zip`, `radius_miles`, `stock_type`, `sort`, `page`, `page_size` | | [`/v1/cars-com/price-eval`](https://perceptlayer.com/apis/cars-com/price-eval) | Price evaluations | `zip`, `radius_miles`, `sort`, `page`, `page_size` | | [`/v1/cars-com/listing`](https://perceptlayer.com/apis/cars-com/listing) | One listing | `listing_id`, `zip` | | `/v1/cars-com/dealer` | The listing's dealer | `listing_id`, `zip` | | `/v1/cars-com/media` | The listing's media | `listing_id`, `zip` | | `/v1/cars-com/model-reviews` | Reviews of the car's model | `listing_id`, `zip` | Start with `taxonomy`. It takes no parameters and returns the site's vehicle taxonomy, which is where the make and model slugs come from, so you send `makes[]` and `models[]` that match rather than guessing at spellings. We haven't recorded a `taxonomy` response, so run it in the playground on the [Cars.com API page](https://perceptlayer.com/apis/cars-com) to see the exact slugs. ## How do you search Cars.com listings? Send all six required parameters to `GET /v1/cars-com/search`. This request asks for used cars within 50 miles of ZIP 60601 in Chicago, best matches first, 20 to a page. It's the request behind the recorded response below: ```bash curl "https://api.perceptlayer.com/v1/cars-com/search?zip=60601&radius_miles=50&stock_type=used&sort=BEST_MATCH_DESC&page=1&page_size=20" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_` and go in the `X-API-Key` header. [Get a free API key](https://perceptlayer.com/signup); the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ### Which search parameters can you use? Six are required and seven optional. Types and allowed values come from the endpoint definition; nothing else is documented, so don't rely on a maximum `page_size` until you've tested one. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `zip` | string | yes | US ZIP code at the centre of the search | | `radius_miles` | integer | yes | Search radius in miles | | `stock_type` | string | yes | `all`, `used`, `new` or `cpo` | | `sort` | string | yes | `BEST_MATCH_DESC`, `DISTANCE`, `MILEAGE`, `MILEAGE_DESC`, `YEAR`, `YEAR_DESC`, `LISTED_AT_DESC`, `LIST_PRICE_DESC` | | `page` | integer | yes | Start at `1` | | `page_size` | integer | yes | Listings per page | | `makes[]`, `models[]` | list of strings | no | Up to 64 characters each | | `year_min`, `year_max` | integer | no | Model year bounds | | `fuel_slugs[]` | list of strings | no | Fuel types, as slugs | | `transmission_slugs[]` | list of strings | no | Transmissions, as slugs | | `seller_type[]` | list of strings | no | `dealership`, `private_seller`, `online_seller` | List parameters repeat in the query string. For used Toyota and Honda cars from 2020 onwards, sold by dealerships, add `makes[]=toyota&makes[]=honda&year_min=2020&seller_type[]=dealership`, using the make slugs `taxonomy` returns. `stock_type=cpo` limits results to certified pre-owned cars. ### What does a search response contain? The recorded response for the Chicago request above has a `metadata` object and a `listings` array. `metadata` reports `total_entries` 10,000 across `total_pages` 500. A round 10,000 may be a cap on what one search reports rather than the size of the market, so narrow by radius, make or year to see past it. The first listing, trimmed with `…`: ```json { "success": true, "data": { "metadata": { "page": 1, "page_size": 20, "total_pages": 500, "total_entries": 10000, "sort": "BEST_MATCH_DESC", "has_more": true }, "listings": [ { "listing_id": "5fac55c4-0214-4693-ba58-5e80581e5cb7", "vin": "SCCLEKMX0RHB45170", "price": 90412, "price_currency": "USD", "mileage": 9457, "year": 2024, "make": "Lotus", "model": "Emira", "trim": "First Edition", "body_style": "Coupe", "fuel": "Gasoline", "drivetrain": "Rear-wheel Drive", "certified_preowned": false, "stock_type": "USED", "seller_type": "dealership", "price_badge": "GOOD", "predicted_price": 89702, "listed_at": "2026-09-11T14:47:18", "location_zip": "60515", "dealer": { "id": "08cb8b0e-0d9b-5eba-9354-55618dd089a2", "name": "Napleton Aston Martin" }, … }, … ] } } ``` The `vin` is the field to deduplicate on and to join with other sources, since `listing_id` is Cars.com's own. `location_zip` is the car's location, which can differ from the ZIP you searched. Fields such as `city_mpg` appear on some listings and not others, so treat everything beyond the core price, mileage and vehicle fields as optional. ## How do you open one listing? Pass the listing's ID and the search's ZIP to `GET /v1/cars-com/listing`. The same two parameters open the dealer, the photos and the model reviews, so a full profile of one car is four calls. Most projects need only `listing`; fetch `dealer` when you're aggregating by seller and `media` when you need the images. ```bash curl "https://api.perceptlayer.com/v1/cars-com/listing?listing_id=$LISTING_ID&zip=60601" \ -H "X-API-Key: $API_KEY" ``` This Python script pages through a search and saves each page as it arrives, stopping at a fixed page budget so a large market can't run away with your credits: ```python import json import os import requests URL = "https://api.perceptlayer.com/v1/cars-com/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} BASE = {"zip": "60601", "radius_miles": 50, "stock_type": "used", "sort": "LISTED_AT_DESC", "page_size": 20} MAX_PAGES = 10 spent = 0 for page in range(1, MAX_PAGES + 1): r = requests.get(URL, params={**BASE, "page": page}, headers=HEADERS, timeout=60) if r.status_code != 200: print("page", page, r.json()["error"]["code"]) break spent += int(r.headers["X-Credits-Used"]) with open(f"cars-60601-p{page}.json", "w") as f: json.dump(r.json(), f) print("credits used:", spent) ``` We haven't run this script live for this article. With `sort=LISTED_AT_DESC`, the first pages hold the newest listings, so a daily run that reads the first few pages catches new stock without re-reading the whole market. ## What does price-eval return? `GET /v1/cars-com/price-eval` returns price evaluations for the listings in an area. It takes the same area and paging parameters as search, `zip`, `radius_miles`, `sort`, `page` and `page_size`, plus an optional boolean `no_accidents`, but no make, model or stock filters. It works on the market around a ZIP, not on one listing. ```bash curl "https://api.perceptlayer.com/v1/cars-com/price-eval?zip=60601&radius_miles=50&sort=BEST_MATCH_DESC&page=1&page_size=20&no_accidents=true" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a `price-eval` response, so look at a page in the playground before you rely on any field. Note that search listings already carry the site's verdict: in the recorded search, each listing has a `price_badge` ( `GOOD` or `GREAT` on the first three) and a `predicted_price`, such as 89,702 against a list price of 90,412. Treat an evaluation as the site's view of a listing's price at the time of the call, not as a valuation of your own. If you need a model you control, the article on [used car listing data for price analysis](https://perceptlayer.com/blog/used-car-listing-data-price-analysis) covers the listing fields that predict price. ## What does paging a metro area cost? One credit per successful call, so the cost is the number of pages, which is listings ÷ `page_size`, rounded up. Read the market size from your first page rather than guessing it. The recorded search for used cars within 50 miles of 60601 reports `total_pages` 500 at `page_size` 20: | Step | Calls | Credits | | --- | --- | --- | | `taxonomy`, once | 1 | 1 | | `search`, all 500 pages | 500 | 500 | | `listing` for 200 cars you shortlist | 200 | 200 | | **Total** | **701** | **701** | That's 701 credits. The 100 free credits on signup cover a first test, such as the taxonomy call and 99 search pages; the full pull needs a pack, and a Starter pack of 10,000 credits covers it 14 times. A daily check of the first 5 pages of newest listings is 5 × 30 = 150 credits a month on top. Failed calls cost nothing and return `X-Credits-Used: 0`. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what credit packs cost. For another US source, the [CarGurus guide](https://perceptlayer.com/blog/cargurus-api-used-car-search) covers its search and dealer data. To try it now, run a search for your own ZIP in the playground on the [Cars.com API page](https://perceptlayer.com/apis/cars-com). ## APIs in this post - [Cars.com **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/cars-com) ## Frequently asked questions ### How much does the Cars.com API cost? Each of the 8 endpoints costs 1 credit per successful call, and failed calls cost nothing. Paging the recorded Chicago search's 500 pages is 500 credits, and each listing you open is one more. Every verified account gets 100 free credits on signup, and the [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Why do the listing endpoints need a ZIP code? `listing`, `dealer`, `media` and `model-reviews` all require `zip` alongside `listing_id` in their endpoint definitions. Store the ZIP you searched with next to each listing ID, and send the same pair when you open the listing. A call without `zip` fails with `invalid_parameters` and costs nothing. ### Can I search private sellers only? Yes. Add `seller_type[]=private_seller` to the search. The other values are `dealership` and `online_seller`, and you can repeat the parameter to include more than one. Private sellers are people, so use those listings for market analysis and don't contact sellers from the data without a lawful basis. ### What does stock\_type=cpo mean? `cpo` is certified pre-owned: used cars sold with a certification, usually through a manufacturer's programme. The other values are `used`, `new` and `all`. `stock_type` is required on search, so every search names one; use `all` when you want every listing in the radius. ### How do I get valid make and model values? Call `/v1/cars-com/taxonomy`, which takes no parameters and costs 1 credit, and use the slugs it returns in `makes[]` and `models[]`. `facets` with a `zip` shows the values available in one area. Fetch taxonomy once and cache it rather than calling it before every search. cars.com used cars car listings automotive price evaluation ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 8 min read ## [Autotrader Scraper or API: What You Get](https://perceptlayer.com/blog/autotrader-scraper-vs-api) An Autotrader UK scraper vs a 1-credit search call: a recorded BMW search near SW1A 1AA with 42,916 results, advert\_id, price.amount and year as JSON. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Aug 2026 Updated 10 Nov 2026 Perceptlayer 6 min read ## [AutoTrader UK API: Get Used Car Listings as JSON](https://perceptlayer.com/blog/autotrader-uk-api-listings-json) Search UK used car listings by postcode, make and price with one GET call. Real BMW response, 6 endpoints, 1 credit per call, failed calls free. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [AutoScout24 API: Search European Car Listings as JSON](https://perceptlayer.com/blog/autoscout24-api-car-listings-json) Search AutoScout24 listings as JSON: make\_id and price filters, a recorded BMW response, and what a monthly price sweep costs in credits. --- title: "CrewAI Tools: Build a Custom Tool for Live Web Data" description: "Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code." url: https://perceptlayer.com/blog/crewai-custom-tool-web-data --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # CrewAI Tools: Build a Custom Tool for Live Web Data 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read CrewAI tools are the functions a CrewAI agent can call: built-in ones from the `crewai-tools` package, tools loaded from an MCP server, or your own, written by subclassing `BaseTool` with a name, a description, a Pydantic argument schema and a `_run` method. This tutorial builds a custom tool that gives an agent live Google results through one API call, caps it at 5 searches per run with `max_usage_count`, and then shows the MCP route, which loads tools from a server instead of writing them. All the tool code below was tested; the crew itself wasn't run against a model. ## Key takeaways - A custom CrewAI tool is a `BaseTool` subclass with `name`, `description`, `args_schema` and `_run()`. The agent reads the description and the schema's field descriptions to decide when and how to call it. - `max_usage_count` caps how many times a tool runs. Set to 5, the 6th call returns "Tool 'web\_search' has reached its usage limit of 5 times" instead of calling the API. - The tool calls `GET /v1/google-search/search`, which costs 1 credit per successful call, so a capped run costs at most 5 credits. Failed calls cost nothing. - `MCPServerAdapter` from `crewai-tools` loads a remote MCP server's tools over `streamable-http` with an `Authorization` header, so the agent can search a catalogue of 2,782 endpoints instead of one. ## What are CrewAI tools? A CrewAI tool is anything an agent can call to act or fetch information: search the web, read a file, query a database. You give tools to an `Agent` in its `tools` list, and during a task the model decides which to call and with which arguments. CrewAI offers three ways to get them: the ready-made tools in the `crewai-tools` package, tools adapted from an MCP server with `MCPServerAdapter`, and custom tools you write. CrewAI's docs describe the custom route as subclassing `BaseTool` with a Pydantic `args_schema`, which gives the agent validated inputs and clear error messages ( [CrewAI: Create custom tools](https://docs.crewai.com/en/learn/create-custom-tools), 2026). Write a custom tool when you want control over what the agent sees. A raw API response can be long; a tool that returns five results with four fields each keeps the agent's context small and its behaviour predictable. It's also where you put limits, error messages written for a model, and the API key, so the key never appears in a prompt. We used `crewai` 1.15.30 and `crewai-tools` 1.15.30 on Python 3.13. CrewAI's API moves quickly, so check the version you install against its docs. If you use LangChain instead, [LangChain Custom Tool for Live Web Data](https://perceptlayer.com/blog/langchain-custom-tool-web-data) builds the same tool there. ## How do you build a custom CrewAI tool, step by step? The tool takes a search query, calls the Google Search endpoint, and returns the top five organic results as compact JSON. It has four parts: an input schema, the tool class, the HTTP call, and error handling the model can read. The five steps below install the packages, write and test the tool, and hand it to an agent in a one-task crew. ### Step 1: install CrewAI and set your keys ```bash pip install crewai crewai-tools requests export PERCEPTLAYER_API_KEY=sk_live_... ``` CrewAI also needs a model: it reads the model name from the `MODEL` environment variable and the provider's key from that provider's variable, as its LLM docs describe. Get a Perceptlayer key free at [/signup](https://perceptlayer.com/signup); keys start with `sk_live_`. ### Step 2: write the tool Save this as `web_search_tool.py`: ```python import json import os from typing import Type import requests from crewai.tools import BaseTool from pydantic import BaseModel, Field API = "https://api.perceptlayer.com" class WebSearchInput(BaseModel): query: str = Field(..., description="What to search for, as a person would type it into Google.") gl: str | None = Field(None, description="Optional two-letter country code, such as 'us' or 'de'.") hl: str | None = Field(None, description="Optional two-letter language code, such as 'en'.") class WebSearchTool(BaseTool): name: str = "web_search" description: str = ( "Search Google and return the top organic results as JSON: position, title, link and snippet. " "Use it for current facts, recent events and sources you can cite." ) args_schema: Type[BaseModel] = WebSearchInput max_usage_count: int | None = 5 # at most 5 searches (5 credits) per run def _run(self, query: str, gl: str | None = None, hl: str | None = None) -> str: params = {"query": query} if gl: params["gl"] = gl if hl: params["hl"] = hl resp = requests.get( f"{API}/v1/google-search/search", params=params, headers={"X-API-Key": os.environ["PERCEPTLAYER_API_KEY"]}, timeout=90, ) if resp.status_code != 200: error = resp.json().get("error", {}) if resp.content else {} wait = resp.headers.get("Retry-After") hint = f" Retry after {wait} seconds." if wait else "" return f"Search failed ({resp.status_code} {error.get('code', 'error')}): {error.get('message', '')}{hint}" results = [ {k: r.get(k) for k in ("position", "title", "link", "snippet")} for r in resp.json().get("organic_results", [])[:5] ] return json.dumps({"query": query, "results": results, "credits_used": resp.headers.get("X-Credits-Used")}) ``` The `description` and the `Field` descriptions are the tool's documentation for the model, so write them as instructions. The optional `gl` and `hl` map to the endpoint's country and language parameters; the [Google Search API page](https://perceptlayer.com/apis/google-search) lists the others, such as `location` and `device`. The 90-second timeout sits above the 60 seconds after which the API gives up on a slow source with a `timeout` error. ### Step 3: return errors the agent can act on A failed call returns a short sentence rather than raising, because an exception would end the agent's step while a sentence lets it decide what to do. Every error from the API has an HTTP status and a JSON body with a `code` and `message`, and a 429 carries `Retry-After`. Failed calls cost nothing: they return `X-Credits-Used: 0`. [MCP Tool Call Error Handling](https://perceptlayer.com/blog/mcp-tool-call-errors-agent-retries) covers which errors an agent should retry. ### Step 4: test the tool without a model You can run a tool directly with `tool.run(...)`, which is the fastest way to check it. We ran it with `requests.get` mocked to return the recorded response for `best restaurants in Berlin`: ```python from web_search_tool import WebSearchTool tool = WebSearchTool() print(tool.run(query="best restaurants in Berlin", hl="en")) ``` The output began: ```text {"query": "best restaurants in Berlin", "results": [{"position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. …"}, … ``` A mocked 429 returned `Search failed (429 rate_limited): Too many requests. Retry after 12 seconds.` After five calls, the sixth didn't reach the API at all and returned the usage-limit message. Note that the cap counts attempts, failed ones included, so it's a ceiling on spend rather than an exact count. ### Step 5: give the tool to an agent ```python from crewai import Agent, Crew, Process, Task from web_search_tool import WebSearchTool researcher = Agent( role="Market researcher", goal="Answer questions with current, sourced facts from the web", backstory="You check claims against live search results and cite the links you used.", tools=[WebSearchTool()], max_iter=6, verbose=True, ) task = Task( description="Find three independent sources on {topic} published this year and summarise what they agree on.", expected_output="A short summary with a bulleted list of the three source links.", agent=researcher, ) crew = Crew(agents=[researcher], tasks=[task], process=Process.sequential) result = crew.kickoff(inputs={"topic": "heat pump adoption in Germany"}) print(result) ``` We built this crew to check that it constructs with the tool attached, but didn't run `kickoff()`, which needs a model key. `max_iter` limits the agent's reasoning steps; `max_usage_count` limits the paid tool; you want both. ## How do you load tools from an MCP server instead? Load them with `MCPServerAdapter` when you want the agent to reach more than one endpoint without writing a tool for each. Perceptlayer's MCP server at `https://perceptlayer.com/mcp` exposes three tools: `search_endpoints` and `get_endpoint` look up the catalogue for free, and `call_endpoint` runs any of its 2,782 endpoints, spending credits only on success. ```python import os from crewai import Agent from crewai_tools import MCPServerAdapter server = { "url": "https://perceptlayer.com/mcp", "transport": "streamable-http", "headers": {"Authorization": f"Bearer {os.environ['PERCEPTLAYER_API_KEY']}"}, } with MCPServerAdapter(server, "search_endpoints", "get_endpoint", "call_endpoint") as tools: for tool in tools: if tool.name == "call_endpoint": tool.max_usage_count = 10 # cap paid calls per run analyst = Agent( role="Web data analyst", goal="Answer questions with data from the right website", backstory="You find the endpoint for a question before you call it.", tools=tools, ) # build the Task and Crew as above, then kickoff() inside this block ``` Install the extra with `pip install 'crewai-tools[mcp]'`. CrewAI's MCP docs recommend the context manager, as here, because it opens and closes the server connection for you ( [CrewAI: MCP servers as tools](https://docs.crewai.com/en/mcp/overview), 2026). We tested the adapter against a local run of the server's code: it listed the three tools, `get_endpoint` returned the parameters for `google-search.search`, and `call_endpoint` with an invalid key returned `Error invalid_api_key: Missing, unknown or revoked API key.` without charging anything. One finding from that test: the adapter sent `vertical: null` to `search_endpoints` when it wasn't set, and the server rejected the null, so for now tell the agent to pass a `vertical` (such as `search` or `real-estate`) or rely on `get_endpoint` with an endpoint ID you name in the task. The trade-off is reach versus control. The custom tool returns exactly the five fields you chose; `call_endpoint` returns the endpoint's full JSON, up to 100,000 characters, which costs more context. [Trim API Responses for LLM Context](https://perceptlayer.com/blog/trim-api-responses-llm-context) covers keeping that down, and [MCP vs Function Calling for Live Web Data](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) compares the two approaches. ## What does a crew run cost? Each successful search costs 1 credit, and with `max_usage_count = 5` a run can't make more than 5 paid calls. So the bill has a ceiling you can compute before you schedule anything: runs × cap. The lookups an MCP agent makes with `search_endpoints` and `get_endpoint` add nothing, because they're free. | Schedule | Worst case | Credits a month | | --- | --- | --- | | 10 runs a day, cap 5 | 10 × 5 × 30 | 1,500 | | 100 runs a day, cap 5 | 100 × 5 × 30 | 15,000, within the Build pack's 50,000 | | 100 runs a day, cap 3 | 100 × 3 × 30 | 9,000, within the Starter pack's 10,000 | Real runs usually stop before the cap. Every account gets 100 free credits once, after verifying an email address, enough for 20 runs at cap 5; a recurring schedule needs a pack. See [pricing](https://perceptlayer.com/pricing) for what credits cost and [Scheduled AI Agent Runs: Budgeting Credits per Run](https://perceptlayer.com/blog/scheduled-agent-credit-budget) for budgeting recurring crews. Requests share the account's rate limit, 1 a second on a free account, so a crew with several agents searching at once may see 429s; the tool passes the wait back to the agent. Start with the custom tool and one agent, run it with `verbose=True` to watch which queries it sends, then tighten the description and the cap. To see the data the tool returns before you write any code, run a search in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search). ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### What is the difference between crewai and crewai-tools? `crewai` is the framework: agents, tasks, crews and the `BaseTool` class. `crewai-tools` is a separate package of ready-made tools plus adapters such as `MCPServerAdapter`. A custom tool needs only `crewai`; loading MCP tools needs `crewai-tools` with its `mcp` extra. ### How do I limit how often an agent calls a tool? Set `max_usage_count` on the tool, as in `max_usage_count: int | None = 5`. Once it's reached, the tool returns a usage-limit message instead of running, and the agent has to answer with what it has. Combine it with the agent's `max_iter` to bound the whole run. The count includes failed attempts. ### Should a CrewAI tool raise exceptions or return error text? Return text for errors the agent can act on, such as a rate limit with the seconds to wait, a not-found result or invalid parameters. The model reads the message and adjusts. Raise only for problems no retry will fix, such as a missing API key in the environment, so the run stops early and visibly. ### Can a CrewAI agent use several Perceptlayer endpoints? Yes. Either write one custom tool per endpoint you need, which keeps each tool's output small, or load the MCP server's three tools so the agent can find and call any endpoint in the catalogue. Every endpoint call costs its listed credits, 1 for nearly all, and only on success. ### Does the custom tool work with async crews? The tool above implements the synchronous `_run`; CrewAI's docs show an `_arun` method for non-blocking I/O if you need one. For many parallel searches, keep the per-account rate limit in mind: a free account allows 1 request a second and a paying one at least 5. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rates per pack. crewai ai agents custom tools mcp python ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 7 Sept 2026 Perceptlayer 8 min read ## [OpenAI Agents SDK with a Remote MCP Server for Web Data](https://perceptlayer.com/blog/openai-agents-sdk-mcp-server) Connect the OpenAI Agents SDK to a Streamable HTTP MCP server with a Bearer header, cap call\_endpoint at 3 calls a question, and count credits per run. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. --- title: "Idealo API: Compare Product Prices Across Shops as JSON" description: "Search idealo.de by keyword, then pass a product_id to the offers endpoint. Endpoints, parameters, a real search response and the cost at 1 credit per call." url: https://perceptlayer.com/blog/idealo-api-price-comparison-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Idealo API: Compare Product Prices Across Shops as JSON 9 Oct 2026 Perceptlayer 9 min read To get idealo price comparison data as JSON, call `GET /v1/idealo/search` with a `query` to find products, then pass a product's `id` as `product_id` to `GET /v1/idealo/offers` for that product's offers. Each call costs 1 credit, and failed calls cost nothing. This guide walks through both calls, the parameters, a real search response and a cost estimate for a price monitor. ## Key takeaways - `/v1/idealo/search` returns products with `price`, `offer_count` and a `cheapest_offer` block (shop name, shipping cost) in a single call. - The `id` from a search result is the `product_id` that the product, offers, reviews and international prices endpoints take. - Idealo's 13 endpoints cost 1 credit each, so one search plus one offers call is 2 credits. - Prices come back as numbers ( `162.9`) with a currency code, and as formatted German-style strings ( `162,90 €`). - You get 100 free credits after verifying an email, enough for 50 search-plus-offers lookups. ## What does the idealo API return? The [Idealo API](https://perceptlayer.com/apis/idealo) on Perceptlayer exposes 13 endpoints on the price comparison site [idealo.de](https://www.idealo.de), all returning JSON and all costing 1 credit per successful call. They cover keyword search, products, offers, reviews, shop profiles, categories, deals and trending items. Data is collected from publicly available sources and returned as found at the time of the call. The endpoints fall into three groups, and most workflows touch only the first two. | Group | Endpoints | Use it to | | --- | --- | --- | | Find products | `search`, `autocomplete`, `brand-products`, `categories`, `trending` | Turn a keyword, brand or category into product IDs | | Compare prices | `product`, `products`, `offers`, `international-prices` | Get offers and prices for a known product | | Context | `reviews`, `shop`, `shop-products`, `deals` | Add ratings, seller details and discounted items | The site sits in the [Marketplaces](https://perceptlayer.com/verticals/marketplaces) area of the catalogue, alongside other shopping sources. If you also need Google's view of the same products, see the [Google Shopping API guide](https://perceptlayer.com/blog/google-shopping-api-product-prices). ## How do you authenticate and make the first call? You need a Perceptlayer API key (they start with `sk_live_`), sent in the `X-API-Key` header. [Get a free API key](https://perceptlayer.com/signup) by verifying an email address: that gives you 100 free credits on signup, no credit card. Where a client can't set headers, the `api_key` query parameter works instead; see the [authentication docs](https://docs.perceptlayer.com/authentication). Search is the natural first call. `query` is optional on this endpoint, but a keyword is what makes the result useful: ```bash curl "https://api.perceptlayer.com/v1/idealo/search?query=air+fryer" \ -H "X-API-Key: $API_KEY" ``` Every successful response carries `X-Credits-Used` and `X-Credits-Remaining` headers, so you can watch the balance from the response itself. More on requests and responses is in the [requests docs](https://docs.perceptlayer.com/requests). ## Which parameters does the search endpoint take? `GET /v1/idealo/search` takes eight optional parameters and no required ones. A `query` of up to 200 characters searches by keyword, `category_id` narrows to one category, and `price_min` and `price_max` bound the price. `sort` and `item_states[]` accept fixed values, listed below, and `page` moves through results. | Parameter | Type | Notes | | --- | --- | --- | | `query` | string | Up to 200 characters | | `category_id` | string | Restrict to one category | | `page` | integer | Results page | | `sort` | string | `RELEVANCE_DESC`, `PRICE_ASC`, `PRICE_DESC`, `DISCOUNT_DESC`, `CREATION_DATE_DESC` | | `filters[]` | list of string | Facet filters | | `item_states[]` | list of string | `BARGAIN`, `SHORT_TERM_BARGAIN`, `EXCLUDE_USED`, `FAST_DELIVERABLE` | | `price_min` | number | Lower price bound | | `price_max` | number | Upper price bound | The docs for this endpoint don't state defaults or page sizes, so check the response's `pagination` block instead of assuming. To get category IDs, call `/v1/idealo/categories`, which takes no parameters. For type-ahead input, `/v1/idealo/autocomplete` takes a required `query` (up to 100 characters) and an optional `limit`. ## What does a search response look like? A search response is a JSON object with a `results` array of products, plus facets, pagination and the category. Each product carries its `id`, `title`, a numeric `price`, a `currency`, an `offer_count` and a `cheapest_offer` object. The excerpt below is a recorded response for `query=air fryer`, trimmed with `…`. ```json { "success": true, "query": "air fryer", "category_id": "3513", "sort": "RELEVANCE_DESC", "results": [ { "id": "203597427", "type": "PRODUCT", "title": "Ninja AF500", "subheading": "Heißluftfritteuse", "category_id": "3513", "url": "https://www.idealo.de/preisvergleich/OffersOfProduct/203597427_-af500-ninja.html", "price": 162.9, "price_formatted": "162,90 €", "currency": "EUR", "offer_count": 80, "rating": { "user_review_count": 453, "score_percent": 100, "test_rating": "2,0" }, "cheapest_offer": { "offer_key": "7abc0f760d8206c9f1c6127689df9ed0", "shop_id": "301558", "shop_name": "alza.de", "shipping_costs": "4,99 €", "shipping_is_free": false }, … }, … ], "pagination": { "page": 1, "page_size": 36, "total_pages": 112, "has_more": true, "total_results": 4805, … }, "category": { "id": "3513", "title": "Fritteusen" }, … } ``` A few details matter when you parse it. The category title and facet names ( `Hersteller`, `Produkttyp`) are in German, because the source is the German site. `price` is a number and `price_formatted` is a display string with a decimal comma, so use `price` for any calculation. And `shipping_costs` is a string, not a number, so parse it before adding it to a total. Note that search matched this query to category `3513` (Fritteusen) on its own, and reports it in the response. This is the first thing to check if results look off. ## How do you get the offers for a product? Pass the `id` from a search result as `product_id` to `GET /v1/idealo/offers` to get the offers for that product. The `offer_count` in the search result (80 for the Ninja AF500 in the recorded response) gives you a number to compare against what comes back, since the endpoint also takes `page` and `all`. ```bash curl "https://api.perceptlayer.com/v1/idealo/offers?product_id=203597427&include_shop_ratings=true" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `product_id` | string | yes | The `id` from search or products | | `page` | integer | no | Next page of offers | | `all` | boolean | no | Request the full offer list | | `include_shop_ratings` | boolean | no | Add shop ratings to each offer | We haven't recorded an offers response for this guide, so there's no excerpt here. Run the call in the playground on the [Idealo offers page](https://perceptlayer.com/apis/idealo/offers) with your own key to see the exact fields, and print the keys before you write a parser. That's a better habit than trusting any guide, including this one. ### Worked example: from keyword to saved offers This Python script searches for a keyword, sorts by price, takes the three cheapest products, and fetches the offers for each. It prints what the search response already tells you (title, lowest price, offer count, cheapest shop) and saves each raw offers response to a JSON file for inspection. It needs only `requests`. ```python import json import os import requests BASE = "https://api.perceptlayer.com/v1/idealo" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): r = requests.get(f"{BASE}/{path}", headers=HEADERS, params=params, timeout=30) r.raise_for_status() return r.json() search = get("search", query="air fryer", sort="PRICE_ASC") offers_by_product = {} for product in search["results"][:3]: cheapest = product.get("cheapest_offer", {}) print( product["title"], product["price"], product["currency"], f'{product["offer_count"]} offers', cheapest.get("shop_name"), ) offers_by_product[product["id"]] = get("offers", product_id=product["id"]) for product_id, offers in offers_by_product.items(): print(product_id, list(offers.keys())) with open(f"offers_{product_id}.json", "w") as f: json.dump(offers, f, ensure_ascii=False, indent=2) ``` That is 1 search call plus 3 offers calls: 4 calls × 1 credit = 4 credits, assuming one offers call per product. The final loop prints the top-level keys of each offers response and saves the full body, so you can pick the fields you need before writing real parsing code; the price table is the next step, built from those fields. The search results here are the cheapest matches, not the best matches: use `sort=RELEVANCE_DESC` (the default in the recorded response) for relevance. Handle failures with the patterns in [handling API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python), and read [the errors docs](https://docs.perceptlayer.com/errors) for the full list of codes. ## What else can you look up for a product? Once you have a `product_id`, four more endpoints take it, each at 1 credit. `product`, `reviews` (with an optional `page`) and `international-prices` take a `product_id`, and `products` accepts a list of IDs through `ids[]` for batch lookups. We haven't recorded responses for these, so check their fields in the playground. Shops have their own pair: `shop` takes a `shop_id`, and `shop-products` takes a `shop_id` plus a `category_id`. | Endpoint | Required | What it adds | | --- | --- | --- | | `/v1/idealo/product` | `product_id` | Product data for one ID | | `/v1/idealo/products` | none ( `ids[]`) | Several products in one call | | `/v1/idealo/reviews` | `product_id` | Reviews for the product, paged | | `/v1/idealo/international-prices` | `product_id` | International prices for the product | | `/v1/idealo/shop` | `shop_id` | A shop's profile | | `/v1/idealo/shop-products` | `shop_id`, `category_id` | What one shop lists in a category | Each search result also carries a `url` field with the product's idealo.de address (for example [this Ninja AF500 page](https://www.idealo.de/preisvergleich/OffersOfProduct/203597427_-af500-ninja.html)), which is handy for spot-checking a result by eye. The `shop_id` in `cheapest_offer` (here `301558` for alza.de) is the value the shop endpoints expect. That links the two halves of the data: from a product to the shops selling it, and from a shop back to its catalogue. For discovery without a keyword, [`brand-products`](https://perceptlayer.com/apis/idealo/brand-products) lists products by `brand` or `brand_id`, and [`deals`](https://perceptlayer.com/apis/idealo/deals) takes a required `category_id` with an optional `deal_type` of `bargain` or `short_term`. ## How much does it cost to monitor prices? Every Idealo endpoint costs 1 credit per successful call, so cost is the number of calls. The figures below are minimums: they assume one offers call per product. The endpoint also takes `page` and `all`, and each extra call you make with them is another credit. Failed calls cost nothing and return `X-Credits-Used: 0`. A price monitor that refreshes offers for a fixed watchlist spends at least one credit per product per refresh, plus a one-time search or `products` call to discover the IDs. | Job | Calls (minimum) | Credits (minimum) | | --- | --- | --- | | One keyword, offers for the top 3 products | 1 + 3 | 4 | | 200 products, offers refreshed daily for 30 days | 200 × 30 × 1 | 6,000 | | Same watchlist, refreshed weekly (4 runs) | 200 × 4 × 1 | 800 | | 50 search-plus-offers lookups | 50 × 2 × 1 | 100 | The free tier's 100 credits, granted once, cover the last row, or 25 runs of the first. The weekly watchlist (800 credits a month) and the daily one (at least 6,000) are a purchase: credits come in prepaid packs starting at 10,000, last 12 months, and have no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and [the credits docs](https://docs.perceptlayer.com/credits) for how they're debited. If you don't need hourly data, cache responses between runs; the [caching guide](https://perceptlayer.com/blog/cache-web-data-api-responses) shows how TTLs turn into saved credits. For paged results, use the [pagination guide](https://perceptlayer.com/blog/paginate-web-data-api-python). For a full scheduler built on a similar source, read [building a price tracking agent in Python](https://perceptlayer.com/blog/price-tracking-agent-python). ## When is the idealo API the wrong tool? This endpoint set fits one job: you want to compare offers for one product, starting from search results that already show the cheapest shop and its shipping cost. The recorded response is in euros with German-language fields, so that's the market it was recorded against. It's the wrong tool when you need a contractual feed from the shop itself, since Perceptlayer returns publicly available data as found. Check your use case against the site's own terms before building on the data. The `product_id` is an idealo ID, so it only works with the idealo endpoints. If you compare idealo prices against another store, plan on matching items yourself; the post on [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers matching without shared IDs. For a US-style product search, the [Walmart product search guide](https://perceptlayer.com/blog/walmart-product-search-api) is the closer fit, and [Mercado Libre](https://perceptlayer.com/blog/mercado-libre-api-product-search) covers Latin America. Two practical limits apply to any live data. Prices change between calls, and a response is what the page showed at that moment. Requests also have no idempotency key, so if a client timeout loses a reply, the call may have succeeded and been billed. ## Can an AI agent call the idealo endpoints? Yes. The Perceptlayer MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing; `call_endpoint` runs an endpoint such as `/v1/idealo/search` and spends its credits on success only. An agent can then answer "who sells this cheapest?" from live data. To add it in Claude Code: ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover the other clients. Keep in mind that a search response is large (facets, price buckets, related queries), so trim what you hand a model; [trimming API responses for LLM context](https://perceptlayer.com/blog/trim-api-responses-llm-context) shows how. Next step: open the playground on the [Idealo API page](https://perceptlayer.com/apis/idealo), run a search for a product you care about, then paste its `id` into the offers endpoint. ## APIs in this post - [Idealo **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/idealo) ## Frequently asked questions ### Is there an official idealo API? The Idealo API on Perceptlayer isn't a feed from the shop itself. Perceptlayer collects data from publicly available sources and returns it as found at the time of the call. If you need contractual terms from the site, ask the site directly and check your use case before building on the data. ### How much does an idealo API call cost? Each of the 13 Idealo endpoints costs 1 credit per successful call. A search followed by an offers lookup is 2 credits. Failed calls cost nothing and return `X-Credits-Used: 0`. Free accounts get 100 credits after email verification, with no credit card, and the [pricing page](https://perceptlayer.com/pricing) lists what paid credits cost. ### How do I get all offers for a product? Call `/v1/idealo/offers` with the `product_id` from search. The endpoint also takes `page` for further results and an `all` boolean. Compare the `offer_count` in the search result with what you receive to confirm you've got everything, and print a real response in the playground first to see the field names. ### What are the rate limits? Limits apply per account, counted per minute. Free accounts get 1 request a second (60 a minute), and paying accounts run at least 5 a second (300 a minute). A 429 response includes a `Retry-After` header with the seconds to wait. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain how packs set the rate. ### Which currency and language do results use? In the recorded search response the currency is `EUR`, prices have a numeric `price` plus a German-formatted `price_formatted`, and category and facet names are German ( `Fritteusen`, `Hersteller`). Use the numeric field for calculations. For other countries' prices of the same product, see the [international prices endpoint](https://perceptlayer.com/apis/idealo/international-prices). price comparison idealo europe ecommerce offers ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Amazon Product API: Search, Offers and Reviews as JSON](https://perceptlayer.com/blog/amazon-product-api-json) Search Amazon by keyword, then look each asin up with product, offers, rating-summary and customers-say. Domain values per endpoint, 1 credit a call. --- title: "MCP Server Authentication: API Keys vs OAuth | Perceptlayer" description: "The MCP spec makes OAuth 2.1 optional for remote servers. When a static API key in an Authorization header fits better, and how clients send one." url: https://perceptlayer.com/blog/mcp-server-api-key-vs-oauth --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # MCP Server Authentication: API Keys vs OAuth 7 Oct 2026 Perceptlayer 8 min read MCP server authentication comes in two shapes. The MCP specification defines an OAuth 2.1 flow for remote servers, but it makes authorization optional and lets clients and servers agree on their own scheme. For a server that acts for one account, a static API key sent as `Authorization: Bearer sk_live_...` is the simpler fit. OAuth earns its complexity when a server acts on behalf of many users who each sign in. ## Key takeaways - The MCP spec marks authorization OPTIONAL; HTTP-based servers that support it SHOULD follow its OAuth 2.1 profile, and STDIO servers SHOULD read credentials from the environment instead. - A server that follows the spec must publish OAuth 2.0 Protected Resource Metadata (RFC 9728) and point clients to it from a `401` response's `WWW-Authenticate` header. - A static key in a request header suits a server where the caller already has an account and a key: no consent screen, no token refresh, one value to rotate. - Perceptlayer's server at `https://perceptlayer.com/mcp` reads `Authorization: Bearer` or `X-API-Key`; `search_endpoints` and `get_endpoint` work without a key, and `call_endpoint` needs one. - Whichever you choose, never forward the client's token to another service: the spec forbids token passthrough. ## What does the MCP specification require for authentication? Less than many guides imply. The specification says authorization is OPTIONAL for MCP implementations. When it's supported, implementations using an HTTP-based transport SHOULD conform to the spec's authorization section, and implementations using STDIO SHOULD NOT, retrieving credentials from the environment instead. Clients and servers MAY also negotiate their own custom authentication and authorization strategies ( [MCP specification, Authorization](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization), 2025). If a server does follow the spec's OAuth profile, the requirements are firm. The server is an OAuth 2.1 resource server. It MUST implement OAuth 2.0 Protected Resource Metadata (RFC 9728), which tells clients which authorization server issues its tokens, and it signals that metadata through the `WWW-Authenticate` header on a `401` response. Clients MUST send the RFC 8707 `resource` parameter so tokens are bound to that server, and the server MUST reject tokens not issued for it ( [MCP specification, 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization), 2026). How clients register with the authorization server has shifted between revisions. The 2025-11-25 revision made Client ID Metadata Documents the recommended route and moved Dynamic Client Registration from SHOULD to MAY, per the revision's own compatibility tables as summarised by Keycloak ( [Keycloak, Integrating with MCP](https://www.keycloak.org/securing-apps/mcp-authz-server), 2026). If you build the OAuth route, read the revision your clients speak, not a blog post from last year. ## When is a static API key the better fit? When the server acts for an account the caller already has, and the person configuring the client is the person paying for the calls. That's most data and developer-tool APIs. The user creates a key in a dashboard, pastes it into the client's config once, and every request carries it. There's no consent screen to build, no tokens to refresh and no authorization server to run. OAuth is the better fit when the server acts on behalf of users who shouldn't hand over a long-lived secret: a server that reads someone's mailbox, calendar or CRM. There, the user signs in through the provider, approves scopes, and the client holds a short-lived token it can lose without much damage. It's also the better fit when the client is a hosted app that many users connect, because each user needs their own grant. | Question | Static API key | OAuth 2.1 (spec profile) | | --- | --- | --- | | Who is the caller? | The account owner, or their own agent | Many users, each signing in | | Setup in the client | Paste a header value once | Sign-in flow, consent screen | | What the server must run | Key lookup | Protected Resource Metadata, an authorization server, token validation | | Credential lifetime | Until rotated or revoked | Short-lived tokens, refreshed | | Scope | Everything the account can do | Scopes the user approved | | Where it breaks down | Sharing one key across many people | More moving parts per client | The weak spot of a key is that it's long-lived and broad. Treat it like a password: keep it out of committed config files, give each machine or agent its own key so you can revoke one without the others, and rotate it if it leaks. The [authentication docs](https://docs.perceptlayer.com/authentication) cover creating, rotating and revoking keys. ## How does Perceptlayer's MCP server read the key? It reads the key from the request headers on every call. The server at `https://perceptlayer.com/mcp` speaks Streamable HTTP and is stateless: each POST is one JSON-RPC message. It takes the key from `Authorization: Bearer ` and falls back to `X-API-Key`. Keys start with `sk_live_`. There's no OAuth flow and no sign-in screen. Not every tool needs the key. `search_endpoints` and `get_endpoint` only look up the catalogue, so they're public, like the API reference, and cost nothing. `call_endpoint` runs an endpoint, so it needs the key, and it goes through the same path as a direct API call: the same key check, parameter validation, rate limits and credits. A successful call spends the endpoint's credits, 1 for `/v1/google-search/search`, and a failed one spends nothing. Two details follow from that design. The server takes the key only from headers: if a model puts an `api_key` field in a tool call's parameters, the server drops it, so a key never travels in a prompt or a URL. And because catalogue lookups are public, a missing key doesn't produce an HTTP `401` with a `WWW-Authenticate` challenge; `tools/list` succeeds, and `call_endpoint` returns a tool error instead. ## What happens when a call has no key? A worked example Here's the path of one request from a client that was configured without a header. We haven't run these requests against the live server for this article; the behaviour below is read from the server's code. First, the client lists tools. That works, because listing is public. The model then picks `call_endpoint` and the client sends a JSON-RPC request like this one: ```json { "jsonrpc": "2.0", "id": 7, "method": "tools/call", "params": { "name": "call_endpoint", "arguments": { "endpoint": "google-search.search", "params": { "query": "mcp authorization spec" } } } } ``` The server finds no `Authorization` or `X-API-Key` header and runs the call anyway, so the key check fails the same way a direct API call would. The result comes back as a tool error, not an HTTP error. Its text is `Error invalid_api_key:` followed by the API's message, "Missing, unknown or revoked API key.", and, because no key was sent at all, a hint: "No API key was sent: add 'Authorization: Bearer ' to this MCP server's configuration." It ends with the request ID. No credits are spent. That hint is meant for the model as much as the person. An agent that reads it can tell the user exactly what to fix, instead of retrying. With a valid key in the header, the same request returns the endpoint's JSON, followed by `Credits used: 1.` and `Credits remaining:` with the balance after the call. The same applies to the other errors. A wrong parameter returns `invalid_parameters`, an exhausted balance `insufficient_credits`, a rate limit `rate_limited` with the seconds to wait. Each is a tool error with a code the model can act on; the [errors docs](https://docs.perceptlayer.com/errors) list them all. ## How do clients send the key? Each client has its own place for a header. The setups below come from the [AI agents docs](https://docs.perceptlayer.com/ai-agents). Claude Code takes it on the command line: ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp \ --header "Authorization: Bearer $API_KEY" ``` Cursor and VS Code take it in their `mcp.json` files. VS Code can prompt for the key once and store it, which keeps it out of the file: ```json { "inputs": [ { "type": "promptString", "id": "perceptlayer-key", "description": "Perceptlayer API key", "password": true } ], "servers": { "perceptlayer": { "type": "http", "url": "https://perceptlayer.com/mcp", "headers": { "Authorization": "Bearer ${input:perceptlayer-key}" } } } } ``` Claude Desktop adds remote servers as custom connectors, where request headers are a beta not every account has yet; our guide to [adding an MCP server to Claude Desktop and Cursor](https://perceptlayer.com/blog/add-mcp-web-data-tools-claude-desktop) covers that and a config-file fallback. In your own code, SDKs that connect to Streamable HTTP servers accept headers on the transport. ## What should a key-based server still get right? The rules that protect OAuth servers mostly apply to key-based ones too. The spec says an MCP server MUST NOT pass through the token it received from the client to another API, because the downstream service would trust a credential it never validated, and audit logs and rate limits stop meaning anything ( [MCP Security Best Practices](https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices), 2026). A key-based server should resolve the key to an account and call its own backends with its own credentials. Beyond that: accept keys only over HTTPS, never in query strings a client might log, and answer a bad key with an error the model can read. Meter and rate-limit per account, not per key, so creating more keys doesn't buy more capacity; our post on [MCP server rate limiting](https://perceptlayer.com/blog/mcp-server-rate-limiting-agents) goes into the limits. And keep the expensive tools behind the key while discovery stays open, so an agent can learn what's available before anyone has configured anything. To try the key-based setup, [get a free API key](https://perceptlayer.com/signup), add the server to your client with the header, and ask a question that needs a live search through the [Google Search API](https://perceptlayer.com/apis/google-search). Every verified account gets 100 free credits on signup; [pricing](https://perceptlayer.com/pricing) has the packs. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Does the MCP spec require OAuth? No. The specification makes authorization optional. If an HTTP-based server supports it, it should follow the spec's OAuth 2.1 profile, with Protected Resource Metadata (RFC 9728) and resource-bound tokens. STDIO servers should read credentials from the environment instead, and clients and servers may agree on their own scheme, such as an API key header. ### Is an API key in an MCP config secure enough? For a server that acts for your own account, it can be, if you handle it like a password. Keep it out of committed files, use one key per machine or agent, send it only over HTTPS and rotate it if it leaks. For a server that acts on behalf of many users' private data, OAuth's short-lived, scoped tokens are the safer design. ### Which header does Perceptlayer's MCP server read? `Authorization: Bearer sk_live_...`, with `X-API-Key` as a fallback. The server ignores an `api_key` sent inside a tool call's parameters, so the key never travels through the model. `search_endpoints` and `get_endpoint` work without a key; `call_endpoint` needs one and spends credits only on success. ### What does an MCP client see when the key is missing? On Perceptlayer's server, listing tools still works. `call_endpoint` returns a tool error starting `Error invalid_api_key:`, with a hint to add an `Authorization: Bearer` header to the server's configuration and the request ID. No credits are spent, and the model can relay the fix to the user. ### Can a client switch between OAuth and API key servers? Yes. A client that supports custom headers can talk to a key-based server, and one that implements the spec's OAuth flow can talk to an OAuth server. Many clients support both, but header support varies, and Claude Desktop's request headers are still a beta. Check your client's docs for where it takes headers. mcp authentication oauth api keys ai agents ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 11 Oct 2026 Perceptlayer 7 min read ## [Remote MCP Server: Streamable HTTP vs Local stdio](https://perceptlayer.com/blog/remote-mcp-server-streamable-http) A remote MCP server runs over Streamable HTTP: one POST endpoint, auth headers, Origin checks, no sessions. Real responses, and when stdio fits better. --- title: "Vrbo API: Vacation Rental Listings and Availability" description: "Search Vrbo with required check_in and check_out, then pull a listing's availability and reviews by property_id. Parameters, cURL and the cost of 50 listings." url: https://perceptlayer.com/blog/vrbo-api-vacation-rental-listings --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Vrbo API: Vacation Rental Listings and Availability 7 Oct 2026 Perceptlayer 7 min read Vrbo has no public API for searching its rentals; its inventory reaches other sites through Expedia Group's partner API, which is open to a limited set of partners. To read Vrbo listings as JSON, call `GET /v1/vrbo/search` with the two required dates, `check_in` and `check_out`, and a `destination` or `region_id`. Each successful call costs 1 credit. `listing`, `listing-availability` and `listing-reviews` then take the `property_id`. ## Key takeaways - The flow is `destinations` (a place name as `query`), then `search` (required `check_in` and `check_out`), then per-property calls by `property_id`. - Search filters include `min_price`, `max_price`, `price_type` ( `nightly` or `total`), `bedrooms`, `sort` and amenity and house-rule filters, with `limit` and `offset` for paging. - `listing-availability` takes a `property_id` with optional `start_date` and `end_date`, so one call covers a date range for one property. - `listing-reviews` sorts by `relevant`, `newest`, `highest_rated` or `lowest_rated`, with `limit` and `offset`. - All 6 Vrbo endpoints cost 1 credit per successful call. Checking availability for 50 listings found in 3 search pages is 3 + 50 = 53 credits. ## Is there an official Vrbo API? Not for the public. Vrbo is part of Expedia Group, and its listings reach other travel sites through Expedia Group's Rapid API. The developer documentation for that API says Vrbo inventory is currently available only to a limited number of partners ( [Expedia Group Developer Hub](https://developers.expediagroup.com/rapid/lodging/vacation-rentals/about-vacation-rentals-api), 2026). Its integration guide adds that Vrbo properties on Rapid are whole properties with a single unit, and support geography, content, guest reviews, availability and booking APIs ( [Vrbo on Rapid integration guide](https://developers.expediagroup.com/rapid/lodging/vacation-rentals/vrbo-integration-guide), 2026). If you're a travel company that wants to sell and book Vrbo stays, apply for that partnership: it's the only route that books. If you want to read listings, prices, availability and reviews for research, pricing analysis or an agent, the [Vrbo API](https://perceptlayer.com/apis/vrbo) returns them as JSON with one key and no partnership. It doesn't book anything. Data is collected from publicly available sources and returned as found at the time of the call. ## Which Vrbo endpoints are there? Six GET endpoints, each 1 credit per successful call. Two help you build a search ( `destinations` and `filters`), one runs it, and three work on one property. The per-property endpoints all need a `property_id`, which you take from the search results. The table lists each with its required parameters. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | [`/v1/vrbo/destinations`](https://perceptlayer.com/apis/vrbo/destinations) | Destination matches | `query` | none | | [`/v1/vrbo/filters`](https://perceptlayer.com/apis/vrbo/filters) | Available search filters | none | dates, guests, `destination`, `region_id`, `map_bounds` | | [`/v1/vrbo/search`](https://perceptlayer.com/apis/vrbo/search) | A page of rentals | `check_in`, `check_out` | 35 others, plus `limit`, `offset` | | [`/v1/vrbo/listing`](https://perceptlayer.com/apis/vrbo/listing) | One rental | `property_id` | `check_in`, `check_out`, `adults`, `children` | | [`/v1/vrbo/listing-availability`](https://perceptlayer.com/apis/vrbo/listing-availability) | Its availability | `property_id` | `start_date`, `end_date` | | [`/v1/vrbo/listing-reviews`](https://perceptlayer.com/apis/vrbo/listing-reviews) | Its reviews | `property_id` | `sort`, `limit`, `offset` | `destinations` turns a place name into something search can use: send `query=Lake Tahoe` and read the matches. `filters` returns the filter options for a destination and dates, which tells you the values the amenity and house-rule parameters accept. ## How do you search Vrbo rentals? Send `check_in` and `check_out`, both required, with a `destination` (free text up to 120 characters) or a `region_id` from `destinations`. Add `adults` and `children` for the party, and `limit` and `offset` to page. This request asks for rentals in Lake Tahoe for a week in July, for four adults, cheapest first: ```bash curl "https://api.perceptlayer.com/v1/vrbo/search?destination=Lake+Tahoe&check_in=2027-07-10&check_out=2027-07-17&adults=4&sort=price_low_to_high" \ -H "X-API-Key: $API_KEY" ``` Keys go in the `X-API-Key` header and start with `sk_live_`. [Get a free API key](https://perceptlayer.com/signup); the [authentication docs](https://docs.perceptlayer.com/authentication) explain the header and its query-string fallback. ### Which search parameters matter most? Search takes 39 parameters. Most are filters for amenities, rules and bed types, and each of those is a string of up to 300 characters whose values come from `filters`. These are the ones most projects use: | Parameter | Type | Notes | | --- | --- | --- | | `check_in`, `check_out` | string, required | Stay dates | | `destination` | string | Up to 120 characters | | `region_id` | string | From `destinations` | | `map_bounds` | string | Search a map area instead | | `adults` | integer | Number of adults | | `children` | string | Children in the party | | `sort` | string | `recommended`, `price_low_to_high`, `price_high_to_low`, `review`, `review_count` | | `min_price`, `max_price` | integer | Price bounds | | `price_type` | string | `nightly` or `total` | | `bedrooms`, `bathrooms`, `beds` | integer | Room and bed counts | | `premier_host`, `virtual_tour` | string | `true`, `false`, `1` or `0` | | `free_cancellation`, `amenities`, `house_rules` | string | Values from `filters` | | `limit`, `offset` | integer | Paging | `price_type` decides how `min_price` and `max_price` are read: as a nightly rate or as the total for the stay. Pick one and keep it fixed, or price bands from different runs won't compare. Prices in the response come both ways, so you can store either. ### What does a search response contain? Our recorded search for `destination=Lake Tahoe, California&check_in=2026-12-10&check_out=2026-12-13&adults=2` returned `total_results` 361, 20 properties per page ( `limit` 20, `next_offset` 20) and a `properties` array. The second property, trimmed with `…`: ```json { "success": true, "data": { "destination": "Lake Tahoe, California", "check_in": "2026-12-10", "check_out": "2026-12-13", "sort": "recommended", "total_results": 361, "pagination_label": "1 - 50 of 300+", "offset": 0, "limit": 20, "has_more": true, "next_offset": 20, "properties": [ …, { "property_id": "33933784", "url": "https://www.vrbo.com/503284", "listing_id": "503284", "overview": "House · 2 bedrooms · 4 beds", "property_type": "House", "bedrooms": 2, "beds": 4, "rating": 9.8, "rating_scale": 10, "rating_label": "Exceptional", "review_count": 161, "price": { "currency": "USD", "nightly": 280, "nightly_original": 289, "stay_total": 839, "stay_total_text": "$839 for 3 nights", "nights": 3, "fees_note": "All fees included" }, … }, … ] } } ``` `property_id` is what the listing, availability and reviews endpoints take; `listing_id` is the number in the Vrbo URL, and they differ. Ratings are out of 10 ( `rating_scale`), not 5, so convert before comparing with other sites. `nightly_original` next to `nightly` shows a discount, 289 down to 280 here, and `fees_note` says the stay total includes fees. The `pagination_label` reads "1 - 50 of 300+" while `limit` is 20 and `total_results` is 361, so page by `next_offset` and `has_more`, not by the label. ## How do you check a listing's availability? Call `GET /v1/vrbo/listing-availability` with the `property_id`, and narrow it with `start_date` and `end_date`. One call returns availability for one property over the range you ask for, so you don't have to run a search per date to see when a rental is free. This is the call to schedule if you track occupancy or open dates over time. ```bash curl "https://api.perceptlayer.com/v1/vrbo/listing-availability?property_id=$PROPERTY_ID&start_date=2027-06-01&end_date=2027-08-31" \ -H "X-API-Key: $API_KEY" ``` Blocked dates on a calendar can mean a booking or an owner's own block; a calendar can't tell you which. Treat a newly blocked date as a signal rather than as a confirmed booking. `listing` takes the same `property_id`, with optional `check_in`, `check_out`, `adults` and `children` if you want the details priced for a stay. Reviews come from `listing-reviews`, sorted `newest` when you only want what's arrived since your last run: ```bash curl "https://api.perceptlayer.com/v1/vrbo/listing-reviews?property_id=$PROPERTY_ID&sort=newest&limit=20" \ -H "X-API-Key: $API_KEY" ``` Reviews are written by guests. Keep ratings, dates and text if you need them, and drop names unless you have a reason and a lawful basis to keep them. ## How do you check availability for 50 listings in Python? Page through a search with `next_offset` until you have 50 `property_id` values, then call `listing-availability` for each and save the response. The script uses the search fields from the recording above; we haven't recorded an availability response, so it stores each calendar as returned. It counts the credits it spends. ```python import json import os import requests BASE = "https://api.perceptlayer.com/v1/vrbo" HEADERS = {"X-API-Key": os.environ["API_KEY"]} SEARCH = {"destination": "Lake Tahoe, California", "check_in": "2026-12-10", "check_out": "2026-12-13", "adults": 2} RANGE = {"start_date": "2027-06-01", "end_date": "2027-08-31"} spent, ids, offset = 0, [], 0 while len(ids) < 50: r = requests.get(f"{BASE}/search", params={**SEARCH, "offset": offset}, headers=HEADERS, timeout=60) r.raise_for_status() spent += int(r.headers["X-Credits-Used"]) data = r.json()["data"] ids += [p["property_id"] for p in data["properties"]] if not data.get("has_more"): break offset = data["next_offset"] for pid in ids[:50]: r = requests.get(f"{BASE}/listing-availability", params={"property_id": pid, **RANGE}, headers=HEADERS, timeout=60) if r.status_code != 200: print(pid, r.status_code, r.json()["error"]["code"]) continue spent += int(r.headers["X-Credits-Used"]) with open(f"vrbo-{pid}-availability.json", "w") as f: json.dump(r.json(), f) print("credits used:", spent) ``` A property that fails prints its error code and adds nothing to `spent`. On a `rate_limited` (429) response, wait the seconds in `Retry-After`; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain per-account limits. ## What does a 50-listing availability check cost? Every Vrbo endpoint costs 1 credit per successful call, so the cost is searches plus one call per property. At the recorded 20 properties a page, 50 listings take 3 search pages. Availability for each is 50 calls, so one check is 3 + 50 = 53 credits. Add the newest reviews for each and it's 103. | Step | Calls | Credits | | --- | --- | --- | | `search`, 3 pages of 20 | 3 | 3 | | `listing-availability` × 50 | 50 | 50 | | `listing-reviews` × 50, optional | 50 | 50 | | **Total with reviews** | **103** | **103** | Run the availability check weekly and it's 53 × 4 = 212 credits a month; with reviews, 103 × 4 = 412. The 100 free credits on signup cover one availability check (53 credits) but not one with reviews (103), so a weekly run needs a pack; the Starter pack's 10,000 covers a year of either (12 × 412 = 4,944). Failed calls return `X-Credits-Used: 0`. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what credit packs cost. For the same work on Airbnb, the [Airbnb listings data guide](https://perceptlayer.com/blog/airbnb-listings-data-api) covers its endpoints. To try Vrbo, run a search for your own dates in the playground on the [Vrbo API page](https://perceptlayer.com/apis/vrbo). ## APIs in this post - [Vrbo **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/vrbo) ## Frequently asked questions ### How much does the Vrbo API cost? Each of the 6 Vrbo endpoints costs 1 credit per successful call, and failed calls cost nothing. Availability for 50 listings, found in 3 search pages, is 53 credits. Every verified account gets 100 free credits on signup, and the [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Why does search require check-in and check-out dates? Vrbo prices and availability depend on the stay, so the search endpoint requires `check_in` and `check_out` and returns rentals for those dates. Leaving either out fails with `invalid_parameters` (422) and costs nothing. To see a property's open dates without fixing a stay, use `listing-availability` with a date range instead. ### Can I book a Vrbo rental through this API? No. The API reads listings, availability and reviews as the site shows them. Booking Vrbo stays from your own product needs a partnership with Expedia Group, whose Rapid API carries Vrbo inventory for a limited number of partners. ### Are the prices nightly or total? Search lets you choose how the price filters are read with `price_type`, set to `nightly` or `total`. The recorded response gives both anyway: `price.nightly` and `price.stay_total`, with a `fees_note` of "All fees included". Store the `price_type` you used with every run so prices from different days compare. ### How do I page through search results? Use `offset` for where the page starts and read `next_offset` and `has_more` from each response: the recorded search returned 20 properties with `next_offset` 20. `limit` sets the page size, but nothing is documented about the largest value accepted, so test it in the playground. Each page is one call and 1 credit. vrbo vacation rentals short-term rentals availability travel ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 9 min read ## [Vrbo Scraper or API: What You Get](https://perceptlayer.com/blog/vrbo-scraper-vs-api) A Vrbo scraper vs 6 endpoints at 1 credit a call: a recorded Lake Tahoe search with stay\_total, nightly\_original and rating, and the cost per listing. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Jul 2026 Updated 26 Oct 2026 Perceptlayer 7 min read ## [Airbnb Listings Data API: Search, Details and Reviews](https://perceptlayer.com/blog/airbnb-listings-data-api) Search Airbnb listings by place and dates as JSON: price, rating, beds and coordinates from a recorded response, plus the listing and reviews calls. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. --- title: "Booking.com Reviews API: Hotel Review Scores as JSON" description: "Pull Booking.com review scores and guest reviews as JSON with two GET calls at 1 credit each. Parameters, sorting, paging and the cost of covering a city." url: https://perceptlayer.com/blog/booking-com-reviews-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Booking.com Reviews API: Hotel Review Scores as JSON 5 Oct 2026 Perceptlayer 7 min read Two endpoints return Booking.com review data as JSON. `GET /v1/booking/review-scores` returns a hotel's review scores, and `GET /v1/booking/reviews` returns its guest reviews, sortable by date or score. You identify the hotel with its Booking.com URL or a country code plus slug, and each successful call costs 1 credit. This guide covers the parameters, how to list the hotels in a city first, and what covering a whole city costs. It's about reviews. For prices and rooms, see the [Booking.com hotel prices guide](https://perceptlayer.com/blog/booking-com-hotel-prices-api). ## Key takeaways - `/v1/booking/review-scores` and `/v1/booking/reviews` both cost 1 credit per successful call; failed calls cost nothing and return `X-Credits-Used: 0`. - Identify a hotel with `url`, or with `country` (two letters) and `slug`, such as `country=fr&slug=royal-saint-michel`. - `reviews` takes `page`, `limit` and `sort` ( `recent_desc`, `recent_asc`, `score_desc`, `score_asc`) so you can page through a hotel's reviews. - To cover a city, list its hotels with `/v1/booking/prices`, then call `review-scores` once per hotel: 25 hotels is 1 + 25 = 26 credits. - Free accounts get 100 credits on signup with no credit card, enough for that city run three times. ## Which endpoints return Booking.com review data? Booking.com review data lives in four endpoints of the [Booking.com API](https://perceptlayer.com/apis/booking). `review-scores` returns the score data for one hotel, `reviews` returns the individual guest reviews, `search` lists hotels for a destination, and `prices` returns a hotel list with a `review_score` string for every hotel. All return JSON, and each call is 1 credit. | Endpoint | Returns | Use it for | Credits | | --- | --- | --- | --- | | `GET /v1/booking/review-scores` | Review Scores | A hotel's review scores; accepts optional dates and party size | 1 | | `GET /v1/booking/reviews` | Reviews | Guest reviews, paged and sorted | 1 | | `GET /v1/booking/search` | Search | Listing hotels for a destination (response not recorded) | 1 | | `GET /v1/booking/prices` | Prices | Hotel list with a `review_score` per hotel (recorded) | 1 | The pages for [Review Scores](https://perceptlayer.com/apis/booking/review-scores) and [Reviews](https://perceptlayer.com/apis/booking/reviews) list the full field set, and each has a playground where you can run a real call with your key. We haven't recorded a response for `review-scores` or `reviews`, so this guide doesn't show their fields. Run one in the [playground](https://perceptlayer.com/apis/booking) to see exactly what comes back before you build on it. ## How do you call the review scores endpoint? Send a GET request to `/v1/booking/review-scores` with the hotel identified by `url`, or by `country` and `slug`. Nothing is required by the schema, but without a hotel identifier there is nothing to look up. Add your key in the `X-API-Key` header and the call costs 1 credit on success. ```bash curl "https://api.perceptlayer.com/v1/booking/review-scores?country=fr&slug=royal-saint-michel" \ -H "X-API-Key: $API_KEY" ``` The `country` and `slug` pair comes straight from a hotel URL. In `https://www.booking.com/hotel/fr/royal-saint-michel.html`, `fr` is the country and `royal-saint-michel` is the slug. You can also pass the whole address as `url`. If you don't have a key yet, [get a free API key](https://perceptlayer.com/signup). Authentication is covered in the [authentication docs](https://docs.perceptlayer.com/authentication). ### Review scores parameters | Parameter | Type | Notes | | --- | --- | --- | | `url` | string | Booking.com hotel URL, up to 4096 characters | | `country` | string | Two-letter country code, up to 2 characters | | `slug` | string | Hotel slug, up to 255 characters | | `checkin`, `checkout` | string | Stay dates | | `group_adults`, `group_children`, `no_rooms` | integer | Party size and rooms | | `lang` | string | Language, up to 10 characters | | `currency` | string | Currency, up to 3 characters | The dates, party and currency parameters are optional. If you pass `checkin`, `checkout` and the party size, use the same values you use in your other Booking.com calls so the requests match. ## How do you fetch guest reviews and sort them? Call `GET /v1/booking/reviews` with the same hotel identifiers plus `page`, `limit` and `sort`. Sorting by `score_asc` puts the lowest-rated reviews first, which is usually where the useful complaints are. Each call returns one page and costs 1 credit, so paging costs 1 credit per page. ```bash curl "https://api.perceptlayer.com/v1/booking/reviews?country=fr&slug=royal-saint-michel&sort=score_asc&page=1&limit=10" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Allowed values | | --- | --- | --- | | `url` | string | Up to 4096 characters | | `country` | string | Up to 2 characters | | `slug` | string | Up to 255 characters | | `lang` | string | Up to 10 characters | | `currency` | string | Up to 3 characters | | `page` | integer | Page number | | `limit` | integer | Reviews per page | | `sort` | string | `recent_desc`, `recent_asc`, `score_desc`, `score_asc` | We haven't documented defaults for `page` or `limit`, so set both explicitly and check the response, rather than assuming a page size. When you loop, stop on an empty page. The [pagination guide](https://perceptlayer.com/blog/paginate-web-data-api-python) shows a safe loop pattern. ## How do you get review scores for every hotel in a city? List the city's hotels with `prices`, then call `review-scores` for each hotel in the result. The `prices` response is the one we've recorded, and it returns each hotel's `url`, so you never build slugs by hand. Total cost is 1 credit for the list plus 1 credit per hotel. If you don't know the destination ID, `GET /v1/booking/destinations` takes a required `q` parameter; the [Destinations page](https://perceptlayer.com/apis/booking/destinations) has the details. The `dest_id` and `dest_type` parameters are optional on `prices`, and the example below uses the Paris values from the recorded request. `GET /v1/booking/search` is an alternative way to list hotels, but we haven't recorded its response, so check its list field in the playground before relying on it. ```bash curl "https://api.perceptlayer.com/v1/booking/prices?ss=Paris&checkin=2026-11-20&checkout=2026-11-23&group_adults=2&dest_id=-1456928&dest_type=city" \ -H "X-API-Key: $API_KEY" ``` This is a recorded excerpt of that call, for Paris, 20 to 23 November 2026, two adults: ```json { "success": true, "data": { "title": "Booking.com: hotels in Paris", "prices": [ { "name": "Royal Saint Michel", "url": "https://www.booking.com/hotel/fr/royal-saint-michel.html", "price": "$351.05", "review_score": "8.8", "location": "3 Boulevard Saint Michel, Paris", … }, … ], "total_prices": 25, "parsed": true }, … } ``` Note that `review_score` is a string ( `"8.8"`), so convert it before you sort or average. If a single list is enough, that field already answers "which hotels score highest" for one credit. Use `review-scores` and `reviews` when you need more than the headline number. ### A script for the whole city This Python script lists the city with `prices`, then fetches `review-scores` for each hotel URL and prints the JSON it gets back. It needs `requests` and your key in `API_KEY`. It reads the hotel list from `data.prices`, as in the recorded response above, and waits one second between calls to stay within the free tier's 1 request a second. ```python import os import time import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} prices = requests.get( f"{BASE}/v1/booking/prices", headers=HEADERS, params={ "ss": "Paris", "checkin": "2026-11-20", "checkout": "2026-11-23", "group_adults": 2, "dest_id": -1456928, "dest_type": "city", }, timeout=60, ).json() results = [] for hotel in prices["data"]["prices"]: time.sleep(1) r = requests.get( f"{BASE}/v1/booking/review-scores", headers=HEADERS, params={"url": hotel["url"]}, timeout=60, ) if r.status_code != 200: print(hotel["name"], r.status_code, r.json()["error"]["code"]) continue results.append({"name": hotel["name"], "url": hotel["url"], "scores": r.json()}) print(hotel["name"], r.headers["X-Credits-Used"], r.headers["X-Credits-Remaining"]) print(results) ``` Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so the loop doubles as a running spend check, and `results` holds each hotel's `review-scores` response for you to save or inspect. Errors come back as a status plus `{"error": {"code", "message", "request_id"}}`; see the [error docs](https://docs.perceptlayer.com/errors). ## What does it cost to pull reviews for a city? Each call is 1 credit, so cost is a count of calls. Covering the 25 hotels in the recorded Paris result with one `review-scores` call each is 1 list call + 25 calls = 26 credits. Adding 3 pages of reviews for each hotel adds 25 × 3 = 75 credits, for 101 in total. | Job | Calls | Credits | | --- | --- | --- | | List the city once with `prices` | 1 | 1 | | `review-scores` for 25 hotels | 25 | 25 | | 3 pages of `reviews` for 25 hotels | 75 | 75 | | Total | 101 | 101 | The free credits are 100, granted once after you verify an email, with no credit card. That covers the 26-credit scores run three times (3 × 26 = 78), but the full 101-credit run is 1 credit over, so it needs a pack; the smallest, Starter, has 10,000 credits. Failed calls cost nothing, and purchased credits last 12 months. For what credits cost, see [pricing](https://perceptlayer.com/pricing) and the [credits docs](https://docs.perceptlayer.com/credits). Free accounts get 1 request a second, so a 26-call run takes about half a minute plus the time each call takes when you pace it as the script does. A 429 response carries a `Retry-After` header with the seconds to wait. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the rest. Lost replies after a timeout may have been billed, which the [retry guide](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) explains. ## When should you use the official Booking.com API instead? Booking.com has its own developer program, and it's worth a look first: [Booking.com for developers](https://developers.booking.com/) documents the API products it offers and how to get started. A web data API fits when you want public review data in the same JSON shape as the rest of your sources. Data is collected from publicly available sources and returned as found at the time of the call, so a hotel's score is whatever the page showed when you asked. Store the `scraped_at` value from `meta` with every score you keep; it records when the call ran. The page itself is the primary source: for example, the [Royal Saint Michel listing](https://www.booking.com/hotel/fr/royal-saint-michel.html) is what the recorded call reads. Related guides: the [Yelp reviews guide](https://perceptlayer.com/blog/yelp-reviews-api-json) and the [Airbnb listings guide](https://perceptlayer.com/blog/airbnb-listings-data-api) follow the same pattern for other travel and local sources, and the [Travel APIs](https://perceptlayer.com/verticals/travel) page lists the rest. To try a call first, open the playground on the [Booking.com API page](https://perceptlayer.com/apis/booking), pick Review Scores and run it with your key. ## APIs in this post - [Booking.com **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/booking) ## Frequently asked questions ### Does the Booking.com reviews API need a Booking.com account? No. You send your Perceptlayer key in the `X-API-Key` header, and the hotel is identified by `url` or by `country` and `slug`. Keys start with `sk_live_`. If a header isn't possible, you can pass the `api_key` query parameter instead. ### How much does one Booking.com review call cost? A successful call to `review-scores` or `reviews` costs 1 credit. A failed call costs nothing and returns `X-Credits-Used: 0`. Pulling 3 pages of reviews for one hotel is 3 credits. The free tier gives you 100 credits on signup, and [pricing](https://perceptlayer.com/pricing) shows what packs cost. ### Can I sort reviews by lowest score? Yes. Set `sort=score_asc` on `/v1/booking/reviews` for the lowest scores first. The other values are `score_desc`, `recent_desc` and `recent_asc`. Combine `sort` with `page` and `limit` to walk through a hotel's reviews, at 1 credit per page. ### How do I find a hotel's slug? Take it from the hotel's Booking.com URL. In `https://www.booking.com/hotel/fr/royal-saint-michel.html`, the country is `fr` and the slug is `royal-saint-michel`. The `prices` response also returns each hotel's full `url`, which you can pass directly as the `url` parameter. ### Can an AI agent call these endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing; `call_endpoint` spends the endpoint's credits on success only. See the [AI agents docs](https://docs.perceptlayer.com/ai-agents). booking.com hotel reviews review scores travel hotel data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Aug 2026 Updated 23 Oct 2026 Perceptlayer 8 min read ## [Booking.com Hotel Prices API: Search, Rooms and Reviews](https://perceptlayer.com/blog/booking-com-hotel-prices-api) Eleven Booking.com endpoints as JSON: search, prices, rooms and reviews, with parameters and a 1,000-hotel price check costed in credits. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Booking.com Scraper or API: What You Get](https://perceptlayer.com/blog/booking-com-scraper-vs-api) A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. --- title: "Build a Market Research Agent with Search and Trends Data" description: "Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response." url: https://perceptlayer.com/blog/market-research-agent-search-trends --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Build a Market Research Agent with Search and Trends Data 5 Oct 2026 Perceptlayer 8 min read An AI market research agent needs three kinds of evidence: what the web says now (search results), whether interest is rising or falling (trends), and what was published this week (news). You can give an agent all three as tools backed by the Perceptlayer Google Search, Google Trends and Google News endpoints, each costing 1 credit per successful call. This tutorial builds that agent in Python with a hard credit cap per question. ## Key takeaways - Three endpoints cover a research question: `/v1/google-search/search`, `/v1/google-trends/interest` (plus `/v1/google-trends/related`) and `/v1/google-news/news`, 1 credit each. - Trim every response before it reaches the model. The recorded search response carries fields like `redirect_link` that an agent doesn't need. - A budget check in your own code, reading `X-Credits-Used`, caps spend per question. With a cap of 8 credits, the 100 free credits on signup cover 12 questions. - Trends values are relative on a 0 to 100 scale, so the agent should report direction and peaks, never search volume. ## What should a market research agent actually call? A research question such as "Is demand for standing desks growing, and who is talking about it?" splits into three lookups. Search shows who ranks and what questions people ask. Trends shows whether interest is rising over a period you choose. News shows what happened recently. One tool each keeps the agent's choices simple and its costs predictable. | Tool | Endpoint | Answers | Credits | | --- | --- | --- | --- | | `search_web` | `GET /v1/google-search/search` | Who ranks, related searches, related questions | 1 | | `search_trends` | `GET /v1/google-trends/interest` or `/related` | Is interest rising, what else people search | 1 | | `search_news` | `GET /v1/google-news/news` | What was published recently, by whom | 1 | The tools map to the [Google Search API](https://perceptlayer.com/apis/google-search), the [Google Trends API](https://perceptlayer.com/apis/google-trends) and the [Google News API](https://perceptlayer.com/apis/google-news). If you want a deeper look at one of them, see [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json) and [Google Trends API in Python: Interest Over Time as JSON](https://perceptlayer.com/blog/google-trends-api-python). ## Step 1: How do you test each endpoint before wiring the agent? Run each call once with cURL, so you see the response shape before the model does. You need a key: [sign up](https://perceptlayer.com/signup) for 100 free credits on signup, no credit card, and send it in the `X-API-Key` header ( [authentication](https://docs.perceptlayer.com/authentication)). Failed calls cost nothing and return `X-Credits-Used: 0`. ```bash export API_KEY=sk_live_... curl "https://api.perceptlayer.com/v1/google-search/search?query=standing+desks&hl=en" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/google-trends/interest?q=standing+desk&geo=US&time_range=1y" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/google-news/news?q=standing+desk" \ -H "X-API-Key: $API_KEY" ``` The Trends call is the one that surprises people, so here is an excerpt of a recorded response for `q=tesla&geo=US&time_range=1y`: ```json { "search_parameters": { "keyword": "tesla", "geo": "US", "time_range": "today+12-m", … }, "interest_over_time": { "average": 49.13, "max_value": 100, "min_value": 39, "data_points": [ { "timestamp": 1760832000, "date": "Oct 19 – 25, 2025", "value": 40 }, { "timestamp": 1761436800, "date": "Oct 26 – Nov 1, 2025", "value": 39 }, … ] } } ``` Each point is a week with a `value`. The peak week is 100 by definition, because Google scales the series. Per [Google's Trends documentation](https://support.google.com/trends/answer/4365533) (2026), figures are "scaled on a range of 0 to 100 based on a topic's proportion to all searches on all topics", so they show relative interest, not absolute search volume. Put that in your agent's system prompt. ## Step 2: How do you define the three tools? Define each tool with a name, a description and a JSON schema, then map it to one endpoint and a fixed set of parameters. Keeping the schema small matters: the search endpoint accepts dozens of optional parameters, and an agent that can set all of them will spend credits exploring. Expose only `query`, a region and, for Trends, a time range. ```python import json import os import time import anthropic import requests API = "https://api.perceptlayer.com" KEY = os.environ["API_KEY"] MODEL = "claude-sonnet-5-5" BUDGET = 8 # credits per research question MAX_TURNS = 10 # model round trips per question TOOLS = [ { "name": "search_web", "description": "Google search results for a query: top organic results, " "related searches and related questions. Costs 1 credit.", "input_schema": { "type": "object", "properties": {"query": {"type": "string"}}, "required": ["query"], }, }, { "name": "search_trends", "description": "Google Trends for one keyword. view=interest returns " "relative interest over time (0 to 100, not search volume). " "view=related returns related queries. Costs 1 credit.", "input_schema": { "type": "object", "properties": { "keyword": {"type": "string"}, "view": {"type": "string", "enum": ["interest", "related"]}, "geo": {"type": "string", "description": "Country code, e.g. US"}, "time_range": { "type": "string", "enum": ["30d", "90d", "1y", "5y"], }, }, "required": ["keyword", "view"], }, }, { "name": "search_news", "description": "Recent Google News articles for a query. Costs 1 credit.", "input_schema": { "type": "object", "properties": {"query": {"type": "string"}}, "required": ["query"], }, }, ] ``` The tool schema format follows [Anthropic's tool use documentation](https://docs.anthropic.com/en/docs/build-with-claude/tool-use). The same three tools work with other model providers' function calling with small changes; [MCP vs Function Calling for Live Web Data in Agents](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) covers when each fits. ## Step 3: How do you trim responses before the model sees them? Return only the fields the agent will reason about. Raw search responses include tracking links, pagination URLs and filter links that cost tokens and add nothing to an analysis. The recorded search response, for example, carries a long `redirect_link` beside each result's `link`. The trimmer below keeps fields that appear in the recorded responses. ```python def shrink(name, data): if name == "search_web": return { "organic": [ {k: r.get(k) for k in ("position", "title", "link", "snippet", "source")} for r in data.get("organic_results", [])[:5] ], "related_searches": [r["query"] for r in data.get("related_searches", [])], "related_questions": [q["question"] for q in data.get("related_questions", [])], } if name == "search_news": return [ { "title": n.get("title"), "link": n.get("link"), "snippet": n.get("snippet"), "iso_date": n.get("iso_date"), "source": (n.get("source") or {}).get("name"), } for n in data.get("news_results", [])[:5] ] if name == "search_trends" and "interest_over_time" in data: iot = data["interest_over_time"] return { "average": iot.get("average"), "max_value": iot.get("max_value"), "min_value": iot.get("min_value"), "points": [ [p.get("date"), p.get("value")] for p in iot.get("data_points", []) ], } return json.dumps(data)[:3000] # related queries: pass through, capped ``` For the recorded Trends response above, `shrink("search_trends", data)` returns this (excerpt, trimmed with …): ```json { "average": 49.13, "max_value": 100, "min_value": 39, "points": [ ["Oct 19 – 25, 2025", 40], ["Oct 26 – Nov 1, 2025", 39], … ] } ``` The `search_parameters`, the duplicate `timeline_data` list, the per-point `timestamp` and `response_time_ms` are gone. What is left is the summary and the series. On the Trends tool, the `points` list is the full series as `[date, value]` pairs. For a one-year range that is a compact table the model can read for direction and peaks. The `related` view has no recorded sample in this article, so it is passed through as text with a character cap. Check its shape in the [playground on the Trends API page](https://perceptlayer.com/apis/google-trends/related) before you rely on specific fields. ## Step 4: How do you cap credits per question? Count credits in your own code and stop calling tools when the cap is reached. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so the gateway tells you the true cost of each call. Add the used credits to a running total, refuse further calls once it hits `BUDGET`, and hand the model a plain error so it writes its answer from what it has ( [credits](https://docs.perceptlayer.com/credits)). ```python class Spend: credits = 0 def call(path, params): if Spend.credits >= BUDGET: return {"error": "budget_reached", "message": "No credits left for this question. Answer from the data you have."} for attempt in range(2): try: r = requests.get( API + path, params=params, headers={"X-API-Key": KEY}, timeout=30 ) except requests.Timeout: # A lost reply may have succeeded and been billed. Don't retry blindly. return {"error": "timeout", "message": "The request timed out."} Spend.credits += int(r.headers.get("X-Credits-Used", 0)) if r.status_code in (429, 503) and attempt == 0: time.sleep(int(r.headers.get("Retry-After", 1))) continue if r.status_code != 200: return r.json() # {"error": {"code", "message", "request_id"}} return r.json() def run_tool(name, args): if name == "search_web": data = call("/v1/google-search/search", {"query": args["query"], "hl": "en"}) elif name == "search_news": data = call("/v1/google-news/news", {"q": args["query"], "hl": "en"}) else: params = { "q": args["keyword"], "geo": args.get("geo", "US"), "time_range": args.get("time_range", "1y"), } data = call("/v1/google-trends/" + args["view"], params) if "error" in data: return json.dumps(data) out = shrink(name, data) return out if isinstance(out, str) else json.dumps(out) ``` Two details matter here. A 429 or 503 carries `Retry-After`, so the code waits that many seconds and retries once; those calls are not debited. A client timeout is different: requests have no idempotency key, so a timed-out call may have been billed, and the code reports it instead of retrying. [Handle Web Data API Errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) goes deeper on timeouts and lists the error codes. ## Step 5: How do you run the agent loop? Send the question, execute any tool calls the model requests, return the results and repeat until the model answers in text. The system prompt sets the rules: use Trends for direction, search for who ranks, news for recency, cite links, and never state absolute search volume. Reset the spend counter for each question, and bound the loop with a turn limit. ```python SYSTEM = ( "You are a market research analyst. Use search_trends to judge whether " "interest is rising or falling, search_web to see who ranks and what people " "ask, and search_news for what happened recently. Trends values are relative " "(0 to 100), never search volume. You have a budget of " f"{BUDGET} tool calls. Finish with: a one-paragraph answer, then evidence " "bullets with source links. Say what the data cannot show." ) client = anthropic.Anthropic() def research(question): Spend.credits = 0 messages = [{"role": "user", "content": question}] for turn in range(MAX_TURNS): # On the last turn, forbid tools so the model must answer in text. choice = {"type": "none"} if turn == MAX_TURNS - 1 else {"type": "auto"} resp = client.messages.create( model=MODEL, max_tokens=2000, system=SYSTEM, tools=TOOLS, tool_choice=choice, messages=messages, ) messages.append({"role": "assistant", "content": resp.content}) if resp.stop_reason != "tool_use": text = "".join(b.text for b in resp.content if b.type == "text") return text, Spend.credits results = [ { "type": "tool_result", "tool_use_id": b.id, "content": run_tool(b.name, b.input), } for b in resp.content if b.type == "tool_use" ] messages.append({"role": "user", "content": results}) return "Stopped: turn limit reached.", Spend.credits if __name__ == "__main__": answer, spent = research( "Is demand for standing desks growing in the US, and who is covering it?" ) print(answer) print(f"Credits spent: {spent}") ``` Run it with `python agent.py`. The script prints the answer and the credits it spent, which will be 8 or fewer. How many tools the model calls is its own choice. Two counters set the ceilings: the credit cap in `call` stops spend, and `MAX_TURNS` stops the loop, because after `budget_reached` a model can keep requesting tools and burn tokens without spending credits. The final turn sets `tool_choice` to `none`, so the model has to write its answer. The system prompt fixes the shape of what you get back: a one-paragraph answer, evidence bullets with source links, and a note on what the data cannot show. I haven't recorded a full run of this agent for this article, so the output depends on the live data and the model you use. ## What does one research question cost? A question costs the number of tool calls, at 1 credit each, up to your cap. A plan with one search, one Trends interest call, one related call and one news call is 4 credits. A cap of 8 allows a second round of follow-ups. Calls that fail cost nothing, so retries after a 429 don't add to the total. | Scenario | Calls | Credits | | --- | --- | --- | | Minimum plan (search, interest, news) | 3 | 3 | | Standard plan (adds `related`) | 4 | 4 | | Capped worst case | 8 | 8 | At the cap, 12 questions × 8 credits = 96 credits, which fits the 100 free credits you get once on signup. At the standard plan, 25 questions × 4 credits = 100 credits. For a weekly sweep of 200 keywords at 4 credits each, 200 × 4 = 800 credits a week, which needs a pack: a 10,000-credit Starter pack covers 12 weeks of it. For what credits cost in packs, see [pricing](https://perceptlayer.com/pricing). [AI Agent API Cost Control: Cap Web Data Spend](https://perceptlayer.com/blog/ai-agent-web-data-costs) covers account-level limits, and [Cache API Responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses) shows how to avoid paying twice for a Trends series that changes weekly. ## How should you read the results? Treat the agent's output as a lead for a human analyst, not a finding. Trends shows relative interest in search terms, so a rising line for "standing desk" means more people search it relative to all searches, not that sales rose. Search results and news are returned as found at the time of the call, and rankings vary by location and device. A few habits keep the answers honest. Keep geography and time range the same when you compare readings, because Google divides each data point "by the total searches of the geography and time range it represents" ( [Google Trends Help](https://support.google.com/trends/answer/4365533), 2026). Prefer `time_range=5y` when the question is about seasonality, since a 90-day window can mistake a seasonal peak for growth. And ask the agent to name the evidence behind each claim. For forecasting use cases, [Search Trend Data for Demand Forecasting: What It Can Show](https://perceptlayer.com/blog/search-trend-data-demand-forecasting) lays out the limits in more detail. ## What are the limits of this design? The design is a research assistant, not a market-sizing model. It sees public search interest and news, so it can't tell you revenue, conversion or what customers pay. Free accounts get 1 request a second (60 a minute), which a single sequential agent stays under; parallel agents on one account share that rate ( [rate limits](https://docs.perceptlayer.com/rate-limits)). If you want the same tools without writing the HTTP layer, the MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing, and `call_endpoint` spends the endpoint's credits on success only. See [AI agents (MCP)](https://docs.perceptlayer.com/ai-agents) and [Claude MCP Web Search](https://perceptlayer.com/blog/claude-agent-live-search-mcp). The trade-off: with MCP the model picks endpoints from the whole catalogue, so a code-level cap like the one above matters even more. Next step: [get a free API key](https://perceptlayer.com/signup), run the three cURL calls from Step 1, then paste the script into `agent.py` and ask it your own research question. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Google Trends **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-trends) - [Google News **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-news) ## Frequently asked questions ### How many credits does a market research agent use per question? Each successful call to the search, Trends or News endpoint costs 1 credit, so a question costs one credit per tool call. A typical plan of one search, two Trends calls and one news call is 4 credits. Capping the agent at 8 calls bounds the worst case at 8 credits. Failed calls cost nothing. ### Does Google Trends return search volume? No. Google scales Trends data from 0 to 100, based on a topic's proportion to all searches, so it shows relative interest rather than absolute volume ( [Google Trends Help](https://support.google.com/trends/answer/4365533), 2026). The recorded response shows an `average`, a `max_value` of 100 and weekly `value` points. Use it for direction and timing. ### Can I use MCP instead of defining the tools myself? Yes. The MCP server at `https://perceptlayer.com/mcp` has `search_endpoints`, `get_endpoint` and `call_endpoint`, so an agent can find and call the same three APIs. Lookups are free and calls cost the endpoint's credits. You lose the fixed parameter schemas used here, so enforce the credit cap on your side. ### What happens if my agent runs out of credits? The service is prepaid. When the balance reaches zero, calls return `insufficient_credits` (402) and nothing more is debited; there is no automatic top-up. Your code gets a JSON error with a `code`, `message` and `request_id`, which the agent loop above passes to the model as a tool result. See [errors](https://docs.perceptlayer.com/errors). ### Can the agent run searches in parallel? It can, but requests are rate limited per account and counted per minute. Free accounts get 1 request a second; paid packs include higher rates, and at least 5 a second for paying accounts. Parallel tool calls from one agent share that budget. If you hit a 429, wait the `Retry-After` seconds and retry. ai agents market research google trends tool calling python ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 18 Jul 2026 Updated 10 Nov 2026 Perceptlayer 11 min read ## [LangChain Custom Tool for Live Web Data: Python Tutorial](https://perceptlayer.com/blog/langchain-custom-tool-web-data) Build a LangChain tool in Python for Google Search and News: typed arguments, retries on 429, 502 and 503 only, and a per-run credit cap. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 14 Jul 2026 Perceptlayer 7 min read ## [AI Shopping Agent: Compare Prices Across Marketplaces](https://perceptlayer.com/blog/ai-shopping-agent-compare-prices) A Python AI shopping agent that searches Google Shopping, Walmart and AliExpress, normalises offers into one table and stops at a credit cap of 6 per question. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. --- title: "Concurrent API Requests in Python: Asyncio Under Rate Limits" description: "A Python asyncio fetcher that paces calls to your per-second limit, honours Retry-After and prices a 20,000-call batch at 20,000 credits." url: https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Concurrent API Requests in Python: Asyncio Under Rate Limits 5 Oct 2026 Perceptlayer 8 min read To run async API requests in Python under a rate limit, bound two things separately: how many requests are in flight (an `asyncio.Semaphore`) and how often new ones start (a pacer). The semaphore alone doesn't enforce a rate. This tutorial builds both with `httpx`, reads the account's limit from response headers, and backs off on `429` using `Retry-After`. ## Key takeaways - A semaphore caps concurrency, not requests per second. Pair it with a pacer that spaces request starts at `60 / RateLimit-Limit` seconds. - Perceptlayer limits are per account, counted per minute, and shared by all keys: free accounts get 1 request a second, paying accounts at least 5. - A `429` or `503` carries `Retry-After` in seconds and costs nothing, so pause the whole pacer and retry. A client timeout may still have been billed, so don't retry it blindly. - Budget in credits first: 20,000 calls × 1 credit = 20,000 credits, and the account rate sets how long they take (4,000 seconds at 5 requests a second). ## Why doesn't a semaphore alone respect a rate limit? A semaphore limits how many coroutines run a block at once, not how many start per second. If each call takes 200 milliseconds and you allow 10 in flight, you start about 50 requests a second, whatever the account allows. Concurrency and rate are different dials, and a rate limit only cares about the second one ( [`asyncio.Semaphore` docs](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Semaphore)). The relationship is simple: requests per second ≈ in-flight requests ÷ latency. Your latency isn't fixed, so a semaphore sized for today's latency overshoots the limit when the API gets quicker. The pacer makes the rate explicit. The semaphore stays as a safety valve, so a slow stretch can't pile up hundreds of open connections. This matters most on one endpoint with a batch of queries, such as keyword lists against the [Google Search API](https://perceptlayer.com/apis/google-search). Every call is identical in cost, so the only thing that varies is how fast you're allowed to send them. ## What are the account's rate limits? Limits are per account, shared by all its keys and counted per minute. Free accounts get 1 request a second (60 a minute). Paying accounts run at the rate of the credits they're using, and at least 5 a second (300 a minute). Starting a second process with a second key doesn't add capacity: both draw from the same minute. | Account | Rate included | | --- | --- | | Free | 1 request a second (60 a minute) | | Starter, Build, Growth, Pro | 5 requests a second | | Scale | 10 requests a second | | Volume | 20 requests a second | | Volume 10M, Volume 25M | 25 requests a second | | Volume 50M | 50 requests a second | A faster rate can be chosen at checkout for a higher price, and credits bought at a faster rate are used first. The [pricing page](https://perceptlayer.com/pricing) has the details, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) describe how the limit is counted. Every response also carries `RateLimit-Limit` (requests a minute), `RateLimit-Remaining`, `RateLimit-Reset` (seconds until the minute resets) and `RateLimit-Policy`. The code below reads `RateLimit-Limit` after each call, so it adapts if the account's rate changes mid-run instead of trusting a constant. ## How do you build the fetcher? The fetcher has three parts: a `Pacer` that schedules request starts, a `fetch` coroutine that retries rate-limit responses, and a `run_batch` function that wires them to one shared `httpx.AsyncClient`. It targets `GET /v1/google-search/search`, which takes `query` as its only required parameter and costs 1 credit per successful call. ### Step 1: Install the client and set your key Install `httpx` and export your key. Keys start with `sk_live_` and go in the `X-API-Key` header ( [authentication docs](https://docs.perceptlayer.com/authentication)). If you don't have one yet, [get a free API key](https://perceptlayer.com/signup): 100 free credits after you verify an email address, no credit card. ```bash pip install httpx export API_KEY=sk_live_your_key_here ``` ### Step 2: Write the pacer The pacer hands out start times. Each caller reserves the next slot under a lock, then sleeps until that slot arrives. `sync` converts `RateLimit-Limit` into an interval, with 10% headroom ( `HEADROOM = 0.9`) so jitter at a minute boundary doesn't push you over. `pause` pushes every future slot back, which is how a `429` slows the whole batch rather than one task. ```python import asyncio import os import time import httpx BASE_URL = "https://api.perceptlayer.com" PATH = "/v1/google-search/search" MAX_IN_FLIGHT = 10 HEADROOM = 0.9 MAX_ATTEMPTS = 4 class Pacer: """Spaces request starts so the account stays under its per-minute limit.""" def __init__(self, per_second=1.0): self.interval = 1 / per_second self._next = 0.0 self._lock = asyncio.Lock() def sync(self, limit_per_minute): # RateLimit-Limit is requests a minute; keep some headroom under it. self.interval = 60 / (limit_per_minute * HEADROOM) def pause(self, seconds): self._next = max(self._next, time.monotonic() + seconds) async def wait(self): async with self._lock: now = time.monotonic() start = max(now, self._next) self._next = start + self.interval if start > now: await asyncio.sleep(start - now) ``` The pacer starts at 1 request a second, the free rate, and speeds up after the first response reports the real limit. A paying account therefore begins slowly for a handful of requests, then moves to its own rate. Starting low is the safe direction. ### Step 3: Fetch with retries `fetch` takes a semaphore slot, waits for the pacer, sends the request and decides what the status means. The semaphore is acquired first, so no more than `MAX_IN_FLIGHT` tasks are ever waiting on the pacer or the network. ```python async def fetch(client, sem, pacer, halt, query): async with sem: for attempt in range(1, MAX_ATTEMPTS + 1): if halt.is_set(): return {"query": query, "status": "skipped"} await pacer.wait() try: r = await client.get(PATH, params={"query": query, "hl": "en"}) except httpx.TimeoutException: # The call may have succeeded and been billed. Don't retry blindly. return {"query": query, "status": "unknown"} if "RateLimit-Limit" in r.headers: pacer.sync(int(r.headers["RateLimit-Limit"])) if r.status_code == 200: return { "query": query, "status": "ok", "credits": int(r.headers.get("X-Credits-Used", 0)), "data": r.json(), } if r.status_code in (429, 503): wait = float(r.headers.get("Retry-After", 1)) pacer.pause(wait) continue if r.status_code in (401, 402): halt.set() return {"query": query, "status": r.status_code} return {"query": query, "status": "gave_up"} ``` `Retry-After` is a number of seconds on these responses (the header can also carry an HTTP date, per [RFC 9110](https://httpwg.org/specs/rfc9110.html#field.retry-after) and the [MDN reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Retry-After), but the API sends seconds). The `halt` event stops the batch on `401` ( `invalid_api_key`) or `402` ( `insufficient_credits`). Neither fixes itself, and sending the remaining thousands of requests would only produce more errors. ### Step 4: Run the batch `run_batch` opens one client, so connections are reused, and gathers one `fetch` per query. A single `Pacer` and `Semaphore` are shared by every task. ```python async def run_batch(queries): headers = {"X-API-Key": os.environ["API_KEY"]} async with httpx.AsyncClient( base_url=BASE_URL, headers=headers, timeout=30 ) as client: sem = asyncio.Semaphore(MAX_IN_FLIGHT) pacer = Pacer(per_second=1.0) halt = asyncio.Event() return await asyncio.gather( *(fetch(client, sem, pacer, halt, q) for q in queries) ) if __name__ == "__main__": queries = [f"best restaurants in {city}" for city in ["Berlin", "Munich", "Hamburg"]] started = time.monotonic() results = asyncio.run(run_batch(queries)) for r in results: if r["status"] == "ok": top = (r["data"].get("organic_results") or [{}])[0].get("title") print(f'{r["query"]!r}: {top}') else: print(f'{r["query"]!r}: {r["status"]}') spent = sum(r.get("credits", 0) for r in results) print(f"{len(results)} queries, {spent} credits, {time.monotonic() - started:.1f}s") ``` Save it as `fetch_batch.py` and run `python fetch_batch.py`. For lists in the tens of thousands, pass the queries in chunks of a thousand or so: `gather` creates one task per query up front, and chunking keeps memory flat and gives you a natural place to save progress. ## What does the result look like? Each `ok` result holds the endpoint's JSON, and the script prints the first organic result's title plus a one-line summary of queries, credits and elapsed time. The `credits` figure is the sum of `X-Credits-Used` across successful calls, so it matches what the balance dropped by. For `best restaurants in Berlin`, the recorded response starts like this: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", … } ], … } ``` So the first line the script prints for that query is the `title` of `position` 1. Failed entries print their status instead: `unknown` for a timeout, `gave_up` after four rate-limited attempts, `skipped` once the batch halted, or the HTTP status for other errors. Rerun only the non- `ok` queries, and check `unknown` ones against your balance first (see [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice)). The [Google Search `search` endpoint](https://perceptlayer.com/apis/google-search/search) takes many more optional parameters, such as `gl`, `location` and `device`. Add them to the `params` dict as needed. ## How long does a batch take and what does it cost? Cost is the number of successful calls times 1 credit, and the minimum time is the number of calls divided by your rate. A `429` costs nothing, but each one adds a pause, so real runs finish a little after the minimum. The headroom setting adds roughly 11% to the times below (1 ÷ 0.9). | Rate (requests a second) | 600 queries | 5,000 queries | 20,000 queries | | --- | --- | --- | --- | | 1 (free account) | over the 100 free credits | over the 100 free credits | over the 100 free credits | | 5 (Starter to Pro) | 120 s (2 min) | 1,000 s (about 17 min) | 4,000 s (about 67 min) | | 10 (Scale) | 60 s | 500 s (about 8 min) | 2,000 s (about 33 min) | | 20 (Volume) | 30 s | 250 s (about 4 min) | 1,000 s (about 17 min) | Credits for those batches: 600 calls × 1 credit = 600 credits, past the 100 free credits on signup and inside the Starter pack's 10,000. 5,000 calls × 1 credit = 5,000 credits, also inside the Starter pack's 10,000. The 100 free credits are enough to test the script on 100 queries, which take 100 s at the free rate. 20,000 calls × 1 credit = 20,000 credits, which needs the Build pack's 50,000 or larger. The [credits docs](https://docs.perceptlayer.com/credits) explain billing, and [pricing](https://perceptlayer.com/pricing) shows what each pack costs. If the same queries repeat across runs, caching saves both credits and time. See [caching API responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses). ## What should the fetcher do on errors? Treat each status differently: wait and retry on `429` and `503`, stop on `401` and `402`, and don't retry blindly on a timeout. Failed calls cost nothing and return `X-Credits-Used: 0`, so retrying a `429` can't double-bill you. A timeout is the exception: there's no idempotency key, so a request whose reply was lost may have succeeded and been billed. | Status | Code | Fetcher action | | --- | --- | --- | | 200 | | Record the result and `X-Credits-Used` | | 429 | `rate_limited` | Pause the pacer for `Retry-After` seconds, retry | | 503 | `temporarily_unavailable` | Same as 429 | | 401 | `invalid_api_key` | Halt the batch | | 402 | `insufficient_credits` | Halt the batch; there is no automatic top-up | | 422 | `invalid_parameters` | Return the status, fix the query | | 502 | `source_error` | Return the status, retry the query later | | Timeout | none | Mark `unknown`, compare `X-Credits-Remaining` before retrying | Errors come back as JSON in the form `{"error": {"code", "message", "request_id"}}`; log the `request_id` with each failure. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) goes deeper on the non-rate-limit cases. If you page through results instead of sending many queries, the same pacer works unchanged: see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). For agents that call tools in parallel, [MCP server rate limiting](https://perceptlayer.com/blog/mcp-server-rate-limiting-agents) covers the same limits from the tool side. Next step: [get a free API key](https://perceptlayer.com/signup), run the three-city script above, and watch `RateLimit-Remaining` fall as the batch runs. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Does a higher semaphore value make requests faster? Only until you reach the account's rate. Past that point extra concurrency just queues behind the pacer, or earns `429` responses if you remove the pacer. The limit is requests per minute, so throughput is capped by your plan's rate however many connections you open. ### Do multiple API keys give me more requests per second? No. Limits are per account and shared by all its keys, counted per minute. Two processes with two keys draw from the same budget, so they need a shared pacer or a split of the rate, such as half the requests a second each. ### Do \`429\` responses use up credits? No. Rate-limited responses are failed calls, which cost nothing and return `X-Credits-Used: 0`. Each one still forces a pause, so a pacer that avoids them finishes sooner than one that relies on retries. Only a successful response debits credits. ### How many requests should I keep in flight? Roughly your rate multiplied by your typical latency, plus a little slack. Measure latency from your own runs rather than assuming a figure. At 5 requests a second and a 1-second typical call, about 5 in flight keeps the pacer busy, so `MAX_IN_FLIGHT = 10` leaves room. ### Can I use aiohttp instead of httpx? Yes. The pacer, semaphore and status handling don't depend on the HTTP client. Replace the `client.get` call and read the same headers ( `RateLimit-Limit`, `Retry-After`, `X-Credits-Used`) from the response, and the rest of the code stays the same. python asyncio rate limits concurrency google search ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 15 Oct 2026 Perceptlayer 7 min read ## [HTTP 429 Too Many Requests: What It Means and How to Fix It](https://perceptlayer.com/blog/http-429-too-many-requests) A 429 Too Many Requests response means you hit a rate limit. Read Retry-After, wait that long, then retry; a tested Python loop and the headers to watch. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 9 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Handle Web Data API Errors in Python: 4xx, 5xx and Timeouts](https://perceptlayer.com/blog/handle-web-data-api-errors-python) Map the API's error codes to retry, fix or stop in Python: 429 and 503 honour Retry-After, 4xx stops, and failed calls cost 0 credits. --- title: "Detect Schema Changes in API JSON Responses | Perceptlayer" description: "Infer a path-and-type schema from a recorded Google Search response (71 paths), diff each new response against it and alert on removed or retyped fields." url: https://perceptlayer.com/blog/web-data-api-json-schema-changes --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Detect Schema Changes in API JSON Responses 3 Oct 2026 Perceptlayer 6 min read To detect schema changes in API JSON responses, infer a schema from a known-good response, store it, and compare every new response against it: report paths that disappeared, paths that changed type, and paths that are new. A few dozen lines of Python do it with no dependencies. Run on our recorded Google Search response, the inference finds 71 paths, and the checks below catch a removed `snippet` or a `position` that turns into a string before your pipeline breaks on it. ## Key takeaways - Map every JSON path, such as `$.organic_results[].position`, to the set of types seen there. The recorded Google Search response yields 71 paths. - Treat `int` and `float` as one `number` type. The recorded Airbnb search has `rating` as `5` on one result and `4.81` on another, which isn't a schema change. - Optional fields are normal: `phone` appears on 2 of the 3 local results in the recording. Alert on a missing path only after several responses in a row, not on the first. - Alert on a retyped path at once, since that's what breaks parsers; log new paths as information. - Schema checks run on responses you already paid for, so they cost no extra credits. A failed call costs nothing and has no body to check. ## What counts as a schema change in a web data response? Three things, in order of how much they hurt. A **retyped** field, such as a number that arrives as a string, breaks parsing and arithmetic immediately. A **removed** field breaks any code that reads it, and fills your tables with nulls if the code tolerates it. A **new** field breaks nothing, but it often shows up just before a change to an old one, so it's worth logging. Web data APIs change for reasons outside anyone's control: the website behind an endpoint adds a module, renames a section, or shows a field only for some results. That makes the second category tricky. A field that's missing from one response may simply not apply to it, so a useful check separates "absent this time" from "gone". ## Which response do you start from? A known-good response from the endpoint you depend on, saved to disk. This guide uses our recorded Google Search response. The request was: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Value | Notes | | --- | --- | --- | | `query` | `best restaurants in Berlin` | Required | | `hl` | `en` | Interface language, 2 characters | | `safe` | `off` | `active` or `off` | The response mixes flat fields, arrays of objects and nested modules, which is what makes schema checks worth having. A trimmed excerpt: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. …", "rank_group": 1, "rank_absolute": 4, … }, … ], "local_results": { "places": [ { "position": 1, "title": "BLESS Restaurant", "rating": 4.8, "reviews": 2400, "phone": "+49 30 20619795", "kgmid": "/g/11lkzg8dhv", … }, … ], … }, … } ``` Save the full response as `baseline.json`. Get a key from the [free signup](https://perceptlayer.com/signup) if you want to record your own; the [requests and responses docs](https://docs.perceptlayer.com/requests) describe the envelope every endpoint shares. ## How do you infer a schema from a response? Walk the JSON and record, for every path, which types appear there. Objects add `.key` to the path and arrays add `[]`, so all items of an array share one path and their types merge. Map Python types to JSON types, with `int` and `float` both as `number`, because JSON doesn't distinguish them and data often switches between `5` and `4.81`. ```python # schema.py import json KIND = {dict: "object", list: "array", str: "string", bool: "boolean", int: "number", float: "number", type(None): "null"} def infer(value, path="$", schema=None): """Map every path in a JSON value to the set of types seen there.""" schema = {} if schema is None else schema schema.setdefault(path, set()).add(KIND[type(value)]) if isinstance(value, dict): for key, child in value.items(): infer(child, f"{path}.{key}", schema) elif isinstance(value, list): for child in value: infer(child, f"{path}[]", schema) return schema def diff(old, new): removed = sorted(p for p in old if p not in new) added = sorted(p for p in new if p not in old) retyped = sorted((p, sorted(old[p]), sorted(new[p])) for p in old.keys() & new.keys() if not new[p] <= old[p] | {"null"}) return removed, added, retyped def save(schema, path): json.dump({p: sorted(t) for p, t in schema.items()}, open(path, "w"), indent=1) def load(path): return {p: set(t) for p, t in json.load(open(path)).items()} ``` Run `save(infer(json.load(open("baseline.json"))), "schema.json")` on the recorded response and you get 71 paths. The first few are `$.search_information.query_displayed` ( `string`), `$.search_information.organic_results_count` ( `number`), `$.organic_results` ( `array`) and `$.organic_results[].position` ( `number`). The `diff` function tolerates a new `null` on a known path, so a field that's sometimes empty doesn't raise a type alert; drop the `| {"null"}` if your pipeline can't take nulls. ## Why can't you alert on the first missing field? Because many fields are optional by nature. In the recorded response, `phone` is present on 2 of the 3 places in `local_results`; the third simply has no `phone` field. The path `$.local_results.places[].phone` exists in this response because two items carry it, but a future response where none of the places has a phone would make it look removed. The same goes for whole modules. A search with no local businesses has no `local_results` at all, so every path under it would vanish in one go. The fix is to count: alert when a known path has been missing from several consecutive responses, not from one. Three is a sensible starting point for an endpoint you call many times a day; for a daily job, use a higher number or check per query. ## How do you check each new response? Diff the new response's schema against the stored one, alert on retyped paths at once, count missing paths across runs, and fold new paths into the stored schema after logging them. Keep the counts in a small state file so they survive between runs. ```python # monitor.py import json import os from schema import diff, infer, load, save STATE = "schema_state.json" MISSING_LIMIT = 3 def check(response, schema_path="schema.json"): known = load(schema_path) current = infer(response) removed, added, retyped = diff(known, current) state = json.load(open(STATE)) if os.path.exists(STATE) else {} alerts = [f"RETYPED {p}: {old} -> {new}" for p, old, new in retyped] for p in known: state[p] = state.get(p, 0) + 1 if p in removed else 0 if state[p] == MISSING_LIMIT: alerts.append(f"MISSING {p} in {MISSING_LIMIT} responses in a row") for p in added: known[p] = current[p] alerts.append(f"NEW {p}: {sorted(current[p])}") for p, old, new in retyped: known[p] |= current[p] save(known, schema_path) json.dump(state, open(STATE, "w")) return alerts ``` Each alert fires once: a retyped path's new type joins the stored schema, and a missing count only matches the limit on the run that reaches it. Call `check(r.json())` after every successful API call, and send the alerts wherever your team looks. ### What does it report on a real change? We tested it by editing a copy of the recorded response: removing `snippet` from every organic result and changing the first result's `position` from `1` to the string `"1"`. Checking that edited response three times printed: ```text 1 ["RETYPED $.organic_results[].position: ['number'] -> ['number', 'string']"] 2 [] 3 ['MISSING $.organic_results[].snippet in 3 responses in a row'] ``` The type change was caught on the first response, as it should be, since parsing `position` as an integer would fail there. The missing `snippet` waited for the third, which is the price of not alerting on optional fields. Lower `MISSING_LIMIT` for paths you know are always present. ## Should you use JSON Schema instead? Use JSON Schema when other tools need to read the schema, such as validators in other languages or API documentation. The path map above is easier to diff and explain, but it isn't a standard. GenSON, a Python library, builds a JSON Schema from any number of JSON objects and can merge schemas, so you can grow one schema from many responses ( [GenSON](https://github.com/wolverdude/GenSON), 2026). Validate new responses against it with any JSON Schema validator. Either way, decide which paths you rely on and give them their own stricter rule. A check that treats all 71 paths equally will be noisy; one that watches the dozen fields your code reads, such as `position`, `title`, `link` and `snippet`, will be quiet until it matters. The [web data quality checklist](https://perceptlayer.com/blog/web-data-quality-monitoring-checklist) adds null rates, duplicates and outliers on top of schema checks. ## What does it cost to monitor schemas? Nothing extra in credits. The checks run on responses your pipeline already fetched, so they add CPU time, not calls. Each successful Google search is 1 credit, and a failed call costs nothing and has no response body to check. Check its error code instead; the [errors docs](https://docs.perceptlayer.com/errors) list them. If you'd rather run a separate canary, one fixed query a day for each endpoint you depend on, that's 1 credit per endpoint per day: 10 endpoints × 30 days = 300 credits a month. The 100 free credits on signup cover the first 10 days, and a year of it, 3,600 credits, fits in the Starter pack's 10,000. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance and [pricing](https://perceptlayer.com/pricing) has what packs cost. To record a baseline for your own query, run it in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search) and save the JSON. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How often do web data API responses change shape? There's no fixed rate, and it differs by endpoint. Responses reflect the website behind each endpoint, so a site redesign or a new results module can add, move or empty fields. That's why a check on every response, with a rule for optional fields, is more useful than an occasional manual review of the documentation. ### Why treat integers and floats as the same type? JSON's grammar defines one number production, an integer part with an optional fraction and exponent ( [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259), 2017), and real data switches between whole and fractional values. Our recorded Airbnb search has `rating` as `5` on one result and `4.81` on another. Treating them as different types would raise a false alert on the first fractional rating, so the code maps both to `number`. ### Does a schema check cost credits? No. It runs on responses you've already received, so it adds no calls. Only the API calls themselves cost credits, 1 for a Google search, and failed calls cost nothing. A dedicated daily canary per endpoint is 1 credit a day each, 30 a month. ### Should a new field trigger an alert? Log it, but don't page anyone. A new path breaks nothing, and the code above adds it to the stored schema so it's checked from then on. New fields are still worth reading: a new key next to an old one is often the first sign that the old one is about to move. ### What should my pipeline do when a field goes missing? Keep running on the fields that are present, write nulls rather than defaults, and alert. Defaults hide the problem in your data. Store the raw response alongside the parsed rows so you can reprocess once you've updated the parser; the guide to [loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres) keeps raw JSON next to the parsed columns for this reason. json schema drift data pipelines python monitoring ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 30 Aug 2026 Updated 21 Oct 2026 Perceptlayer 7 min read ## [Web Data Quality Checks for Scraped and API Data](https://perceptlayer.com/blog/web-data-quality-monitoring-checklist) Seven web data quality checks in Python, with code written against a recorded Zillow search response: schema drift, null rates, duplicate zpids and outliers. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 16 Sept 2026 Updated 24 Oct 2026 Perceptlayer 7 min read ## [Save API JSON to Parquet in Python](https://perceptlayer.com/blog/save-api-json-to-parquet-python) Write API JSON to date-partitioned Parquet with pyarrow and a fixed schema, so a price that arrives as 441 one day and 393.73 the next doesn't break it. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 29 Jul 2026 Perceptlayer 6 min read ## [Flatten Nested JSON to CSV in Python: Two Ways Compared](https://perceptlayer.com/blog/web-data-to-csv-python) Flatten a recorded Zillow response to CSV with pandas json\_normalize (60 columns) and plain Python (63), split photo lists into a child table, fix integers. --- title: "Trim API Responses for LLM Context: Fewer Tokens per Call" description: "Cut a Google Shopping response from 1,358 to 422 characters by keeping 8 fields. Python code, a measured before and after, and 1 credit per call." url: https://perceptlayer.com/blog/trim-api-responses-llm-context --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Trim API Responses for LLM Context: Fewer Tokens per Call 3 Oct 2026 Perceptlayer 8 min read To reduce API response tokens for an LLM, don't hand the model the raw JSON. Call the API in your own code, keep only the fields the model needs, and pass that slimmer object back as the tool result. On a recorded Google Shopping response, keeping 8 fields cut the payload from 1,358 to 422 characters, and the call still costs 1 credit. ## Key takeaways - Trimming happens in your code. The `/v1/google-shopping/search` endpoint takes no field-selection parameter, so you filter the JSON after it arrives. - On the recorded `iphone 15` response, a whitelist of 8 fields shrank the compact JSON from 1,358 to 422 characters, a 68.9% reduction. - The biggest single fields in the recording were `product_token`, `thumbnail` and `link`. None of them helps a model compare prices. - Trimming doesn't change cost: a successful call is 1 credit, a failed call is 0, with or without a filter. - We measured characters, not tokens. Count tokens with your own model's tokenizer before you budget. ## Why trim an API response before the model sees it? Everything a tool returns goes into the model's context window, and every character of it is read on every later turn of the conversation. Fields the model never uses still cost input tokens, still dilute the useful data, and still count against the context limit. Trimming is the cheapest fix: no new infrastructure, one function. Tokens are the unit models bill and limit by, and they don't map one to one onto characters. Tokenizers differ between model generations: Anthropic's [token counting docs](https://platform.claude.com/docs/en/build-with-claude/token-counting) (2026) say newer Claude models produce roughly 30 percent more tokens for the same text than earlier ones, and advise recounting against the model you'll use. That's why this article reports characters, which we can measure exactly, and leaves token counts to you. Characters are still a fair proxy for direction. Removing 936 of 1,358 characters of JSON removes most of the text the tokenizer would have processed. Opaque IDs and encoded blobs are the first candidates to drop. If you're wiring this into an agent loop, the same logic applies to [tool schema design](https://perceptlayer.com/blog/agent-tool-schema-design-web-apis): the model should see only what helps it choose and use a tool. ## What does the Google Shopping response contain? The search endpoint returns three top-level objects: `search_parameters` (an echo of your request), `shopping_results` (the products) and `pagination`. Each product carries identifiers, display fields, a price in two forms and a few fields that exist for the site's own use. Here is the recorded response for the request below, cut to the first product and trimmed with `…`: ```bash curl "https://api.perceptlayer.com/v1/google-shopping/search?q=iphone+15&gl=us&hl=en" \ -H "X-API-Key: $API_KEY" ``` Only `q` is required. The full parameter list for `/v1/google-shopping/search`: | Parameter | Type | Required | Limit or allowed values | | --- | --- | --- | --- | | `q` | string | Yes | Up to 500 characters | | `gl` | string | No | Up to 2 characters | | `hl` | string | No | Up to 2 characters | | `location` | string | No | Up to 63 characters | | `uule` | string | No | Up to 500 characters | | `start` | integer | No | n/a | | `device` | string | No | `desktop`, `mobile` or `tablet` | | `small_business` | boolean | No | n/a | | `shoprs` | string | No | Up to 2000 characters | None of them selects fields. The response looks like this: ```json { "search_parameters": { "q": "iphone 15", "gl": "us", "hl": "en", "start": 0, "device": "desktop" }, "shopping_results": [ { "position": 1, "category": "Popular products", "title": "Apple iPhone 15", "source": "Walmart - Wireless Source", "rating": 4.7, "reviews": 45000, "extensions": [" & more"], "product_token": "eyJlaSI6InZaeUE0IiwicHJvZHVjdGlkIjoiNDI2MzYwNjAxNzQxMTU2NTk5MiIs…", "rank_absolute": 1, "product_id": "4263606017411565992", "link": "https://www.google.com/shopping/product/4263606017411565992", "price": "$393.73", "extracted_price": 393.73, "thumbnail": "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" }, … ], "pagination": { "current_page": 1, "start": 0, "next_start": 10 } } ``` The recording has two products. Counting every character of each product object in the compact JSON, the fields break down like this for the pair together: | Field | Characters (2 products) | Useful to a price-comparison model? | | --- | --- | --- | | `product_token` | 326 | No. Opaque string, truncated with `…` in the recording | | `thumbnail` | 168 | No. A base64 data URI, not an image URL, in this recording | | `link` | 122 | Sometimes, if the agent must cite or open the product | | `product_id` | 42 | Only if you fetch the product later | | `title` | 40 | Yes | | `source` | 37 | Yes. It's the seller | | `category` | 36 | Rarely | | `extensions` | 22 | Rarely | | `price` | 18 | Redundant with `extracted_price` | | `extracted_price` | 9 | Yes. A number, so the model can compare | | `reviews` | 7 | Yes | | `rating` | 6 | Yes | | `position`, `rank_absolute` | 2 each | Optional | Counts include the quoted value and nothing else: they exclude key names and punctuation. So they understate the real saving, because each dropped field also removes its key. ## Which fields should you keep? Keep the fields the model needs to answer the question it was asked, and drop everything else. For a "who sells the iPhone 15 cheapest, and is it well reviewed?" question, that means `title`, `source`, `extracted_price`, `rating` and `reviews`. Add `link` if the answer should point somewhere, and `position` if rank matters. Two judgment calls come up with this response: - **`price` versus `extracted_price`.** `price` is the display string ( `"$393.73"`), and `extracted_price` is the same figure as a number. Keep the number for comparisons. Keep the string only if you want the currency symbol in the model's answer, since a bare number has none. - **`product_id` and `link`.** If a later step looks up a single product, the identifier is useful. If the agent only reports results, `link` alone covers citation. Don't drop fields you can't reconstruct. If you might need a field in a follow-up step, store the full response in your application (not in the model's context) and give the model a reference to it. That also keeps the trimmed text honest, since the original is still there to audit. ## How do you filter the response in Python? Write a small whitelist function and call it between the HTTP response and the tool result. The function below keeps eight fields per product, drops everything else, and prints the length of each version so you can measure the saving on your own queries. It only needs the `requests` package and your key in `API_KEY`. ```python import json import os import requests URL = "https://api.perceptlayer.com/v1/google-shopping/search" KEEP = ("position", "title", "source", "price", "extracted_price", "rating", "reviews", "link") def search(q, gl="us", hl="en"): r = requests.get( URL, params={"q": q, "gl": gl, "hl": hl}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) r.raise_for_status() return r.json() def slim(data, keep=KEEP): return [ {k: item[k] for k in keep if k in item} for item in data.get("shopping_results", []) ] def size(obj): return len(json.dumps(obj, separators=(",", ":"), ensure_ascii=False)) if __name__ == "__main__": full = search("iphone 15") trimmed = slim(full) print("full:", size(full), "trimmed:", size(trimmed)) print(json.dumps(trimmed, indent=2)) ``` Two details matter. `k in item` skips fields a product doesn't have instead of raising, so a result with no rating doesn't break the loop. And `separators=(",", ":")` measures compact JSON, which is what you should send the model: pretty-printing adds whitespace you pay for. Errors still need handling. `raise_for_status()` turns a 4xx or 5xx into an exception, and the body carries a `code` you can branch on. See [the error reference](https://docs.perceptlayer.com/errors) and [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) for retry logic. ## What is the measured before and after? On the recorded response, the full compact JSON is 1,358 characters. The same two products after the 8-field whitelist, as a bare list, come to 422 characters: 936 fewer, a 68.9% reduction. Cutting further to five fields ( `title`, `source`, `extracted_price`, `rating`, `reviews`) gives 222 characters, an 83.7% reduction. | Version | Fields kept per product | Characters (compact JSON) | Change vs full | | --- | --- | --- | --- | | Full recorded response | all 14, plus `search_parameters` and `pagination` | 1,358 | n/a | | 8-field whitelist | `position`, `title`, `source`, `price`, `extracted_price`, `rating`, `reviews`, `link` | 422 | \-68.9% | | 5-field whitelist | `title`, `source`, `extracted_price`, `rating`, `reviews` | 222 | \-83.7% | The 8-field output for the first product looks like this: ```json {"position":1,"title":"Apple iPhone 15","source":"Walmart - Wireless Source","price":"$393.73","extracted_price":393.73,"rating":4.7,"reviews":45000,"link":"https://www.google.com/shopping/product/4263606017411565992"} ``` Read these numbers with their limits in mind: - **Two products only.** The recording holds two results, so the percentages describe this sample. Another query or a longer result list can shift them. - **Truncated token.** The recorded `product_token` ends in `…`, so the original strings are longer than what we counted. The real saving on that field is at least what's shown. - **Characters, not tokens.** We didn't run a tokenizer. A drop in characters should lower your token count, but by how much depends on the model. Measure with your provider's counter, for example [tiktoken](https://github.com/openai/tiktoken) for OpenAI models. - **Not a like-for-like shape.** The 422 figure is a bare list of products, measured against the full object with `search_parameters` and `pagination`, so part of the saving comes from dropping those two. Keep `pagination.next_start` if the agent pages, as covered in [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## How does this fit an agent or MCP tool call? Put the filter inside the tool your agent calls, so the model only ever sees the slim version. With a function-calling setup, that's the body of your tool function: call the endpoint, run `slim()`, return the result. [MCP vs function calling for live web data](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) covers where each fits. With the Perceptlayer MCP server at `https://perceptlayer.com/mcp`, `call_endpoint` takes an endpoint ID and that endpoint's parameters and returns the endpoint's JSON response. The [MCP docs](https://docs.perceptlayer.com/ai-agents) cover setup. Its output reaches the model as returned, so for trimmed output call the HTTP API from your own tool and expose only that wrapper to the model. Reusing `search()` and `slim()` from above: ```python def shopping_tool(q: str) -> str: """Tool body: search, trim, return compact JSON text.""" try: data = search(q) except requests.HTTPError as e: # Failed calls cost 0 credits; tell the model briefly, not the whole body. return json.dumps({"error": e.response.status_code}) # The tool result is the trimmed list, not the raw response. return json.dumps(slim(data), separators=(",", ":")) ``` Register `shopping_tool` with your framework as the tool function. The model-facing contract stays small: describe the wrapper's output in its schema ( `title`, `source`, `extracted_price`, `rating`, `reviews`) so the model knows what it will get. Trimming also helps when results accumulate. An agent that runs ten searches in one session carries ten tool results forward, and a leaner result is the difference between fitting them and having to summarise or evict. For the budget side, see [capping web data spend for AI agents](https://perceptlayer.com/blog/ai-agent-web-data-costs). ## What does it cost? A successful call to `/v1/google-shopping/search` costs 1 credit, and a failed call costs nothing and returns `X-Credits-Used: 0`. Filtering the response in your code changes none of that: you pay for the call, not for the bytes you keep. | Scenario | Calls | Credits | | --- | --- | --- | | 500 product searches | 500 × 1 credit | 500 | | 20,000 product searches | 20,000 × 1 credit | 20,000 | | 500 searches, 40 return errors | 460 × 1 credit | 460 | The free tier gives you 100 credits after you verify an email address, with no credit card, so they cover the first 100 of the 500 searches. Paid credits come in prepaid packs starting at 10,000, and [pricing](https://perceptlayer.com/pricing) has what they cost. Read `X-Credits-Remaining` on any response to see your balance, and see [credits](https://docs.perceptlayer.com/credits) for how debits work. Because the cost is per call, trimming saves context tokens, not credits. Reducing calls is a different lever: [caching API responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses) covers it. ## How do you catch a filter that drops a field you need? `slim()` skips missing keys silently, so a renamed field would vanish without an error. Pin the two fields the price question depends on with a test against a saved response: ```python def test_slim_keeps_price_and_seller(): items = slim(saved_response) assert items and all("extracted_price" in i and "source" in i for i in items) ``` If an answer degrades later, add back the one field it was missing. Keep the whitelist in the `KEEP` tuple so that is a one-line edit. To try it on your own query, [get a free API key](https://perceptlayer.com/signup), then run the call in the playground on the [Google Shopping API](https://perceptlayer.com/apis/google-shopping) page and paste the response into the script's `slim()` function. ## APIs in this post - [Google Shopping **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/google-shopping) ## Frequently asked questions ### Does the Google Shopping endpoint let me choose which fields come back? No. None of the documented parameters in the table above selects fields. Filter the JSON in your own code after the response arrives, as the Python example in this article does, and keep the full response in your application if a later step might need it. ### Does trimming the response reduce what I pay in credits? No. A successful call costs 1 credit whatever you do with the response afterwards, and failed calls cost nothing. Trimming lowers the tokens you send to the model, not the credits you spend on the API. To spend fewer credits, make fewer calls, for example by caching. See [credits](https://docs.perceptlayer.com/credits). ### How many tokens did the trimmed response save? We don't know, because we measured characters, not tokens. The recorded response went from 1,358 to 422 characters with an 8-field whitelist. Run your model's tokenizer on both versions of your own responses to get a token count, since tokenizers differ between model families. ### Should I send the model the whole response when I'm unsure what it needs? For a first prototype, yes: it removes one variable. Once you see which fields the model's answers use, switch to a whitelist. If you're unsure about one field, keep it while you test, then drop it after you've compared answers with and without it. ### Can I ask for a smaller page of results instead of trimming fields? The documented parameters include `start`, an integer offset, but no page size, and we don't document a default or a maximum. You can step through results with `start`, but fewer fields per product is the reliable way to shrink each page. See [paginating a web data API](https://perceptlayer.com/blog/paginate-web-data-api-python). llm token usage context window google shopping ai agents ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Sept 2026 Perceptlayer 7 min read ## [MCP Server Too Many Tools: Keeping Agent Context Small](https://perceptlayer.com/blog/mcp-too-many-tools-context) One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 11 Sept 2026 Perceptlayer 8 min read ## [Build a Price Tracking Agent in Python with Live Data](https://perceptlayer.com/blog/price-tracking-agent-python) A Python price tracker that checks Google Shopping and eBay once per product per run, stores history in SQLite, flags drops and costs 2 credits a product. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 28 Oct 2026 Perceptlayer 7 min read ## [Web Search API for AI Agents: Four Engines Compared](https://perceptlayer.com/blog/web-search-api-for-ai-agents) Google, Brave, Bing and DuckDuckGo search endpoints compared by their recorded JSON, with one Python normaliser for agents. 1 credit per search. --- title: "Job Posting Data for Labour-Market Research | Perceptlayer" description: "Which Indeed posting fields support trend analysis, where postings mislead versus hires, and a weekly collection plan that costs 3,000 credits a month." url: https://perceptlayer.com/blog/job-posting-data-labour-market-research --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Job Posting Data for Labour-Market Research 1 Oct 2026 Perceptlayer 8 min read Job postings show what employers want as soon as they advertise a role: titles, locations and dates are public at once, with no survey cycle to wait for. Three fields carry most of the trend analysis: `title`, `location` and `date_published`. Postings measure demand, not hiring, so treat every series as an index of advertised openings. One call to the Indeed jobs endpoint returns these fields as JSON for 1 credit, and a repeatable weekly collection fits in a few thousand credits a month. ## Key takeaways - Trend analysis needs `title`, `location` and `date_published` from each posting, plus `id` to remove duplicates between runs. - The recorded response has no salary field. Check your own queries before building a pay series, and report the share of postings that have one. - Postings are not hires: official data such as JOLTS counts both, and the two series differ in level and timing. - Run the same query list on the same schedule. A fixed panel of 750 calls a week costs 750 calls × 4 weeks × 1 credit = 3,000 credits a month. See [pricing](https://perceptlayer.com/pricing) for what credits cost. - Store raw responses with a collection timestamp. You can't rebuild last month's view of the market later. ## Which posting fields matter for trend analysis? Five fields do most of the work: `title`, `location`, `date_published`, `id` and `company.name`. Title tells you the role, location tells you where, the date tells you when it was advertised, the id lets you count each posting once, and the company lets you see whether a few employers drive a trend. Everything else is useful context but rarely the unit you count. The table below maps fields from the recorded response to the job they do. | Field | Type in the sample | Use in research | | --- | --- | --- | | `id` | string | Deduplicate postings across runs and pages | | `title` | string | Classify the role; normalise before counting | | `company.name` | string | Concentration check: how many employers per role | | `location.city`, `location.state`, `location.country` | strings | Regional counts and cross-country comparisons | | `location.is_remote` | boolean | Remote share of postings | | `location.latitude`, `location.longitude` | numbers | Mapping and commuting-zone joins | | `date_published` | string, `2026-08-12 05:00:00` | Time axis; the posting's age when you collected it | | `attributes` | list of strings | Employment type and skill tags, e.g. `Full-time`, `UI design` | | `description_html` | string, HTML | Text mining for skills; strip the markup first | Be careful with `attributes`. In the recorded sample it mixes employment type ( `"Full-time"`) with skill-like tags ( `"UI design"`, `"Go"`, `"Collaboration with Sales"`), so it's a signal to test, not a clean taxonomy. For employment type, filter on the `job_type` request parameter instead of parsing tags. ### What about salary? Pay is the field researchers ask for most, and the recorded response doesn't contain a salary field. The `attributes` list in the sample holds no pay figures either. Run your own queries, inspect the JSON, and count how many postings carry any pay information before you build a series on it. If coverage is thin or uneven by country, say so in your write-up rather than imputing values. ## How do you pull the data? You send `GET /v1/indeed/jobs` with a required `query` and optional filters for place, type and ordering. For a time series, set `sort` to `date` and spot-check the ordering on your own queries, then follow `cursor` until `has_more` is false or you hit your page budget. Each successful call costs 1 credit, and failed calls cost nothing. ```bash curl "https://api.perceptlayer.com/v1/indeed/jobs?query=software+engineer&location=Berlin&country=DE&job_type=full_time&limit=20" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Notes | | --- | --- | --- | | `query` | string, required | Up to 500 characters | | `location` | string | Up to 200 characters | | `country` | string | Up to 2 characters, e.g. `DE` | | `radius`, `radius_unit` | integer, string | `radius_unit` is `MILES` or `KILOMETERS` | | `job_type` | string | `full_time`, `part_time`, `contract`, `internship`, `remote` | | `sort` | string | `relevance` or `date` | | `limit` | integer | Postings per call | | `cursor` | string | From `pagination.next_cursor` | | `hl`, `gl` | string | Up to 2 characters each | The recorded response for that request returns a `jobs` array and a `pagination` object. An excerpt: ```json { "success": true, "data": { "jobs": [ { "id": "805a70464f904dce", "title": "Senior Product Manager (Enterprise)", "company": { "name": "n8n", "profile_url": "/cmp/N8n" }, "location": { "city": "Berlin", "country": "DE", "is_remote": true, … }, "attributes": ["Collaboration with Sales", "Go"], "date_published": "2026-08-12 05:00:00", … } ], "pagination": { "next_cursor": "ABQAAYEAFAAAAAAAAAAAAAAAAmYRNdcAMgEBAQcpfSGrk7wi9QBuLZ6BEihQwmDA0xA2nDAGrqtuJIdLnPZKyLE0IcnT2+IETfyRAAA=", "has_more": true }, "metadata": { "total_results": 20, "timestamp": "2026-10-21T13:25:37.233649Z" } } } ``` For the endpoint basics, see [Indeed Jobs API: Get Job Postings as JSON](https://perceptlayer.com/blog/indeed-jobs-api-json). The [Indeed API: Jobs](https://perceptlayer.com/apis/indeed/jobs) page lists the endpoint, and the playground on the [Indeed API](https://perceptlayer.com/apis/indeed) page runs a real call with your key. ## Do job postings measure hiring? No. A posting records that an employer advertised a role, not that anyone was hired. The US Bureau of Labor Statistics counts both separately in its Job Openings and Labor Turnover Survey: in August 2026 it reported 7.1 million job openings and 5.2 million hires ( [BLS, JOLTS news release](https://www.bls.gov/jlt/), 2026). The gap between the two is the first thing to keep in mind when reading a postings chart. Several biases follow from that, and each changes how you should read a trend. - **Duplicates and reposts.** The same role can appear more than once. Count by `id`, and consider also collapsing on company, normalised title and city. - **Ghost and evergreen postings.** Some listings stay up with no intent to fill them soon. A rising count can mean more advertising, not more demand. - **Channel coverage.** One site's postings over-represent the employers and occupations that use it. Small firms and informal hiring are under-counted. - **Multiple hires per posting.** One posting can fill several seats, and many hires never involve a posting. - **Query shape.** Keyword search returns what matches the words, so a title that changes name drops out of your series. None of this makes postings useless. It means the right claim is "advertised demand for X rose" and the right check is a comparison with an official series. JOLTS draws on a survey of about 21,000 establishments ( [BLS, JOLTS Handbook of Methods](https://www.bls.gov/opub/hom/jlt/home.htm), 2026), so it's a sound benchmark for direction, though not for individual roles or cities. JOLTS covers the US only, so it can't check a Berlin panel. For Germany and other EU countries, Eurostat publishes quarterly job vacancy statistics collected from national statistical authorities, and reported that 2.0% of jobs in the EU were vacant in Q2 2026 ( [Eurostat, Job vacancy statistics](https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Job_vacancy_statistics), 2026). Compare the direction of your index with that series, not the level. ## How do you build a repeatable collection plan? Fix a panel of queries and run it on a schedule that never changes. A panel is a list of title and location pairs, such as 25 roles across 10 cities. Each run pages through a set number of calls per pair, saves the raw JSON with a timestamp, and deduplicates by `id` at analysis time. Consistency matters more than breadth, because trend breaks come from changing the panel. Here's a minimal Python collector. It saves each page as a JSON line and stops after a fixed page budget. ```python import json, os, time, datetime, requests API = "https://api.perceptlayer.com/v1/indeed/jobs" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PAIRS = [("software engineer", "Berlin", "DE"), ("data analyst", "Berlin", "DE")] MAX_PAGES = 3 def collect(query, location, country, out): cursor = None for _ in range(MAX_PAGES): params = {"query": query, "location": location, "country": country, "sort": "date", "limit": 20} if cursor: params["cursor"] = cursor r = requests.get(API, headers=HEADERS, params=params, timeout=30) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() data = r.json()["data"] out.write(json.dumps({ "collected_at": datetime.datetime.utcnow().isoformat(), "query": query, "location": location, "jobs": data["jobs"], }) + "\n") if not data["pagination"]["has_more"]: break cursor = data["pagination"]["next_cursor"] with open(f"postings-{datetime.date.today()}.jsonl", "a") as out: for q, loc, c in PAIRS: collect(q, loc, c, out) ``` A client timeout may hide a call that succeeded and was billed, as [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) explains. For the loop itself, [Paginate a Web Data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python) covers safe patterns. Rate limits and `Retry-After` are in the [rate limits docs](https://docs.perceptlayer.com/rate-limits). ### How do you turn the saved pages into an index? Read every saved line, keep one row per `id`, count postings per week of `date_published`, then divide each week by a base week and multiply by 100. This sketch reads the files the collector wrote and assumes one fixed panel. It uses the earliest week as the base, so choose the base week before you look at the results. ```python import glob, json, datetime from collections import Counter seen = {} for path in sorted(glob.glob("postings-*.jsonl")): for line in open(path): for job in json.loads(line)["jobs"]: seen.setdefault(job["id"], job) # one row per posting id weekly = Counter() for job in seen.values(): day = datetime.datetime.strptime(job["date_published"][:10], "%Y-%m-%d").date() year, week, _ = day.isocalendar() weekly[(year, week)] += 1 weeks = sorted(weekly) base = weekly[weeks[0]] for w in weeks: print(w, weekly[w], round(100 * weekly[w] / base, 1)) ``` Each printed row is the ISO week, the unique postings and the index, where the base week is 100. Weeks near your first collection date are incomplete, because older postings that were already taken down never appear. Start the index a few weeks after the first run, and report the index with the panel and the base week stated. ### What does the plan cost? Cost is calls times 1 credit. Take 25 roles across 10 cities, which is 250 pairs. At up to 3 pages each, that's 250 × 3 = 750 calls a week, or 750 credits. Over four weeks that's 750 × 4 × 1 credit = 3,000 credits a month. | Panel | Calls per run | Weekly runs | Credits a month (4 weeks) | Covered by | | --- | --- | --- | --- | --- | | 250 pairs × 3 pages | 750 | 1 | 3,000 | Starter pack, just over 3 months | | 250 pairs × 3 pages | 750 | 2 | 6,000 | Build pack, 8 months | | 250 pairs × 1 page | 250 | 1 | 1,000 | Starter pack, 10 months | The 100 free credits you get on signup after verifying an email, with no card, cover a first test run of 100 pairs at 1 page each. The Starter pack holds 10,000 credits, so the one-run-a-week panel (3,000 credits a month) uses it up in just over three months, and purchased credits last 12 months. The Build pack holds 50,000 credits: at 6,000 credits a month, the two-run panel lasts 8 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost and [Credits](https://docs.perceptlayer.com/credits) for how balances work. ## When is another source a better fit? If you need hires, wages or national benchmarks, use official statistics: they're built for that, and postings can't replace them. Postings fit when you need speed, fine geography, or specific titles and skills that official categories don't carry. Use both, and report the postings series as an index with a clear base period. For other industries' fields, see [Real Estate Listing Data: Fields That Matter for Valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields) [Search Trend Data for Demand Forecasting](https://perceptlayer.com/blog/search-trend-data-demand-forecasting), and the [Web data category](https://perceptlayer.com/blog/category/web-data). For pay data from another source, see [Glassdoor API: Company Reviews and Salaries as JSON](https://perceptlayer.com/blog/glassdoor-salary-data-api). To start collecting, [get a free API key](https://perceptlayer.com/signup) and run your first panel query in the playground. ## APIs in this post - [Indeed **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/indeed) ## Frequently asked questions ### How much does a job posting data collection cost? Each successful call to `/v1/indeed/jobs` costs 1 credit and failed calls cost nothing. A weekly panel of 250 title and city pairs at 3 pages each is 750 calls, so 750 × 4 weeks × 1 credit = 3,000 credits a month. The 100 free credits on signup cover a first test of 100 calls; [pricing](https://perceptlayer.com/pricing) shows what credits cost beyond that. ### Does the Indeed endpoint return salary? The recorded response in our documentation has no salary field, and its `attributes` list holds employment type and skill tags only. Run your own queries and measure how many postings carry pay information before relying on it. Report that coverage rate next to any wage figure you publish. ### Can I compare countries? Yes, use the `country` parameter, up to 2 characters such as `DE`, and read `location.country` in the response. Keep the panel identical across countries and be careful with titles, because the same role is named differently by language. Normalise titles per country before comparing counts. ### How do I avoid counting the same posting twice? Deduplicate on the `id` field, which identifies a posting in the response. The same role can still be advertised more than once, so also compare company, normalised title and city within a window. Keep raw responses and dedupe at analysis time, so you can change the rule without recollecting. ### What happens if a call fails or I run out of credits? Errors return an HTTP status and a JSON body with `code`, `message` and `request_id`. Rate-limited (429) and unavailable (503) replies carry `Retry-After`. When the balance runs out you get `insufficient_credits` (402) and nothing is debited. See [errors in the docs](https://docs.perceptlayer.com/errors). jobs labour market indeed job postings trend analysis ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 27 Oct 2026 Perceptlayer 8 min read ## [Jobs API: Indeed, Glassdoor and Google Jobs Compared](https://perceptlayer.com/blog/jobs-api-comparison) Indeed returns postings with apply\_url and coordinates, Glassdoor returns ratings, reviews and pay percentiles, Google Jobs adds date filters. 1 credit a call. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 20 Sept 2026 Perceptlayer 7 min read ## [Salary Data from Job Sites: Reading Ranges Without Bias](https://perceptlayer.com/blog/salary-data-job-sites-bias) Glassdoor's salaries endpoint returns p10 to p90 total pay, a currency and a national count. How to read those ranges and the biases of self-reported pay. --- title: "Redfin API: Search Homes, Then Property and Valuation" description: "Four Redfin endpoints at 1 credit each: find a region, search homes with a real JSON response, then call property and valuation by property_id." url: https://perceptlayer.com/blog/redfin-api-property-valuation --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Redfin API: Search Homes, Then Property and Valuation 1 Oct 2026 Updated 24 Oct 2026 Perceptlayer 7 min read Perceptlayer is a web data API, and its [Redfin API](https://perceptlayer.com/apis/redfin) has four GET endpoints: `locations`, `search`, `property` and `valuation`. `locations` returns the `region_id`, `region_type` and `market` that `search` needs, `search` returns homes with a `property_id`, and `property` and `valuation` take that ID. Every call costs 1 credit, a failed call costs nothing, and the free tier gives you 100 credits once, on signup. ## Key takeaways - The flow is `/v1/redfin/locations` for `region_id`, `region_type` and `market`, `/v1/redfin/search` for homes, then `/v1/redfin/valuation` or `/v1/redfin/property` per `property_id`. - Each of the four endpoints costs 1 credit, so valuing 100 homes costs 101 credits plus the `search` calls that found them. - The recorded valuation for a listed Seattle home (property 124182) returned `"sectionPreviewText": "Estimate Not Available"`, so check that field before you build on a batch. - `region_type` codes in the recorded `locations` response: 1 neighborhood, 2 zip, 5 county, 6 city. - Free accounts run at 1 request a second; paying accounts run at least 5 a second, so batch time depends on your rate as well as your credits. ## What can you get from the Redfin API? Perceptlayer's Redfin API has four GET endpoints, each costing 1 credit per successful call. The flow runs from finding a region, to listing homes in it, to detail or valuation for one home. Each endpoint returns named fields as JSON instead of a page of HTML. | Endpoint | Returns | Credits | Required parameters | | --- | --- | --- | --- | | `GET /v1/redfin/locations` | Locations | 1 | `query` | | `GET /v1/redfin/search` | Search | 1 | `region_id`, `region_type`, `market` | | `GET /v1/redfin/property` | Property | 1 | `property_id` | | `GET /v1/redfin/valuation` | Valuation | 1 | `property_id` | `property` and `valuation` also accept an optional `listing_id`. Each endpoint has its own page with a playground: [Locations](https://perceptlayer.com/apis/redfin/locations), [Search](https://perceptlayer.com/apis/redfin/search), [Property](https://perceptlayer.com/apis/redfin/property) and [Valuation](https://perceptlayer.com/apis/redfin/valuation). The wider [real estate section](https://perceptlayer.com/verticals/real-estate) lists the other property sources in the catalogue. ## How do you authenticate and find a region? Send your key in the `X-API-Key` header. Keys start with `sk_live_`, and you get one by verifying an email address at [signup](https://perceptlayer.com/signup), with 100 free credits on signup and no credit card. If a header isn't possible, the `api_key` query parameter works too. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both. Start with `locations`. It takes one `query` string of up to 100 characters: ```bash curl "https://api.perceptlayer.com/v1/redfin/locations?query=Seattle%2C+WA" \ -H "X-API-Key: $API_KEY" ``` This is the recorded response, trimmed: ```json { "data": { "locations": [ { "name": "Seattle", "subName": "Seattle, WA, USA", "region_id": 16163, "region_type": 6, "region_type_name": "city", "market": "seattle", "url": "/city/16163/WA/Seattle" }, { "name": "West Seattle", "region_id": 3040, "region_type": 1, "region_type_name": "neighborhood", "market": "seattle", … } ], "query": "Seattle, WA", "_usage": { "step": "Use region_id, region_type, and market from the locations response in your search query", "region_types": { "1": "neighborhood", "2": "zip", "5": "county", "6": "city" }, … } } } ``` The same query returns the city and its neighborhoods, each with its own `region_id`. Pick the row you want and pass its `region_id`, `region_type` and `market` to `search`. ## What do the region\_type codes mean? `region_type` is an integer, and `search` accepts 1, 2, 4, 5 or 6. The recorded `locations` response lists four of them in `_usage.region_types` and repeats the name on each row as `region_type_name`. Rather than hard-code a code, read it from the row you picked. | `region_type` | Name | | --- | --- | | 1 | neighborhood | | 2 | zip | | 5 | county | | 6 | city | Code 4 is accepted by `search`, but the recording doesn't show a name for it. ## Which parameters does the search endpoint take? `search` requires `region_id` (integer), `region_type` (integer) and `market` (string, up to 30 characters), all three taken from a `locations` row. Everything else narrows the results. The [Search endpoint page](https://perceptlayer.com/apis/redfin/search) lets you try combinations in the playground before you write any code. | Parameter | Type | Required | | --- | --- | --- | | `region_id` | integer | yes | | `region_type` | integer | yes | | `market` | string | yes | | `min_price`, `max_price`, `num_beds`, `num_baths`, `property_types`, `status`, `sold_within_days`, `num_homes`, `page` | integer, except `num_baths` (number) and `property_types` (string) | no | `status` accepts one of 1, 9, 130 or 131. ## What does a search response look like? A recorded `/v1/redfin/search` response for Seattle ( `region_id=16163`, `region_type=6`, `sold_within_days=30`) returns `data.properties` with fields such as `property_id`, `listing_id`, `address`, `price`, `beds`, `baths`, `sqft` and `status`, plus a `count` of 350. Optional fields like `lot_size` appear only on some rows. ```bash curl "https://api.perceptlayer.com/v1/redfin/search?region_id=16163®ion_type=6&market=seattle&sold_within_days=30" \ -H "X-API-Key: $API_KEY" ``` ```json { "data": { "properties": [ { "property_id": 7716, "listing_id": 224554789, "address": "7700 E Green Lake Dr N Unit D4", "price": 885000, "status": "Coming Soon", … }, { "property_id": 124182, "listing_id": 224635828, "address": "2517 25th Ave W", "city": "Seattle", "state": "WA", "zip": "98199", "price": 2750000, "beds": 3, "baths": 4, "sqft": 3570, "lot_size": 5120, "year_built": 2005, "status": "Coming Soon", … } ], "count": 350, "region_id": 16163, "region_type": 6 } } ``` Each row carries both `property_id` and `listing_id`, the identifiers that `property` and `valuation` take. Both rows show `"status": "Coming Soon"` even though the request passed `sold_within_days`, so read `status` on each row instead of assuming it from your filters. The first row has no `lot_size`, so treat optional fields as optional in your code. ## What does the valuation endpoint return? The valuation endpoint returns a JSON object with the listing price, the last sold price and date, and an estimate summary in `sectionPreviewText`. For property 124182 in the recorded call, the estimate section read "Estimate Not Available". The valuation is for a home that is currently listed, and it came back without an estimate. ```bash curl "https://api.perceptlayer.com/v1/redfin/valuation?property_id=124182&listing_id=224635828" \ -H "X-API-Key: $API_KEY" ``` ```json { "data": { "numBeds": 3, "numBaths": 4, "sqFt": { "displayLevel": 1, "value": 3570 }, "listingPrice": 2750000, "lastSoldPrice": 1050000, "lastSoldDate": 1285830000000, "priceInfo": { "amount": 2750000, "label": "Listed at Price", … }, "sectionPreviewText": "Estimate Not Available", "propertyId": 124182 } } ``` What you do get is context: a `listingPrice` of 2,750,000 against a `lastSoldPrice` of 1,050,000. `lastSoldDate` looks like epoch milliseconds, which for 1285830000000 is 30 September 2010. What you don't get, for this home, is an estimate. That's a real limit if you plan to value a batch of listed homes: some rows may return a price history but no estimate, so count them instead of assuming every call yields a number. Redfin explains how its estimates work on its [Redfin Estimate page](https://www.redfin.com/redfin-estimate), worth reading before you build anything that depends on a valuation. ## What does the property endpoint add? `property` returns the detail record for one home. The recorded call for the same home returned `address`, `price`, `price_label` ("Listed at Price"), `beds`, `baths`, `sqft`, `lot_size`, `year_built`, `latitude`, `longitude` and a `photos` array of URLs, each call costing 1 credit. ```bash curl "https://api.perceptlayer.com/v1/redfin/property?property_id=124182&listing_id=224635828" \ -H "X-API-Key: $API_KEY" ``` If you only need price, beds and address, the search rows already have them. Call `property` when you need more than a search row holds, such as coordinates and photos, and `valuation` when the estimate or price history is the point. Keep the raw JSON from your own runs: data is collected from publicly available sources and returned as found at the time of the call, so treat a valuation as a snapshot. ## How do you value a batch of addresses in Python? To value a batch, search once, collect each `property_id` and `listing_id`, then call `/v1/redfin/valuation` in a loop at no more than the account's request rate. On a 429 or 503 response, wait for the `Retry-After` seconds. The script below stores each response untouched and counts the homes that returned no estimate. ```python import os import time import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): for _ in range(3): r = requests.get(BASE + path, headers=HEADERS, params=params, timeout=30) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "1"))) continue r.raise_for_status() print(path, "remaining:", r.headers.get("X-Credits-Remaining")) return r.json() raise RuntimeError(f"gave up on {path}") search = get( "/v1/redfin/search", region_id=16163, region_type=6, market="seattle", sold_within_days=30, ) valuations = {} for home in search["data"]["properties"][:20]: valuations[home["property_id"]] = get( "/v1/redfin/valuation", property_id=home["property_id"], listing_id=home["listing_id"], ) time.sleep(1.1) # free accounts: 1 request a second missing = [ pid for pid, v in valuations.items() if v["data"].get("sectionPreviewText") == "Estimate Not Available" ] print(len(missing), "of", len(valuations), "returned no estimate") ``` Two cautions. Requests have no idempotency key, so a call that timed out on your side may still have succeeded and been billed. And a plain retry loop is fine at 1 request a second, but on faster accounts read `RateLimit-Remaining`. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) and the [errors docs](https://docs.perceptlayer.com/errors) cover both. ## What does valuing a batch cost? Valuing homes through the Redfin API costs 1 credit per `valuation` call. Valuing 100 homes takes 1 `locations` call, N `search` calls and 100 `valuation` calls: 1 + N + 100 = 101 + N credits. In general, credits = calls × 1 credit and seconds = calls ÷ requests per second. Failed calls return `X-Credits-Used: 0`. | Job | Calls | Credits | | --- | --- | --- | | Value 100 homes | 1 `locations` + N `search` + 100 `valuation` | 101 + N | | Value 100 homes, plus details | the above + 100 `property` | 201 + N | | Value 1,000 homes | 1 `locations` + N `search` + 1,000 `valuation` | 1,001 + N | N is the number of `search` calls it takes to list your homes; check how many properties your own searches return. The 100 free credits, granted once at signup, don't cover any of these rows, since even the first is 101 + N. They cover a test run: 1 `locations` call, 1 `search` call and 98 valuations is 100 credits. The 10,000-credit Starter pack covers each row. Remember that a `valuation` call that returns "Estimate Not Available" still costs its credit. Time matters too. As of 2026-10-24, free accounts get 1 request a second (60 a minute), so 1,000 valuations take 1,000 ÷ 1 = 1,000 seconds, about 17 minutes. Paying accounts run at least 5 requests a second, so the same batch takes 1,000 ÷ 5 = 200 seconds. The [credits docs](https://docs.perceptlayer.com/credits) explain how balances work, and [pricing](https://perceptlayer.com/pricing) shows what credits cost and the faster-rate options. ## When is another source a better fit? If you want aggregate market statistics rather than individual homes, Redfin publishes downloadable market-level data on its own [Data Center](https://www.redfin.com/news/data-center/), which suits trend charts better than thousands of per-property calls. For other countries, the catalogue has similar guides: [Immobilienscout24 for German listings](https://perceptlayer.com/blog/immobilienscout24-api-listings), [Rightmove for UK property](https://perceptlayer.com/blog/rightmove-api-property-data) and [Craigslist postings](https://perceptlayer.com/blog/craigslist-api-postings-json). More walkthroughs sit in the [API guides category](https://perceptlayer.com/blog/category/api-guides). Your next step: [get a free API key](https://perceptlayer.com/signup), run `locations` for your own city, and feed one `property_id` and `listing_id` from the search into the valuation playground. ## APIs in this post - [Redfin **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/redfin) ## Frequently asked questions ### How much does the Redfin API cost per call? Each of the four Redfin endpoints costs 1 credit per successful call. Failed calls cost nothing and return `X-Credits-Used: 0`. Every account gets 100 free credits once, after verifying an email, with no credit card. Purchased credits last 12 months. Pack sizes and what credits cost are on the [pricing page](https://perceptlayer.com/pricing). ### What do I need before calling the valuation endpoint? You need a `property_id`, an integer. The easiest source is a row from a `search` response, where each home carries a `property_id` and a `listing_id`; `listing_id` is optional. Call `locations` first if you don't yet know which region to search, since it returns the `region_id`, `region_type` and `market` that `search` requires. ### Does the valuation endpoint always return an estimate? No. The recorded valuation for a listed Seattle home (property 124182) returned `listingPrice`, `lastSoldPrice` and `lastSoldDate`, but its `sectionPreviewText` was "Estimate Not Available". Check that field on every response in a batch and keep the count of homes without an estimate. ### What happens when I hit the rate limit? You get a `429` response with a `Retry-After` header giving the seconds to wait, and the body has the code `rate_limited`. Free accounts get 1 request a second. Limits are per account and shared by all keys. Wait the stated time and retry; a rate-limited call isn't billed. See [rate limits](https://docs.perceptlayer.com/rate-limits). ### Can an AI agent call these endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. An agent can look up the Redfin endpoints for free, then spend 1 credit per successful call. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show how to add the server. real estate redfin property valuation listings home search ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 9 min read ## [Redfin Scraper or API: What You Get](https://perceptlayer.com/blog/redfin-scraper-vs-api) A Redfin scraper vs 14 Redfin endpoints at 1 credit each: recorded Seattle locations, search, property and valuation calls, and the cost per home tracked. --- title: "Vinted API: Search Second-Hand Items as JSON | Perceptlayer" description: "Search Vinted as JSON with 14 optional parameters, then price-check one query across 19 countries. Each call costs 1 credit; failed calls cost nothing." url: https://perceptlayer.com/blog/vinted-api-search-items-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Vinted API: Search Second-Hand Items as JSON 1 Oct 2026 Updated 7 Nov 2026 Perceptlayer 6 min read One GET request to `/v1/vinted/search` returns Vinted listings as JSON: title, price, service fee, total price, photos and the seller's id. Add `country` to pick the market and `order=price_low_to_high` to sort. Each call costs 1 credit, and you can repeat the same query across 19 country codes to price-check an item across markets. ## Key takeaways - `GET /v1/vinted/search` takes 14 optional parameters, including `query`, `order`, `price_from`, `price_to` and `country`. None is required. - Each listing carries `price`, `service_fee` and `total_item_price`, each with an `amount` and a `currency_code`. - A cross-country price check is one search per country code: 19 codes, 19 credits per sweep. - Every Vinted endpoint costs 1 credit on success. Failed calls cost nothing and return `X-Credits-Used: 0`. - The free tier gives 100 credits on signup, enough for 5 full 19-country sweeps with no card. ## How do you get Vinted data as JSON? Send a GET request to `https://api.perceptlayer.com/v1/vinted/search` with your key in the `X-API-Key` header. The response is JSON with named fields, not a page of HTML. A free account gets 100 credits after you verify an email address, and a search costs 1 credit, so you can run the call below straight away. [Get a free API key](https://perceptlayer.com/signup), then keep it in an environment variable. Keys start with `sk_live_`; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the `api_key` query parameter for places where you can't set a header. ```bash curl "https://api.perceptlayer.com/v1/vinted/search?query=nike+shoes&country=DE" \ -H "X-API-Key: $API_KEY" ``` That is a search for "nike shoes" on the German market. You can also run it from the playground on the [Vinted API page](https://perceptlayer.com/apis/vinted) without writing any code. The catalogue has 10 Vinted endpoints in all; this guide uses search, filters, countries and item details. ## What does the Vinted search response contain? The search response wraps the listings in `data.items` and puts paging details in `data.pagination`. Every item has an `id`, a `title`, a relative `url`, a `price` object, a `service_fee`, a `total_item_price`, photos, a `favourite_count` and a `user` object. The excerpt below is trimmed from a recorded call to the request above. ```json { "success": true, "data": { "items": [ { "favourite_count": 66, "id": 10490818547, "item_box": { "accessibility_label": "Nikeshoe size 38.5, Marke: Nike, Zustand: Sehr gut, Größe: 38.5, 20.00 €, 21.70 €", "second_line": "38.5 · Sehr gut" }, "price": { "amount": "20.00", "currency_code": "EUR" }, "promoted": false, "service_fee": { "amount": "1.70", "currency_code": "EUR" }, "title": "Nikeshoe size 38.5", "total_item_price": { "amount": "21.70", "currency_code": "EUR" }, "url": "/items/10490818547-nikeshoe-size-385", … }, … ], "pagination": { "current_page": 1, "per_page": 24, "total_entries": 960, "total_pages": 40 }, … }, "message": "Items retrieved successfully", … } ``` Three details matter if you're comparing prices. Amounts are strings, so convert them before you do arithmetic. `price` is the seller's price, while `total_item_price` includes the service fee (20.00 plus 1.70 gives 21.70 in this record). And `promoted` marks sponsored placements: the second item in the same recorded response has `promoted` set to `true`, so filter on it if you want organic results only. ## Which parameters does the Vinted search endpoint take? The search endpoint has 14 optional parameters and no required ones. Free text goes in `q` or `query`, sorting in `order`, price bounds in `price_from` and `price_to`, and the market in `country`. The ID filters ( `brand_ids`, `catalog_ids`, `color_ids`, `size_ids`, `material_ids`, `status_ids`) take strings, so check the [search endpoint page](https://perceptlayer.com/apis/vinted/search) before you rely on a format. | Parameter | Type | Allowed values or limit | | --- | --- | --- | | `q`, `query` | string | up to 500 characters | | `page` | integer | none stated | | `per_page` | integer | none stated | | `order` | string | `relevance`, `newest_first`, `price_low_to_high`, `price_high_to_low` | | `brand_ids` | string | up to 500 characters | | `catalog_ids` | string | up to 500 characters | | `color_ids` | string | up to 200 characters | | `size_ids` | string | up to 200 characters | | `material_ids` | string | up to 200 characters | | `status_ids` | string | up to 100 characters | | `price_from`, `price_to` | number | none stated | | `country` | string | FR, DE, ES, IT, NL, BE, AT, PL, CZ, LT, LU, SK, HU, RO, PT, SE, DK, FI, US | For a cheapest-first view of used trainers between two prices, combine them: `?query=nike+shoes&country=DE&price_from=10&price_to=30&order=price_low_to_high`. ## How do filters fit in front of search? `GET /v1/vinted/filters` accepts the same 14 optional parameters as search and costs 1 credit, so you can send it the same `query` and `country` you plan to search with. The [Vinted filters endpoint](https://perceptlayer.com/apis/vinted/filters) page documents it. Search takes ID parameters such as `brand_ids` and `size_ids`, but this article doesn't show where to get those values. The filters response wasn't recorded for this article, so it doesn't say what comes back. Run it in the playground on the [Vinted API page](https://perceptlayer.com/apis/vinted) and read the real response before you build on it. If you repeat the same calls, the [caching guide](https://perceptlayer.com/blog/cache-web-data-api-responses) covers TTLs and the credits you save. ## How do you get the details of one Vinted item? Call `GET /v1/vinted/item-details` with the `item_id` from a search result's `id` field. The only required parameter is `item_id`; `country` and `include_member_items` (a boolean) are optional. It costs 1 credit, or 2 with `include_member_items`; every other Vinted endpoint costs 1. Its response wasn't recorded for this article, so run it in the playground on the [Vinted API page](https://perceptlayer.com/apis/vinted) to see what it returns. ```bash curl "https://api.perceptlayer.com/v1/vinted/item-details?item_id=10490818547&country=DE" \ -H "X-API-Key: $API_KEY" ``` Two sibling endpoints take the same `item_id`: [Item Shipping](https://perceptlayer.com/apis/vinted/item-shipping) for delivery options and [Similar Items](https://perceptlayer.com/apis/vinted/similar-items) for comparable listings. Item details and similar items also accept `GB`, which search doesn't. ## How do you price-check an item across countries? Run the same search once per country code and compare the prices that come back. The [Countries endpoint](https://perceptlayer.com/apis/vinted/countries) takes no parameters and costs 1 credit. The search endpoint accepts 19 country codes, so one sweep is 19 calls × 1 credit = 19 credits. The script below loops over the codes, asks for the cheapest listings first and keeps the lowest `total_item_price` per country. It waits a second between calls to stay inside the free tier's 1 request a second. Run it with `pip install requests` and `API_KEY` set. ```python import os import time import requests BASE = "https://api.perceptlayer.com/v1/vinted/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} COUNTRIES = ["FR", "DE", "ES", "IT", "NL", "BE", "AT", "PL", "CZ", "LT", "LU", "SK", "HU", "RO", "PT", "SE", "DK", "FI", "US"] def cheapest(query, country): r = requests.get( BASE, headers=HEADERS, params={"query": query, "country": country, "order": "price_low_to_high"}, timeout=30, ) if r.status_code != 200: print(country, "failed:", r.status_code, r.json()["error"]["code"]) return None items = r.json()["data"]["items"] if not items: return None best = min(items, key=lambda i: float(i["total_item_price"]["amount"])) total = best["total_item_price"] return float(total["amount"]), total["currency_code"], best["url"] for country in COUNTRIES: print(country, cheapest("nike air max", country)) time.sleep(1) ``` Read the currency before you compare anything. Each result carries its own `currency_code`, so check it and convert with a rate you trust before ranking countries. For shipping data on a specific listing, the [Item Shipping endpoint](https://perceptlayer.com/apis/vinted/item-shipping) returns it. One sweep returns the cheapest listing on the first page of each market, which is a sample, not the whole market. To read deeper, walk `page` up to `total_pages`; the [pagination guide](https://perceptlayer.com/blog/paginate-web-data-api-python) shows a safe loop. If the same item appears in several results, [deduplicating listings](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers matching without shared IDs. ## What does a Vinted API call cost? Every Vinted endpoint costs 1 credit on a successful call, and a failed call costs nothing. Each response carries `X-Credits-Used` and `X-Credits-Remaining`, so you can track the balance as you go. Walking the 40 pages of the recorded "nike shoes" search in Germany would cost 40 calls × 1 credit = 40 credits. | Job | Calls | Credits | | --- | --- | --- | | One search | 1 | 1 | | One 19-country sweep | 19 × 1 | 19 | | Sweep plus item details for each country's top hit | 19 + 19 | 38 | | Daily 19-country sweep for 30 days | 30 × 19 | 570 | The 100 free credits on signup cover the first 5 days of the daily sweep; a year of it, 6,840 credits, fits in the Starter pack's 10,000. Larger volumes use prepaid packs that last 12 months, with no subscription; see [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they are debited. For the rules on request rates, read [rate limits](https://docs.perceptlayer.com/rate-limits). ## What should you build next? Start with one query you actually resell or buy. Run it in the playground on the [Vinted API page](https://perceptlayer.com/apis/vinted), then paste the cURL call into a script and move to the 19-country loop above. If you already track listings elsewhere, the [eBay search results guide](https://perceptlayer.com/blog/ebay-item-search-data-json) uses the same pattern, and the [Marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists the other marketplace sources in the catalogue. If a call fails, the [errors docs](https://docs.perceptlayer.com/errors) list every status and code. The data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Vinted **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/vinted) ## Frequently asked questions ### Which Vinted endpoints are available? The catalogue has 10 Vinted endpoints: categories, countries, filters, item details, item shipping, search, similar items, suggestions, user items and user profile. All are GET requests and cost 1 credit on success. Data is collected from publicly available sources and returned as found at the time of the call. ### How much does one Vinted search cost? One successful search costs 1 credit, and so does every other Vinted endpoint. Failed calls cost nothing and return `X-Credits-Used: 0`. The free tier gives 100 credits on signup with no credit card, so you can run 100 searches before you buy a pack. The [pricing page](https://perceptlayer.com/pricing) shows what credits cost. ### Can I search Vinted in the UK with this API? The search endpoint accepts 19 country codes, and `GB` isn't one of them. Item details, similar items and suggestions do accept `GB`, so you can look up a known UK listing by `item_id` or get suggestions for a query. For search, use one of the 19 supported codes listed in the parameter table above. ### How do I page through all the results? Pass `page` and read `data.pagination`, which holds `current_page`, `per_page`, `total_entries` and `total_pages`. In the recorded call, 960 entries spread over 40 pages of 24. Each page is a separate call at 1 credit, so 40 pages cost 40 credits. Stop when `current_page` reaches `total_pages`. ### What happens if I hit the rate limit? A request over your account's rate returns a 429 with a `Retry-After` header giving the seconds to wait (see the [MDN page for `Retry-After`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) and [RFC 6585](https://www.rfc-editor.org/rfc/rfc6585), which defines the 429 status code). Free accounts get 1 request a second, counted per minute across all keys. The 429 isn't billed. See [errors](https://docs.perceptlayer.com/errors) for the full list of codes. vinted marketplaces resale second-hand price comparison ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Vinted Scraper or API: What You Get](https://perceptlayer.com/blog/vinted-scraper-vs-api) A Vinted scraper vs 10 endpoints: one recorded search returned 24 items with price, service\_fee and total\_item\_price for 1 credit, about 0.04 credits per item. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 7 min read ## [Poshmark and Mercari APIs: Resale Listings as JSON](https://perceptlayer.com/blog/poshmark-mercari-api-resale-listings) Poshmark and Mercari search side by side: filters, listing fields such as original\_price and condition, paging, and 1 credit per page of listings. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. --- title: "Google News API: Search News Articles as JSON | Perceptlayer" description: "One GET call to /v1/google-news/news returns articles with title, link, source and ISO date as JSON for 1 credit. Parameters, a real response, cost." url: https://perceptlayer.com/blog/google-news-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google News API: Search News Articles as JSON 28 Sept 2026 Updated 22 Oct 2026 Perceptlayer 7 min read To search Google News as JSON, send a GET request to `/v1/google-news/news` with a search term in `q`. Each result comes back with a title, link, snippet, source name and an ISO 8601 publish date. A successful call costs 1 credit, a failed one costs nothing, and the free tier's 100 credits on signup cover 100 calls. ## Key takeaways - `GET /v1/google-news/news?q=technology` returns a `news_results` array; each item has `position`, `title`, `link`, `snippet`, `iso_date`, `published_at`, `source` and `story_token`. - Every parameter is optional. `q` takes up to 500 characters; `topic_token`, `publication_token`, `section_token`, `story_token` and `kgmid` are string parameters whose values appear in responses; the playground shows what each does. - One call costs 1 credit. A monitor running 20 queries twice a day uses 20 × 2 × 30 = 1,200 credits a month. - Failed calls return `X-Credits-Used: 0`, so a bad request or a source error never touches your balance. - You need a key that starts with `sk_live_`; the free tier gives 100 credits on signup with no credit card. ## Is there an official Google News API? Google's News help pages are written for publishers, and we found no keyword search API among them. What Google documents is a publisher-side tool: [Publisher Center](https://support.google.com/news/publisher-center), where news publishers manage how their own content appears. That's the opposite direction from what a developer wants, which is a query in and articles out. Publisher Center feeds don't fill the gap either. In an announcement dated March 2025, Google said it was moving to automatically generated publication pages and that "Google News will no longer use RSS feeds or web locations that were submitted in Publisher Center" ( [Google News Publisher Center announcement](https://support.google.com/news/publisher-center/announcements/10146168), 2025). Those feeds were about publishers submitting content, never about searching it. Nothing in that announcement describes a search feed you could build on. So the practical options are scraping the results page yourself, paying each publisher's own API, or calling an endpoint that already returns the results as JSON. If you only need one publisher's articles, that publisher's own feed or API is simpler and you should use it. If you need a cross-publisher search, the [Google News API](https://perceptlayer.com/apis/google-news) here gives you one request and a stable shape. For the maintenance side of the scraping option, see [what maintaining a scraper really involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost). ## How do you search Google News with one request? Send a GET request to `https://api.perceptlayer.com/v1/google-news/news` with your key in the `X-API-Key` header and a query in `q`. The response is JSON with a `news_results` array, each item numbered by `position`. The whole call is one HTTP request and costs 1 credit when it succeeds. ```bash curl "https://api.perceptlayer.com/v1/google-news/news?q=technology" \ -H "X-API-Key: $API_KEY" ``` Replace `$API_KEY` with a key from [a free sign-up](https://perceptlayer.com/signup). Where headers aren't possible, the key also works as the `api_key` query parameter. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both, and the [Requests section](https://docs.perceptlayer.com/requests) explains the general call format. You can also run the same call without writing code. The [News endpoint page](https://perceptlayer.com/apis/google-news/news) links to the playground, where you pick the endpoint, fill in the parameters and run it with your key. ## What does the response look like? Each item in `news_results` describes one article. Below is an excerpt from a recorded response to the request above, trimmed with `…`: position 1 is omitted, and the thumbnail fields, the source icon and the publication link are cut. It shows the fields you'll use most: the headline, the link, the publish time in three forms, and the source. ```json { "news_results": [ … { "position": 2, "title": "How did AI discover the internet's massive cyber-security risk?", "link": "https://www.bbc.com/news/videos/cq0ld7e0jg2eo", "type": "article", "snippet": "The BBC's technology correspondent Joe Tidy explains how it happened, and what it means for you.", "iso_date": "2026-10-22T12:17:44+00:00", "published_at": "2026-10-22 12:17:44 UTC", "date": "today", … "source": { "name": "BBC", … "title": "BBC" }, "story_token": "CBMiWEFVX3lxTFBkQ0VLSmdYNkk0TzVBZGtlU3piaFlGejFNemlncTZRTWR2MjFlNDhpWWNiVnJMYk5PRUo3eHJ2YlppUmtoLW5FbERMTFNBZ2xkMVhzNmpFWXU", "related_publications": [ { "title": "BBC", … "publication_token": "CAAqIAgKIhpDQklTRFFnTWFna0tCMkppWXk1amIyMG9BQVAB" } ] }, … ], "menu_links": [ … ] } ``` The table below lists what each field is for. These are the fields shown in the excerpt; the full items also carry thumbnail URLs, a source icon and a publication link. | Field | What it holds | Use it for | | --- | --- | --- | | `position` | Number of the result in the response | Preserving the order you received | | `title`, `snippet` | Headline and a short text excerpt | Display, keyword filters | | `link` | URL of the article on the publisher's site | Deduplication, fetching the full text | | `iso_date` | Publish time in ISO 8601 with offset | Sorting and date windows | | `published_at` | The same time as `2026-10-22 12:17:44 UTC` | Human-readable logs | | `date` | Relative label such as `today` or `2 days ago` | Display only; don't parse it | | `source.name` | The publisher's name | Grouping by outlet | | `story_token` | Token for the story | The `story_token` parameter | | `related_publications[].publication_token` | Token for the publisher | The `publication_token` parameter | Store `iso_date`, not `date`. The relative label changes depending on when you call, while `iso_date` is the same tomorrow as today. ## Which parameters does the News endpoint take? The endpoint has no required parameters and eleven optional ones. `q` is the free-text search, up to 500 characters. The four `*_token` parameters and `kgmid` are strings; token values appear in responses, and the playground shows what each one does. | Parameter | Type | Notes | | --- | --- | --- | | `q` | string | Search query, up to 500 characters | | `gl` | string | Up to 2 characters | | `hl` | string | Up to 2 characters | | `topic_token` | string | Up to 200 characters | | `kgmid` | string | Up to 100 characters | | `publication_token` | string | Up to 200 characters; matches `related_publications[].publication_token` in a response | | `section_token` | string | Up to 200 characters | | `story_token` | string | Up to 2,000 characters; matches `story_token` on a result | | `so` | integer | One of 0, 1 | | `start` | integer | Optional | | `page` | integer | Optional | `gl` and `hl` are two-character values, which is the shape of country and language codes. The endpoint documentation doesn't spell out defaults, page sizes or what each value of `so` does, so test them in the playground before you build on them. Our guide to [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python) covers the loop pattern for `start` and `page` style parameters. ### How do you use the tokens in a response? Responses include `story_token` and `related_publications[].publication_token`, and the endpoint accepts parameters of the same names. Copy a token from a result into the matching parameter in the playground to try it; we haven't recorded those calls, so we don't describe what they return. A successful call costs 1 credit like any other. ## How much does a daily news monitor cost? A news monitor costs 1 credit per query per run. Multiply queries by runs per day by days: 20 queries checked twice a day for 30 days is 20 × 2 × 30 = 1,200 credits. The Starter pack's 10,000 credits would cover that for more than eight months (10,000 ÷ 1,200 ≈ 8.3), and [pricing](https://perceptlayer.com/pricing) shows what credits cost. | Monitor | Calls per month | Credits | Notes | | --- | --- | --- | --- | | 10 queries, once a day | 10 × 30 = 300 | 300 | Free credits cover the first 10 days, then a pack | | 20 queries, twice a day | 20 × 2 × 30 = 1,200 | 1,200 | 1,200 ÷ 10,000 of a Starter pack | | 100 queries, once a day | 100 × 30 = 3,000 | 3,000 | 3,000 ÷ 10,000 of a Starter pack | Packs: Starter is 10,000 credits, Build 50,000, Growth 200,000, Pro 500,000, Scale 1,000,000 and Volume 5,000,000. Purchased credits last 12 months, and there's no subscription. See [pricing](https://perceptlayer.com/pricing) for what each pack costs and its request rate, and the [credits docs](https://docs.perceptlayer.com/credits). A monitor that asks the same query often can skip repeat calls; [caching API responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses) shows how TTLs save credits. Failed calls cost nothing. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a monitor can log its own balance. The service is prepaid, so when credits run out calls return `insufficient_credits` (402) and nothing more is debited. ## How do you run it on a schedule? Run the query list from a cron job or scheduled function, keep the `link` of every article you've seen and store only new ones. The script below does that with the fields from the recorded response: `news_results`, `title`, `link`, `iso_date` and `source.name`. ```python import os import requests API = "https://api.perceptlayer.com/v1/google-news/news" HEADERS = {"X-API-Key": os.environ["API_KEY"]} QUERIES = ["technology", "cybersecurity"] seen = set() # load from your database in a real job for q in QUERIES: r = requests.get(API, params={"q": q}, headers=HEADERS, timeout=30) if r.status_code != 200: print(q, r.status_code, r.json()["error"]["code"]) continue for item in r.json()["news_results"]: if item["link"] in seen: continue seen.add(item["link"]) print(item["iso_date"], item["source"]["name"], item["title"]) print("credits left:", r.headers["X-Credits-Remaining"]) ``` Two points about errors. A 429 or 503 response carries a `Retry-After` header with the seconds to wait, and the [rate limit docs](https://docs.perceptlayer.com/rate-limits) cover the details. Requests have no idempotency key, so a call that timed out on your side may have succeeded and been billed; the article on [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) shows how to handle that. The [error reference](https://docs.perceptlayer.com/errors) lists every code. If an agent rather than a cron job needs the news, the same endpoint is available through the MCP server at `https://perceptlayer.com/mcp`. Its `call_endpoint` tool takes the endpoint ID and the same parameters; see the [MCP docs](https://docs.perceptlayer.com/ai-agents) and [giving a Claude agent live search results](https://perceptlayer.com/blog/claude-agent-live-search-mcp). The sibling guide for web results is [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json). Next step: [get a free API key](https://perceptlayer.com/signup), then run the first cURL call above for `q=technology` and look at `iso_date` and `source.name` in your own response. Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Google News **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-news) ## Frequently asked questions ### Does Google have an official news search API? Google's [Publisher Center help](https://support.google.com/news/publisher-center) is aimed at publishers managing their own content, and we found no keyword search API for news results there. In March 2025 Google also said it would stop using feeds submitted in Publisher Center. A JSON endpoint such as `/v1/google-news/news` fills the gap for developers who need to search across publishers. ### How much does one News API call cost? A successful call to `/v1/google-news/news` costs 1 credit. The free tier includes 100 credits after you verify an email address, which covers 100 calls, and [pricing](https://perceptlayer.com/pricing) shows what credits cost beyond that. Failed calls cost nothing and return `X-Credits-Used: 0`, so errors don't reduce your balance. ### How do I get only new articles on each run? Store the `link` of every article you've processed and skip items whose link you've seen. Sort by `iso_date`, which is ISO 8601 with an offset, rather than the relative `date` label such as `2 days ago`. Don't use `position` for this, because it numbers the results in the response you received, so the link is the safer identity. ### Which token parameters does the endpoint accept? The endpoint accepts `publication_token`, `topic_token`, `section_token`, `story_token` and `kgmid` as string parameters. Publisher and story tokens appear in responses as `related_publications[].publication_token` and `story_token`. We haven't recorded what each returns, so try them in the playground. `q` takes free text up to 500 characters. ### What happens if a call fails or the balance runs out? Errors return an HTTP status and a JSON body with `error.code`, `error.message` and `request_id`. Rate-limited (429) and unavailable (503) responses include `Retry-After`. When credits run out, calls return `insufficient_credits` (402) and nothing is debited; there's no automatic top-up. google news news api news monitoring search json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 27 Oct 2026 Perceptlayer 8 min read ## [News API Options: Google News and Search as JSON](https://perceptlayer.com/blog/news-api-comparison) Compare three news API routes: Google News returns headline, source.name, iso\_date and link per article; web search endpoints don't. 1 credit a query. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Google News Scraper or API: What You Get](https://perceptlayer.com/blog/google-news-scraper-vs-api) A Google News scraper vs a 1-credit news call: the recorded response with iso\_date, source and story\_token, and 4 credits per tracked query per day. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Sept 2026 Perceptlayer 6 min read ## [Google Patents API: Search Patents and Get Details](https://perceptlayer.com/blog/google-patents-api-search-details) Search Google Patents by keyword, inventor or assignee with one GET call, then fetch full details by patent\_id. Both endpoints cost 1 credit per call. --- title: "Kleinanzeigen API: Search German Classifieds as JSON" description: "Search Kleinanzeigen ads by query, city, category and price range with one GET call. Parameters, a real response and the cost: 1 credit per call." url: https://perceptlayer.com/blog/kleinanzeigen-api-search-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Kleinanzeigen API: Search German Classifieds as JSON 28 Sept 2026 Perceptlayer 7 min read To get Kleinanzeigen listings as JSON, call `GET /v1/kleinanzeigen/search` with a `query` and, optionally, `location`, `category`, `price_min`, `price_max` and `page`. Each ad comes back with its id, title, price, location, image and a description excerpt. A successful call costs 1 credit, a failed call costs nothing, and a daily check of one search is 30 credits a month. ## Key takeaways - `GET /v1/kleinanzeigen/search` needs one parameter, `query`; `location`, `category`, `price_min`, `price_max` and `page` narrow it. - Each result has a numeric `price_numeric` next to the display string `price`, so you can compare prices without parsing "399 €". - `meta.has_next_page` tells you whether to request `page=2`; every page is a separate 1-credit call. - The Kleinanzeigen API has 3 endpoints (Search, Details, Shipping Options), each 1 credit. - A daily check of one search over 2 pages is 60 calls × 1 credit = 60 credits a month; the 100 free credits on signup cover its first 50 days. ## Which Kleinanzeigen endpoints can you call? The [Kleinanzeigen API](https://perceptlayer.com/apis/kleinanzeigen) has three endpoints, all `GET`, all 1 credit per successful call. Search finds ads by keyword, Details returns one ad by its id, and Shipping Options takes no parameters at all. For monitoring, Search does nearly all the work, and you reach for Details only when a result is worth a closer look. | Method | Path | Returns | Credits | Required | Optional | | --- | --- | --- | --- | --- | --- | | GET | `/v1/kleinanzeigen/search` | Search | 1 | `query` | `page`, `location`, `category`, `price_min`, `price_max` | | GET | `/v1/kleinanzeigen/details` | Details | 1 | `ad_id` | none | | GET | `/v1/kleinanzeigen/shipping-options` | Shipping Options | 1 | none | none | The pages for [Search](https://perceptlayer.com/apis/kleinanzeigen/search), [Details](https://perceptlayer.com/apis/kleinanzeigen/details) and [Shipping Options](https://perceptlayer.com/apis/kleinanzeigen/shipping-options) each have a playground where you can run a real call with your key. Kleinanzeigen sits in the [Marketplaces](https://perceptlayer.com/verticals/marketplaces) area of the catalogue, alongside sources like [Vinted](https://perceptlayer.com/blog/vinted-api-search-items-json) and [Craigslist](https://perceptlayer.com/blog/craigslist-api-postings-json). ## How do you authenticate and make the first request? Send your key in the `X-API-Key` header. Keys start with `sk_live_`, and you get one by [signing up](https://perceptlayer.com/signup) and verifying an email address. There's no credit card, and the free tier gives you 100 credits once, on signup. Where a header isn't possible, the `api_key` query parameter works too. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both. Here is a search for iPhones in Berlin, in the category `elektronik`, priced between 50 and 500: ```bash curl "https://api.perceptlayer.com/v1/kleinanzeigen/search?query=iphone&page=1&location=Berlin&category=elektronik&price_min=50&price_max=500" \ -H "X-API-Key: $API_KEY" ``` Every successful response carries an `X-Credits-Used` header (1 here) and `X-Credits-Remaining`, the balance after the call. Check them once while testing so you know what a run costs before you schedule it. ## Which parameters does the search endpoint take? Search takes one required parameter and five optional ones. `query` is a string of up to 500 characters. `location` and `category` are strings of up to 100 characters. `price_min`, `price_max` and `page` are integers. Nothing else about them is documented, so test unusual values in the playground before you build on them. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | Up to 500 characters | | `page` | integer | no | Request `page=2` and onward while `has_next_page` is true | | `location` | string | no | Up to 100 characters; `Berlin` in the example | | `category` | string | no | Up to 100 characters; `elektronik` in the example | | `price_min` | integer | no | Lower price bound | | `price_max` | integer | no | Upper price bound | Invalid input returns a 422 with the code `invalid_parameters` and costs nothing. See the [errors docs](https://docs.perceptlayer.com/errors) for the error codes. ## What does a search response look like? A search returns `success`, a `data` array of ads and a `meta` object that echoes your filters and reports paging. This is a trimmed excerpt of a recorded response for the request above; the ad itself is cut to the fields you'd store. ```json { "success": true, "data": [ { "id": "3547273212", "title": "Apple iPhone 13 Pro Max 256GB Silber/Weiß Zustand Sehr gut OVP", "url": "https://www.kleinanzeigen.de/s-anzeige/apple-iphone-13-pro-max-256gb-silber-weiss-zustand-sehr-gut-ovp/3547273212-173-3473", "price": "399 €", "price_numeric": 399, "location": "13187 Pankow", "description": "Hallo zusammen, ich verkaufe mein iPhone 13 Pro Max mit 256 GB in der Farbe Silber/Weiß. Das..." }, … ], "meta": { "query": "iphone", "page": 1, "location": "Berlin", "category": "elektronik", "results_count": 27, "has_next_page": true, "duration_ms": 1327.64 } } ``` Three fields matter for monitoring. `id` identifies the ad across runs. `price_numeric` is a number, so you can sort and compare. `has_next_page` says whether another page exists. Note that `id` is a string here, while `ad_id` on the Details endpoint is an integer, so convert it with `int()` before you pass it on. The `title` and `description` fields come back in German, as the sellers wrote them. The description is an excerpt that ends in an ellipsis, not the full ad text. ## How do you monitor local prices with a script? A price monitor needs three things: a fixed set of searches, a store of what you've already seen, and a rule for what counts as news. The script below runs one search, walks the pages, compares each ad with a local JSON file and prints new ads and price drops. It uses only the endpoint, parameters and fields shown above. ```python import json import os import time from pathlib import Path import requests BASE = "https://api.perceptlayer.com/v1/kleinanzeigen/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} STATE = Path("seen.json") PARAMS = { "query": "iphone", "location": "Berlin", "category": "elektronik", "price_min": 50, "price_max": 500, } MAX_PAGES = 2 seen = json.loads(STATE.read_text()) if STATE.exists() else {} page = 1 while page <= MAX_PAGES: resp = requests.get(BASE, headers=HEADERS, params={**PARAMS, "page": page}, timeout=30) if resp.status_code in (429, 503): time.sleep(int(resp.headers.get("Retry-After", "5"))) continue resp.raise_for_status() body = resp.json() for ad in body["data"]: price = ad.get("price_numeric") if price is None: continue old = seen.get(ad["id"]) if old is None: print(f"NEW {price:>5} EUR {ad['title']} {ad['url']}") elif price < old["price"]: print(f"DROP {old['price']} -> {price} EUR {ad['title']} {ad['url']}") seen[ad["id"]] = {"price": price, "title": ad["title"]} if not body["meta"]["has_next_page"]: break page += 1 STATE.write_text(json.dumps(seen, ensure_ascii=False)) ``` Run it once to build the baseline; every NEW line on that first run is just the current inventory. After that, only changes print. Because `seen.json` keeps every ad it has met, an ad that disappears from the results simply stops updating. If you want a closer look at a stored ad, the Details endpoint takes its id as `ad_id`. The script uses the [requests library](https://requests.readthedocs.io/) and waits and retries on 429 and 503 using the `Retry-After` header, and it raises on other errors. Requests have no idempotency key, so a call that timed out on your side may still have been billed. For proper retry rules see [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python). ### How do you run it every day? Cron is enough. A line like `0 7 * * * cd /path/to/monitor && python monitor.py` runs the check at 07:00 daily. If you want queues or hosted workflows instead, [scheduling web data pulls](https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue) compares the options. To turn the printed lines into an agent that reasons about them, see [building a price tracking agent in Python](https://perceptlayer.com/blog/price-tracking-agent-python). ## What does a daily check cost? Each page you fetch is one call, and each call is 1 credit, so cost is searches × pages × days. Failed calls return `X-Credits-Used: 0` and are never billed. The table works the arithmetic for a 30-day month; credits are the unit, and the [pricing page](https://perceptlayer.com/pricing) shows what credits cost. | Setup | Calls a day | Calls × 1 credit, 30 days | Credits a month | | --- | --- | --- | --- | | 1 search, 1 page | 1 | 30 × 1 | 30 | | 1 search, 2 pages | 2 | 60 × 1 | 60 | | 5 searches, 2 pages each | 10 | 300 × 1 | 300 | | 20 searches, 3 pages each | 60 | 1,800 × 1 | 1,800 | The 100 free credits on signup are granted once, so they cover the first 100 days of the first setup, 50 days of the second, 10 days of the third and 1 day of the fourth. Running any of them longer needs a pack; the smallest, the 10,000-credit Starter, covers the fourth setup for 5 months. Purchased credits last 12 months, and there's no subscription. A Details call per new ad adds 1 credit each, so budget for it separately. The [credits docs](https://docs.perceptlayer.com/credits) explain how debits work. Speed isn't a constraint at this scale. Free accounts get 1 request a second, and a daily job makes a handful of calls. If you ever fan out many searches at once, read the [rate limits](https://docs.perceptlayer.com/rate-limits) first. ## When is the official site a better fit? If you only want to browse or watch a handful of searches yourself, the [Kleinanzeigen site](https://www.kleinanzeigen.de/) itself is the simpler tool, with no code to maintain. The API earns its place when you need the data in your own system: price history across weeks, joins with other sources, or an agent that acts on new ads. Two limits are worth stating. Data is collected from publicly available sources and returned as found at the time of the call, so a listing can change or vanish between your check and a human's click. And Search gives you an excerpt of the description, not the full text. If you combine Kleinanzeigen with other marketplaces, [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers matching ads that have no shared id. Next step: [get a free API key](https://perceptlayer.com/signup), then paste the cURL call above into your terminal and read `X-Credits-Used` in the response headers. The [Kleinanzeigen Search page](https://perceptlayer.com/apis/kleinanzeigen/search) lets you try other filters in the playground first. ## APIs in this post - [Kleinanzeigen **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/kleinanzeigen) ## Frequently asked questions ### Is there an official Kleinanzeigen API? Check Kleinanzeigen's own site for any official or partner interface; it isn't something we document here. The Perceptlayer Kleinanzeigen API is a separate route to the data and gives you three endpoints (Search, Details and Shipping Options) as JSON with one `X-API-Key` header. Each successful call costs 1 credit, and the free tier includes 100 credits once, on signup, with no credit card. ### How much does a Kleinanzeigen search cost? One search call costs 1 credit, and each extra page is another call. Checking one search over 2 pages daily is 60 calls × 1 credit = 60 credits in a month. Failed calls cost nothing and return `X-Credits-Used: 0`. Credits are prepaid, and the [pricing page](https://perceptlayer.com/pricing) shows what a pack of credits costs. ### How do I get the next page of results? Read `meta.has_next_page` in the response. When it is true, repeat the same request with `page` increased by one. Each page is its own 1-credit call, so cap the number of pages in your script to keep a daily run's cost fixed, as the example does with `MAX_PAGES`. ### What happens if a call fails or I hit the rate limit? Errors return an HTTP status and a JSON body with `code`, `message` and `request_id`, and nothing is debited. A 429 `rate_limited` or 503 `temporarily_unavailable` response includes a `Retry-After` header with the seconds to wait. A 402 `insufficient_credits` means the prepaid balance is empty; there is no automatic top-up. ### Can an AI agent search Kleinanzeigen? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. An agent can look up the Search endpoint for free, then call it with a `query`; only the call itself spends 1 credit on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup. kleinanzeigen classifieds germany price monitoring marketplaces ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 8 min read ## [AliExpress Scraper or API: What You Get](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) An AliExpress scraper vs 1-credit endpoints: a recorded search with 60 products a page, price.amount, sold\_count and is\_sponsored, and cost per product. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Oct 2026 Perceptlayer 8 min read ## [Craigslist Scraper or API: Watching New Postings](https://perceptlayer.com/blog/craigslist-scraper-vs-api) Compare a Craigslist scraper with four endpoints at 1 credit a call: a recorded Portland bike search with 821 results, bumped\_at times and a 3-call sweep. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 26 Oct 2026 Perceptlayer 8 min read ## [Craigslist API: Get Classified Postings as JSON](https://perceptlayer.com/blog/craigslist-api-postings-json) Search Craigslist postings by site, category and price as JSON, then poll for new ones. A real response, the parameters and the credit cost. --- title: "Google Lens API: Reverse Image Search as JSON | Perceptlayer" description: "Call GET /v1/google-lens/lens with an image URL and get visual matches as JSON for 1 credit. Parameters, a real response and uses for finding sources." url: https://perceptlayer.com/blog/google-lens-api-reverse-image-search --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Lens API: Reverse Image Search as JSON 26 Sept 2026 Perceptlayer 6 min read You can run a Google Lens reverse image search over HTTP with one GET request to `/v1/google-lens/lens` and an image URL in the `url` parameter. The response is JSON, with matches listed by `position`, each with a `title`, a `link` and a `source`. A successful call costs 1 credit, and a failed call costs nothing. ## Key takeaways - One endpoint, `GET /v1/google-lens/lens`, takes a required `url` (up to 2048 characters) and optional `q` and `type`. - `type` accepts `all`, `products`, `exact_matches` or `visual_matches`, so you can ask for one kind of match instead of everything. - The recorded `visual_matches` response returns `title`, `link`, `source` and `position` per match. - Each successful call costs 1 credit; 5,000 lookups × 1 credit = 5,000 credits. Failed calls return `X-Credits-Used: 0`. - The endpoint takes an image address, not an uploaded file, so the image has to be reachable at a URL. ## What does the Google Lens API return? [Google Lens](https://lens.google/) takes a picture and finds pages that show the same or similar images. The Perceptlayer endpoint wraps that lookup: you send an image URL, and you get back JSON with the matches Lens found, in ranked order. There's no HTML to parse and no browser session to drive. The API page for [Google Lens](https://perceptlayer.com/apis/google-lens) lists a single endpoint, [Lens](https://perceptlayer.com/apis/google-lens/lens), in the [Search engines](https://perceptlayer.com/verticals/search) area. It's a standard-tier endpoint, so it works with an ordinary key and doesn't need the restricted-endpoint terms. What you get depends on `type`. The recorded sample for this article uses `type=visual_matches`, so the response excerpt below shows that group. We haven't recorded the other three values, so this guide doesn't describe their fields. Run them in the playground on the API page to see what they return for your own images. ## How do you make a reverse image search request? Send a GET request with the image address URL-encoded in `url` and your key in the `X-API-Key` header. Keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the `api_key` query parameter for clients that can't set headers. If you don't have a key yet, [get a free API key](https://perceptlayer.com/signup). This request searches for matches of a coffee photo hosted on Wikimedia Commons: ```bash curl "https://api.perceptlayer.com/v1/google-lens/lens?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F4%2F45%2FA_small_cup_of_coffee.JPG&type=visual_matches" \ -H "X-API-Key: $API_KEY" ``` The `url` value is percent-encoded because it contains `:` and `/` characters inside a query string. If you build requests in code, let your HTTP library do the encoding. In Python, passing a dict to `params` does it for you: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/google-lens/lens", params={ "url": "https://upload.wikimedia.org/wikipedia/commons/4/45/A_small_cup_of_coffee.JPG", "type": "visual_matches", }, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60, ) resp.raise_for_status() for match in resp.json()["visual_matches"]: print(match["position"], match["title"]) ``` The image in these examples is the Commons file [A small cup of coffee](https://commons.wikimedia.org/wiki/File:A_small_cup_of_coffee.JPG). Swap in any image address your own pipeline holds. ## Which parameters does the Lens endpoint take? The endpoint takes one required parameter and two optional ones. `url` is the image to look up, `q` adds a text query alongside the image, and `type` narrows the response to one kind of match. Nothing else about them is documented, so there are no stated defaults to rely on: pass `type` explicitly when you care which group you get. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `url` | string | yes | Address of the image; up to 2048 characters | | `q` | string | no | Text query to go with the image; up to 500 characters | | `type` | string | no | One of `all`, `products`, `exact_matches`, `visual_matches` | The four `type` values map to different jobs, which is how you'd choose between them: | `type` | Use it when you want | | --- | --- | | `visual_matches` | Pages with images that look like yours | | `exact_matches` | Pages that show the same image | | `products` | Product results for the item in the image | | `all` | Every group in one response | The `q` parameter is useful when the image has more than one subject. If a photo shows a desk with a lamp on it and you care about the lamp, a short text query gives Lens something to focus on. Keep it within 500 characters. ## What does a response look like? The response echoes your inputs under `search_parameters`, then lists matches under the group you asked for. Here is an excerpt from the recorded response for the coffee photo, trimmed with `…` where the long `link` values are cut: ```json { "search_parameters": { "url": "https://upload.wikimedia.org/wikipedia/commons/4/45/A_small_cup_of_coffee.JPG", "type": "visual_matches" }, "visual_matches": [ { "source": "google.com", "title": "Coffee - Wikipedia", "link": "https://www.google.com/goto?url=CAESYAHrOzAVjqyZsRw2qYBWnGTQxvo0jp82FNgkFtdeekgdFsMzllECFQuW0N_YE0jQU21l8peWTBGW9imMZMQnJR97PbsxrAVhJlwl7Y3TiYThovCMSqoX1PYgBXCF…", "position": 1 }, { "source": "google.com", "title": "Un espresso con carácter: tueste oscuro, aroma a chocolate y ...", "link": "https://www.google.com/goto?url=CAESYwHrOzAVNdoGpK3FtZxCqcuZTEUq7d9luEWqqwu14ENvcGHD8sy55sN4m7HGYYUpQ0EeamvXBbXOfY-pkMl80yJ8WBgs9vWiCC9-HhswGQ8J1dWANIdzkP-CGSaR…", "position": 2 } ] } ``` Three details from this sample matter if you build on it. First, `position` is the rank, starting at 1. Second, `title` is the title of the matched page, and it comes back in the page's own language: the second match is Spanish. Third, in this recording `link` is a `google.com/goto` address and `source` is `google.com`, so neither field names the destination site by itself. That last point affects how you'd use the data. If you need the destination domain, test a few results from your own images before you design around `source`. Don't assume it carries the site name. ## How do you use it to find a product source or duplicate listings? Reverse image search answers a narrow question: where else does this picture appear? That makes it a good fit for two jobs. One is tracing a product photo back to the pages that sell or describe the item. The other is spotting the same photo reused across listings, such as a used-car ad or a rental that appears on more than one site. For product sourcing, call the endpoint with a supplier or marketplace photo and `type=products`, then review the matches by hand or pass the titles to a matcher. For listing checks, call it with `type=exact_matches` and treat any other page that shows the same image as a candidate duplicate. A shared photo is a signal, not proof: agents and dealers legitimately post the same pictures in several places, and a different photo doesn't prove two listings differ. So combine the image signal with fields you already have. Compare price, location and attributes before you merge two records. The post on [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers matching without shared IDs, and the guides to the [AutoScout24 API](https://perceptlayer.com/blog/autoscout24-api-car-listings-json) and the [Rightmove API](https://perceptlayer.com/blog/rightmove-api-property-data) show where listing photos come from in the first place. For a visual pass over a phrase instead of a photo, the [Google Images API](https://perceptlayer.com/blog/google-images-api-json) searches by text. For prices on a product once you know what it is, see the [Google Shopping API](https://perceptlayer.com/blog/google-shopping-api-product-prices). ## What does it cost, and how fast can you call it? Each successful call costs 1 credit, and a failed call costs nothing. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so you can track spend per call. The [credits docs](https://docs.perceptlayer.com/credits) explain how the balance works. A worked example: one pass over 5,000 listing photos is 5,000 calls × 1 credit, or 5,000 credits. The free tier gives 100 credits after you verify an email address, with no credit card, so the first 100 of those lookups are free and the rest need a pack. Purchased credits come in prepaid packs from 10,000 credits and last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Rates are per account and counted per minute. Free accounts get 1 request a second (60 a minute), and paying accounts get at least 5 a second (300 a minute). A rate-limited call returns 429 with a `Retry-After` header, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the rest. For a batch of images, a bounded worker loop is enough; the post on [concurrent requests in Python under rate limits](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) shows one. Failures arrive as an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. A bad `url` or `type` returns `invalid_parameters` (422). Requests have no idempotency key, so a call that timed out on your side may still have succeeded and been billed. The [errors docs](https://docs.perceptlayer.com/errors) list every code. Next step: open the [Lens endpoint page](https://perceptlayer.com/apis/google-lens/lens), paste one of your own image URLs into the playground, and run a real call with your key. ## APIs in this post - [Google Lens **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/google-lens) ## Frequently asked questions ### Can I upload an image file to the Google Lens API? The endpoint takes an image address in the `url` parameter, not a file upload. The only documented image input is `url`, up to 2048 characters. If your image sits on a local disk, host it somewhere reachable first and pass that address. ### How much does a Google Lens API call cost? A successful call to `/v1/google-lens/lens` costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. Checking 2,000 images = 2,000 calls × 1 credit = 2,000 credits. The free tier includes 100 credits once, on signup, and [pricing](https://perceptlayer.com/pricing) shows what additional credits cost. ### Which match types can I request? The `type` parameter accepts `all`, `products`, `exact_matches` and `visual_matches`. Leave it out and you rely on undocumented behaviour, so set it explicitly. The recorded sample in this guide covers `visual_matches`, whose entries have `title`, `link`, `source` and `position`. ### Does a match prove two listings are the same? No. A match tells you the same or a similar picture appears on another page. Sellers reuse photos legitimately, so use the match as one signal and compare price, location and attributes before merging records. The data is returned as found at the time of the call. ### Can an AI agent call this endpoint? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. An agent can look up the Lens endpoint for free and call it with an image URL, spending 1 credit on success. See the [AI agents docs](https://docs.perceptlayer.com/ai-agents). google lens reverse image search image search product sourcing duplicate listings ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Nov 2026 Perceptlayer 8 min read ## [Google Images Scraper or API: What You Get](https://perceptlayer.com/blog/google-images-scraper-vs-api) Compare a Google Images scraper with one 1-credit call that returns position, source, link, original URL, pixel size and is\_product for each result. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Aug 2026 Perceptlayer 7 min read ## [Google Images API: Search Image Results as JSON](https://perceptlayer.com/blog/google-images-api-json) One GET to /v1/google-images/images returns image results as JSON for 1 credit: parameters, cURL and Python calls, a real response and licensing notes. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. --- title: "Google Trends API in Python: Interest Over Time as JSON" description: "Call GET /v1/google-trends/interest from Python with requests and get weekly interest over time as JSON for 1 credit per call, with a recorded response." url: https://perceptlayer.com/blog/google-trends-api-python --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Trends API in Python: Interest Over Time as JSON 26 Sept 2026 Updated 26 Oct 2026 Perceptlayer 6 min read To get Google Trends interest over time in Python, send a GET request to `/v1/google-trends/interest` with `requests`, passing the keyword as `q`. The response is JSON with a `timeline_data` array of dated values and an `interest_over_time` summary. Each successful call costs 1 credit, and you get 100 free credits on signup. No scraping and no browser session on your side. ## Key takeaways - `GET /v1/google-trends/interest` takes one required parameter, `q`, plus optional `geo`, `time_range`, `hl` and `search_type`. - The recorded response for `tesla` in the US over `1y` returns weekly points with `timestamp`, `date` and `value`, plus `average`, `max_value` and `min_value`. - The Interest By Region and Related endpoints use the same key and cost 1 credit per call. - Failed calls cost nothing and return `X-Credits-Used: 0`; 429 and 503 responses carry a `Retry-After` header. - Three calls per keyword (interest, region, related) cost 3 credits, so the 100 free credits on signup cover one run of 33 keywords. ## Is there an official Google Trends API for Python? Google announced the Google Trends API as an alpha in July 2025 and opened it to a limited group of early-access testers rather than as a generally available API ( [Google Search Central, "Introducing the Google Trends API (alpha)"](https://developers.google.com/search/blog/2025/07/trends-api), 2025; [Search Engine Journal](https://www.searchenginejournal.com/google-trends-api-alpha-launching-breaking-news/551935/), 2025). Unless you've been given alpha access, don't build a production job on it. The alternatives are an unofficial library, a scraper you maintain, or a hosted endpoint like the one below. The best-known unofficial option is `pytrends`. Its repository was archived and made read-only on April 17, 2025, and its README warns it is "only good until Google changes their backend again" ( [pytrends on GitHub](https://github.com/GeneralMills/pytrends), 2025). Libraries like this parse Google's pages, so a page change can break your job without a code change on your side. If you only need a one-off export, Google Trends' own site works fine. This guide is for code that has to keep running. For the wider trade-off, see [what maintaining a scraper really involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost). ## How do you call the Interest endpoint from Python? You call `GET /v1/google-trends/interest` with your key in the `X-API-Key` header and the keyword in `q`. The endpoint belongs to the [Google Trends API](https://perceptlayer.com/apis/google-trends) and is documented on the [Interest endpoint page](https://perceptlayer.com/apis/google-trends/interest). Get a key first: [sign up for a free API key](https://perceptlayer.com/signup), then read [how authentication works](https://docs.perceptlayer.com/authentication). Here is the call as cURL: ```bash curl "https://api.perceptlayer.com/v1/google-trends/interest?q=tesla&geo=US&time_range=1y" \ -H "X-API-Key: $API_KEY" ``` And the same call with `requests`: ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): resp = requests.get(f"{BASE}{path}", params=params, headers=HEADERS, timeout=30) resp.raise_for_status() return resp resp = get("/v1/google-trends/interest", q="tesla", geo="US", time_range="1y") data = resp.json() for point in data["timeline_data"]: print(point["date"], point["value"]) print("credits used:", resp.headers["X-Credits-Used"]) print("credits left:", resp.headers["X-Credits-Remaining"]) ``` Set `API_KEY` in your environment first. Keys start with `sk_live_`. The two credit headers come back on every successful response, so you can log spend per call without extra requests. ## Which parameters does the Interest endpoint take? The Interest endpoint takes `q` (required) and four optional parameters: `geo`, `time_range`, `hl` and `search_type`. The table lists the types and allowed values documented for it. Nothing else is documented about them, so check the [playground on the API page](https://perceptlayer.com/apis/google-trends/interest) before you rely on behaviour beyond what's listed here. | Parameter | Type | Required | Allowed values / limits | | --- | --- | --- | --- | | `q` | string | yes | up to 550 characters | | `geo` | string | no | up to 10 characters | | `time_range` | string | no | `1h`, `4h`, `1d`, `7d`, `30d`, `90d`, `1y`, `5y`, `all` | | `hl` | string | no | up to 2 characters | | `search_type` | string | no | `web`, `images`, `news`, `youtube`, `shopping` | Use `time_range` to change the window and `search_type` to ask about image, news, YouTube or shopping searches instead of web search. Use `geo` to scope the keyword to a place, as in `geo=US` above. For the full request rules, see the [Requests docs](https://docs.perceptlayer.com/requests). ## What does the interest-over-time response look like? The response has four top-level parts: `search_parameters` (what was queried), `timeline_data` (the dated points), `interest_over_time` (the same points plus summary figures) and `response_time_ms`. This excerpt is trimmed from a recorded response to the cURL request above, with the cut marked by `…`: ```json { "search_parameters": { "keyword": "tesla", "geo": "US", "time_range": "today+12-m", "hl": "en", "search_type": "web" }, "timeline_data": [ { "timestamp": 1760832000, "date": "Oct 19 – 25, 2025", "value": 40 }, { "timestamp": 1761436800, "date": "Oct 26 – Nov 1, 2025", "value": 39 }, … ], "interest_over_time": { "average": 49.13, "max_value": 100, "min_value": 39, … }, "response_time_ms": 320 } ``` Each point has a Unix `timestamp`, a human-readable `date` range and a `value`. The `time_range` of `1y` comes back echoed as `today+12-m`, and the points in this sample are weekly. In the recorded response `max_value` is 100, which tells you `value` is an index, not a search count. Compare values against each other, not against other keywords' raw volume. Turning it into a table is a few lines: ```python import csv rows = data["interest_over_time"]["data_points"] with open("tesla_interest.csv", "w", newline="") as f: writer = csv.writer(f) writer.writerow(["timestamp", "date", "value"]) for r in rows: writer.writerow([r["timestamp"], r["date"], r["value"]]) ``` ## How do you get interest by region and related queries? Interest By Region and Related are separate endpoints on the same API, each 1 credit per call and each taking `q` as the one required parameter. Call them the same way as Interest, with the `get` helper above. The responses aren't excerpted here because we haven't recorded them for this guide; open each endpoint page to see its response shape. | Endpoint | Page | Required | Optional | | --- | --- | --- | --- | | `/v1/google-trends/interest-by-region` | [Interest By Region](https://perceptlayer.com/apis/google-trends/interest-by-region) | `q` | `geo`, `region`, `date`, `cat`, `gprop`, `tz`, `hl` | | `/v1/google-trends/related` | [Related](https://perceptlayer.com/apis/google-trends/related) | `q` | `geo`, `time_range`, `hl`, `search_type` | ```python region = get( "/v1/google-trends/interest-by-region", q="tesla", geo="US", region="REGION", ).json() related = get( "/v1/google-trends/related", q="tesla", geo="US", time_range="1y", ).json() ``` `region` accepts `REGION` or `COUNTRY`. On Related, `q` is limited to 100 characters, lower than Interest's 550. The API also has [Autocomplete](https://perceptlayer.com/apis/google-trends/autocomplete) and [Trending Now](https://perceptlayer.com/apis/google-trends/trending-now), five endpoints in total, each 1 credit. If you want news articles for a keyword rather than search interest, see the [Google News API guide](https://perceptlayer.com/blog/google-news-api). ## What does a Google Trends call cost? Every successful call to these endpoints costs 1 credit, and failed calls cost nothing. You get 100 free credits once, after verifying an email address, with no credit card. Purchased credits last 12 months, with no subscription ( [pricing](https://perceptlayer.com/pricing)). The [Credits docs](https://docs.perceptlayer.com/credits) explain the headers. Here is the arithmetic for a keyword tracker: - One keyword, three endpoints (interest, region, related): 3 calls × 1 credit = 3 credits. - 100 keywords refreshed once: 100 × 3 = 300 credits, more than the 100 free credits, which cover 33 keywords. - 100 keywords refreshed weekly for a month (4 runs): 300 × 4 = 1,200 credits, which needs a pack. Past the free tier, credits come in prepaid packs of 10,000 (Starter), 50,000 (Build), 200,000 (Growth), 500,000 (Pro), 1,000,000 (Scale) and 5,000,000 (Volume). At 1,200 credits a month, 100 keywords refreshed weekly would use the Starter pack's 10,000 for about eight months. See [pricing](https://perceptlayer.com/pricing) for what each pack costs. The service is prepaid: when the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. There is no automatic top-up. ## How should you handle errors and retries? Errors return an HTTP status and a JSON body shaped as `{"error": {"code", "message", "request_id"}}`, and a failed call returns `X-Credits-Used: 0`. Rate-limited (429) and temporarily unavailable (503) responses carry a `Retry-After` header with the seconds to wait. The full list of codes is in the [Errors docs](https://docs.perceptlayer.com/errors), and limits are in [Rate limits](https://docs.perceptlayer.com/rate-limits). ```python import time def get_with_retry(path, attempts=3, **params): for attempt in range(attempts): resp = requests.get( f"{BASE}{path}", params=params, headers=HEADERS, timeout=30 ) if resp.status_code in (429, 503) and attempt < attempts - 1: time.sleep(int(resp.headers.get("Retry-After", 5))) continue resp.raise_for_status() return resp ``` One caveat: requests have no idempotency key. If your client times out, the call may have succeeded and been billed, so a retry can cost a second credit. For a keyword job that's 1 credit, but read [how to retry without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) before looping over thousands of keywords. To avoid repeat spend on keywords you query often, [cache the responses](https://perceptlayer.com/blog/cache-web-data-api-responses). Next step: [get a free API key](https://perceptlayer.com/signup), then run the Interest call from this guide in the playground on the [Google Trends API page](https://perceptlayer.com/apis/google-trends). For agents, the same endpoints are available as tools over [MCP](https://docs.perceptlayer.com/ai-agents). ## APIs in this post - [Google Trends **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-trends) ## Frequently asked questions ### Does Google have an official Trends API? Google announced a Google Trends API in alpha in July 2025 and invited developers to sign up for early access as alpha testers ( [Google Search Central](https://developers.google.com/search/blog/2025/07/trends-api), 2025). If you haven't been given access, don't plan on it. Perceptlayer exposes Google Trends data as JSON endpoints you can call with a free key today. ### Does pytrends still work? Its repository was archived on April 17, 2025 and is read-only, and its README says it is only good until Google changes its backend ( [pytrends on GitHub](https://github.com/GeneralMills/pytrends), 2025). It may still run for you, but nobody will patch it if Google changes something. A hosted endpoint moves that maintenance off your code. ### How much does it cost to track keywords with the Google Trends API? Each call costs 1 credit, and failed calls cost nothing. Tracking 100 keywords with interest, region and related calls is 300 credits per run, more than the 100 free credits on signup, which cover one run of 33 keywords. Beyond that, the Starter pack is 10,000 credits, enough for 3,333 keywords at 3 credits each. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Can I use the endpoint to compare several keywords? The Interest endpoint takes one `q` of up to 550 characters, and the documentation doesn't describe multi-keyword comparison, so this guide doesn't claim it. The safe approach is one call per keyword, 1 credit each. Check the Interest page and its playground before sending comma-separated terms. ### What happens if the call fails or my credits run out? A failed call returns an HTTP status and a JSON error body with a `code`, and costs nothing ( `X-Credits-Used: 0`). When your balance reaches zero, calls return `insufficient_credits` (402) and nothing more is debited. Rate-limited and unavailable responses include `Retry-After` with the seconds to wait. ### Should I use a Google Trends scraper instead? Scraping Google Trends yourself means handling its request limits and page changes, and maintaining unofficial libraries such as pytrends, whose repository is archived. The interest endpoint returns weekly interest over time as JSON for 1 credit per successful call. A scraper makes sense only for a Trends view the endpoints don't cover. google trends python search interest keyword research ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Nov 2026 Perceptlayer 9 min read ## [Google Trends Scraper or API: What You Get](https://perceptlayer.com/blog/google-trends-scraper-vs-api) A Google Trends scraper rebuilds what one call returns: timeline\_data with weekly values plus average, max and min, for 1 credit per keyword refresh. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Costco API: Product Data and Prices as JSON](https://perceptlayer.com/blog/costco-api-product-prices) A recorded Costco search returned 24 products with price, original price, stock and rating as JSON for 1 credit. Endpoints, parameters, tracking costs. --- title: "MCP Server Too Many Tools: Keeping Agent Context Small" description: "One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small." url: https://perceptlayer.com/blog/mcp-too-many-tools-context --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # MCP Server Too Many Tools: Keeping Agent Context Small 26 Sept 2026 Perceptlayer 7 min read An MCP server with too many tools fills the agent's context with schemas before any work starts, and gives the model more ways to pick the wrong one. The fix is to expose fewer, more general tools: a search tool over the catalogue, a lookup tool for one item's parameters, and one call tool. That's how Perceptlayer puts 2,782 endpoints behind three tools. The checklist below covers the rest: scoping, naming, trimming responses and capping calls. ## Key takeaways - One tool per endpoint doesn't scale. Generated from the catalogue's parameter lists, 1,659 endpoint tools come to about 567,000 characters of JSON. The three tools Perceptlayer's server actually lists come to about 3,200. - Tool definitions cost tokens before the first message. Anthropic measured 58 tools from five servers at about 55K tokens ( [Anthropic](https://www.anthropic.com/engineering/advanced-tool-use), 2025). - Search, inspect, call: `search_endpoints` and `get_endpoint` are free lookups, and only `call_endpoint` spends credits, on success only. - Trim what comes back as well as what goes in. `call_endpoint` cuts any response over 100,000 characters, so ask for a page or a limit instead. - Turn off the servers and tools a task doesn't use. Fewer tools in the list means fewer schemas in context and fewer wrong picks. ## Why do too many MCP tools hurt an agent? Every tool a client loads is sent to the model as a name, a description and a JSON Schema, on every request, whether the task needs it or not. Anthropic's engineering team measured a five-server setup at "58 tools consuming approximately 55K tokens before the conversation even starts" ( [Anthropic](https://www.anthropic.com/engineering/advanced-tool-use), 2025). That is context you pay for and can't use for the task. Size isn't the only cost. The same post names "wrong tool selection and incorrect parameters" as the most common failures, especially when tools have similar names. When it let the model search for tools rather than load them all, accuracy in its evaluations rose from 49% to 74% for Opus 4. So a long tool list costs tokens and makes the agent worse at choosing. The MCP specification doesn't cap the number of tools. `tools/list` supports pagination with a cursor ( [MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools), 2025), so a server can list thousands. Whether it should is a design question, and for agents the answer is usually no. ## How big would one tool per endpoint be? For a large catalogue, one tool per endpoint is far bigger than any context window you'd want to spend on schemas. We generated a tool for each of the 1,659 live endpoints in our catalogue: the endpoint ID as the name, a one-line description, and an input schema built from that endpoint's parameters (7,210 parameters in all, with their types, allowed values and length limits). Serialised as a tool list, that is about 567,000 characters of JSON. The three tools our server actually lists come to about 3,200 characters. | Tool list | Tools | Size as JSON | | --- | --- | --- | | One tool per endpoint, whole catalogue | 1,659 | about 567,000 characters | | One tool per endpoint, Google Search only | 7 | about 5,100 characters | | Search, inspect, call | 3 | about 3,200 characters | Token counts depend on the model's tokenizer, so we report characters. The point holds either way. Even seven Google Search endpoint tools are bigger than the three general tools, and the three general tools reach every endpoint. You can read the real list yourself. The server answers `tools/list` without an API key: ```bash curl -s https://perceptlayer.com/mcp \ -H "Content-Type: application/json" \ -H "MCP-Protocol-Version: 2025-06-18" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | wc -c ``` ## The checklist Work through these in order. The first three shrink what the model sees on every turn, and the rest keep each call small and bounded. 1. **Count what the client loads.** List every connected server and every tool it exposes, then remove servers the agent doesn't use for this job. Each one adds its schemas to every request. 2. **Replace per-item tools with search, inspect, call.** If tools differ only by which item they hit (one per site, per table, per endpoint), merge them. Offer a search tool that returns compact matches, a lookup tool that returns one item's parameters, and a single call tool that takes an ID and parameters. 3. **Make discovery free and cheap.** Lookups should spend nothing and return little. `search_endpoints` returns the endpoint ID, name, method, credits per call, tier and required parameters for each match, 10 matches by default and at most 50. The full parameter list waits for `get_endpoint`. 4. **Name tools by action, not by system.** `search_endpoints`, `get_endpoint` and `call_endpoint` say what each does. Avoid near-duplicates such as `get_data` and `fetch_data`. Similar names are where wrong picks happen. 5. **Put the usage order in the descriptions.** Say when to call each tool. Our `get_endpoint` description says to call it "before call\_endpoint unless you already know the parameters". The server's instructions spell out the same order. 6. **Keep schemas strict.** Mark required parameters, use `enum` for fixed values and set `additionalProperties: false` on the tool's own arguments. A tight schema takes fewer tokens to describe than prose and catches bad arguments before a call. 7. **Bound the response.** Ask for less data with an endpoint's paging or limit parameters, and filter fields before the model sees them. `call_endpoint` truncates anything over 100,000 characters and says so. [Trim API Responses for LLM Context](https://perceptlayer.com/blog/trim-api-responses-llm-context) shows field filtering in Python. 8. **Return errors the model can act on.** A failed call should name a code and the next step. `call_endpoint` returns codes such as `invalid_parameters` (fix and retry), `rate_limited` (wait and retry) and `insufficient_credits`, and failed calls cost nothing. The [errors docs](https://docs.perceptlayer.com/errors) list every code. 9. **Cap calls per task.** Set a maximum number of `call_endpoint` calls per run in the agent loop, and pace them under the account's rate limit. [MCP Server Rate Limiting](https://perceptlayer.com/blog/mcp-server-rate-limiting-agents) covers the pacing. [AI Agent API Cost Control](https://perceptlayer.com/blog/ai-agent-web-data-costs) covers the spend. 10. **Turn tools off per conversation.** Clients let you switch connectors off for a chat, and Claude also lets you set an individual tool to Blocked ( [Claude](https://claude.com/docs/connectors/custom/add-unlisted), 2026). Leave on only what the task needs. ## What does search, inspect, call look like in practice? The agent spends two free lookups before one paid call, and only the call's response is large. Say the task is "find the top Google results for a query". The agent calls `search_endpoints` with `{"query": "google search"}` and gets back a short list of matches, each with an ID such as `google-search.search`, its credits per call and its required parameters. If the match is obvious it can skip straight to the call. Otherwise it calls `get_endpoint` with `{"endpoint": "google-search.search"}` to read the full parameter list. That shows `query` is required and `hl`, `gl` and `page` are among the optional ones. Then it calls `call_endpoint`: ```json { "endpoint": "google-search.search", "params": { "query": "best restaurants in Berlin", "hl": "en" } } ``` The result is the endpoint's JSON, followed by a line such as `Credits used: 1. Credits remaining: …`. The agent never loaded a schema for any other endpoint in the catalogue, and it can reach any of them the same way. The [AI agents (MCP) docs](https://docs.perceptlayer.com/ai-agents) have the connection details for each client. ## When should you keep dedicated tools instead? Keep a dedicated tool when an agent calls one endpoint constantly and nothing else. A support agent that only ever looks up an order, or a price tracker that only hits one shopping endpoint, gains little from a search step. One named tool with a tight schema is simpler and saves a round trip. [MCP vs Function Calling for Live Web Data](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) walks through that trade-off, and [LLM Tool Schema Design](https://perceptlayer.com/blog/agent-tool-schema-design-web-apis) covers writing that one schema well. The rule of thumb: dedicated tools for the two or three calls an agent makes every run, search, inspect, call for everything else. If you want to try the general pattern, [get a free API key](https://perceptlayer.com/signup), add the server, and ask your agent for data from a site you haven't wired up. ## Frequently asked questions ### How many tools is too many for an MCP server? There is no fixed number, because the cost depends on how long each schema is and how similar the tools are. Anthropic's example of 58 tools took about 55K tokens before any conversation, and similar tool names were a common cause of wrong picks. If the tool list costs more context than the task, or tools differ only by the item they hit, merge them behind a search tool. ### Do search\_endpoints and get\_endpoint cost credits? No. Both only read the catalogue, need no API key and cost nothing. Only `call_endpoint` spends credits: the endpoint's cost, 1 credit for nearly all of them, and only when the call succeeds. A failed call returns an error code and debits nothing. See the [credits docs](https://docs.perceptlayer.com/credits) for how balances work. ### Does a search step make the agent slower? It adds one or two short tool calls before the paid one, so a task takes an extra round trip or two. In return, the model reads a few compact matches instead of thousands of schemas on every turn. An agent that already knows the endpoint ID can call `call_endpoint` directly and skip the lookups. ### What happens if a response is too large for the context? `call_endpoint` returns at most 100,000 characters and adds a note with the full length when it truncates. Ask for less with the endpoint's paging or limit parameters, or call the HTTP API directly and filter the fields in your own code before passing them to the model. ### Can I limit which tools Claude uses from a connector? Yes. Claude lets you turn each connector on or off for a conversation from the + menu, and block individual tools under Customize > Connectors. With Perceptlayer's server you might block `call_endpoint` for a research-only chat, so the agent can browse the catalogue but can't spend credits. mcp tool calling context window ai agents tool design ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 3 Sept 2026 Perceptlayer 7 min read ## [MCP Tool Call Error Handling: When an Agent Should Retry](https://perceptlayer.com/blog/mcp-tool-call-errors-agent-retries) Each call\_endpoint error code mapped to one agent action (fix, wait, stop or ask the user), with the exact error text the model sees and a system prompt. --- title: "Fetch Incremental Data From an API: Only New Records" description: "Fetch incremental data from an API: sort newest first, keep a high-water mark or seen-ID set per query, and stop paging early. Python, Craigslist and eBay." url: https://perceptlayer.com/blog/incremental-api-data-pulls --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Fetch Incremental Data From an API: Only New Records 24 Sept 2026 Perceptlayer 7 min read An incremental data load from an API fetches only the records that changed since the last run. For listing data, that means three things: sort newest first, remember where the last run stopped (a timestamp or a set of IDs, per query), and stop paging as soon as you reach records you already have. On Craigslist the mark is a timestamp; eBay results carry no date, so the mark is a set of item IDs. ## Key takeaways - Keep one mark per query: the newest `bumped_at` for Craigslist, the set of seen `product_id` values for eBay, stored between runs. - Stop paging at the first record older than the mark, after re-reading a small overlap window to absorb clock skew and slightly out-of-order results. - A Craigslist posting can come back with its old `posting_id` and a new `bumped_at` when its owner renews it, so upsert by ID rather than appending. - eBay's recorded search results were all `sponsored: true`; sponsored slots may not follow the sort order, so only organic results should decide when to stop. - The recorded Craigslist search reports 821 results at 360 a page, 3 calls for a full pull; an incremental run usually needs 1, at 1 credit per call. ## Why pull incrementally at all? Because full pulls repeat work you've paid for. A search that returns 821 Craigslist postings costs the same three pages every run, even if only five postings are new. Incremental pulls cut that to the pages that hold new records, usually one, and they make each run's output a list of changes, which is what downstream jobs want anyway. The pattern is the same for any listing source: a sort that puts the newest records first, a field that says when a record is new, and state that survives between runs. What changes between sources is which field marks "new". The two sources in this guide show both cases: Craigslist gives you a timestamp, eBay doesn't. ## What do the two sources give you to work with? Each search response has a list of results and a flag that says another page exists. What differs is the field you can track. The excerpts below are from recorded responses, trimmed with `…`. The [Craigslist Search endpoint](https://perceptlayer.com/apis/craigslist/search) returned this for bikes in Portland: ```json { "success": true, "data": { "total": 821, "page": 1, "per_page": 360, "has_more": true, "results": [ { "position": 1, "id": "wnD16b4hEY7DaHprfGYGAg", "posting_id": 7988730852, "title": "21\" Specialized Sirrus A1 commuter", "price": 250, "currency": "USD", "location": { "site": "portland", "subarea": "mlt", … }, "bumped_at": "2026-10-23T20:30:33Z", … }, … ] } } ``` The [eBay Search endpoint](https://perceptlayer.com/apis/ebay/search) returned this for `q=coffee maker`, with no date on any result: ```json { "success": true, "data": { "query": "coffee maker", "page": 1, "per_page": 60, "has_more": true, "results": [ { "product_id": "366702966104", "title": "Mr. Coffee 4-in-1 Single-Serve Latte, Iced, and Hot Coffee", "price": { "raw": "$60.00", "extracted": 60, "currency": "USD" }, "sponsored": true, … }, … ], "total_results": 110000, … } } ``` | | Craigslist search | eBay search | | --- | --- | --- | | Newest-first sort | `sort=date` | `sort` takes `1`, `7`, `10`, `12`, `15`, `16` | | Field that marks "new" | `bumped_at` | none; use `product_id` | | Stable ID | `posting_id` (also `id`) | `product_id` | | Page size | `per_page` 360 in the recording | `per_page`: `60`, `120` or `240` | | More pages | `has_more` | `has_more` | | Mark to store | Newest `bumped_at` per query | Seen `product_id` set per query | On eBay's own site, the `_sop=10` URL parameter sorts by newly listed and `_sop=12` by best match, according to eBay's community forum ( [eBay Community](https://community.ebay.com/t5/Report-eBay-Technical-Issues/Best-match-newly-listed-ending-soonest-drop-down-NOT-WORKING/m-p/30712217/highlight/true), 2026). The endpoint's `sort` values look like the same codes, and the recorded related-search links carry `_sop=12`, but we haven't confirmed that `sort=10` means newly listed here; check it in the playground before relying on it. ## How do you pull Craigslist incrementally? Sort by date, read pages until you reach a posting bumped before the last run's mark, and save the newest `bumped_at` you saw as the next mark. Re-read a short overlap before the mark, 30 minutes in the code below, so a posting whose bump time lands a little out of order isn't lost. These are the requests the code sends: ```bash curl "https://api.perceptlayer.com/v1/craigslist/search?site=portland&category=bia&query=bike&min_price=50&max_price=300&sort=date&page=1" \ -H "X-API-Key: $API_KEY" ``` The overlap matters because the order isn't guaranteed to be strict. The recorded request didn't set `sort`, and its third posting, bumped at 20:28:59, comes after one bumped at 20:28:35. With `sort=date` the order should hold, but a few minutes of overlap is cheap insurance. The cost is a few re-read postings each run, which the upsert step absorbs. ```python """Incremental pulls: fetch only listings that are new or bumped since the last run.""" import json import os import pathlib from datetime import datetime, timedelta import requests API = "https://api.perceptlayer.com/v1" HEADERS = {"X-API-Key": os.environ["API_KEY"]} STATE = pathlib.Path("state.json") OVERLAP = timedelta(minutes=30) # re-read a little before the mark, in case of clock skew MAX_PAGES = 5 spent = 0 def get(path, **params): global spent r = requests.get(f"{API}/{path}", headers=HEADERS, params=params, timeout=60) spent += int(r.headers.get("X-Credits-Used", "0")) r.raise_for_status() return r.json()["data"] def ts(s): return datetime.fromisoformat(s.replace("Z", "+00:00")) def craigslist_since(params, state): """Newest first; stop at the first posting bumped before the high-water mark.""" key = "craigslist:" + json.dumps(params, sort_keys=True) mark = ts(state[key]) - OVERLAP if key in state else None fresh, newest = [], None for page in range(1, MAX_PAGES + 1): data = get("craigslist/search", **params, sort="date", page=page) reached_mark = False for row in data["results"]: bumped = ts(row["bumped_at"]) newest = max(newest or bumped, bumped) if mark and bumped < mark: reached_mark = True break fresh.append(row) if reached_mark or not data.get("has_more"): break if newest: state[key] = newest.isoformat() return fresh ``` The mark is stored per query, keyed by the query's parameters, so a change in price band or category starts a fresh history. `MAX_PAGES` caps a first run or a run after a long gap, so the job can't page through a whole city at once. ## How do you handle bumps and reposts? Upsert, don't append. Craigslist lets owners of free postings move them back to the top every 48 to 72 hours by renewing them ( [Craigslist help: renew](https://www.craigslist.org/about/help/posting/modify/renew), 2026). A renewed posting comes back with its old `posting_id` and a new `bumped_at`, so it reappears in an incremental pull. The recording shows one: `posting_id` 7939313997, far older than its neighbours' 7988… IDs, bumped the same evening. Key your table on `posting_id` and update the price and `bumped_at` when one comes back. That turns a bump into a useful event: a renewed posting with a lower price is a price cut. A repost is different: Craigslist says a repost is a new posting, while the original stays up under its original date ( [Craigslist help: repost](https://www.craigslist.org/about/help/repost), 2026). Reposts get new IDs, so catch them by matching title, price and location, as in [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources). ## How do you pull eBay when results have no date? Track IDs instead of time. Keep the set of `product_id` values you've seen for each query, sort newest first, and stop at the first page that has no unseen organic item. The rule needs the word "organic": every result in the recorded eBay response is `sponsored: true`, and sponsored slots may not follow the requested sort, so they can't tell you where new items end. ```python def ebay_since(params, state, sort=10): """No date in the results: stop at the first page with no unseen organic item.""" key = "ebay:" + json.dumps(params, sort_keys=True) seen = set(state.get(key, [])) fresh = [] for page in range(1, MAX_PAGES + 1): data = get("ebay/search", **params, sort=sort, page=page, per_page=60) new = [r for r in data["results"] if r["product_id"] not in seen] organic = [r for r in data["results"] if not r.get("sponsored")] organic_new = [r for r in new if not r.get("sponsored")] fresh.extend(new) seen.update(r["product_id"] for r in data["results"]) # Sponsored slots may not follow the sort order, so organic results decide when to stop. if not new or (organic and not organic_new) or not data.get("has_more"): break state[key] = sorted(seen) return fresh if __name__ == "__main__": state = json.loads(STATE.read_text()) if STATE.exists() else {} bikes = craigslist_since({"site": "portland", "category": "bia", "query": "bike", "min_price": 50, "max_price": 300}, state) coffee = ebay_since({"q": "coffee maker"}, state) STATE.write_text(json.dumps(state)) print(f"{len(bikes)} new or bumped postings, {len(coffee)} new eBay items, {spent} credits") ``` A broad eBay query like this one reports 110,000 results, so a full pull is out of reach anyway; the incremental pull is the only practical way to follow it. Prune the seen set over time, for example by dropping IDs not seen for 30 days, or it grows without limit. For general page-loop safety, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## What happened when we ran it on recorded data? We ran both functions twice with `requests.get` mocked: page 1 returned the recorded response, page 2 an empty last page. The recordings are short samples, 3 results each, so this checks the stopping logic, not real volumes. We haven't run the code against the live API. | Run | Craigslist, 30-minute overlap | Craigslist, no overlap | eBay | | --- | --- | --- | --- | | First | 3 postings, 2 calls | 3 postings, 2 calls | 3 items, 2 calls | | Second, same data | 3 postings, 2 calls | 1 posting, 1 call | 0 items, 1 call | The eBay pull did what it should: nothing new, one call. The Craigslist overlap shows its cost: all three recorded postings were bumped within 30 minutes of each other, so the second run re-read them all. With no overlap, the second run stopped at the posting that set the mark. In production, runs are hours apart and only postings in the last 30 minutes of the window repeat; the upsert by `posting_id` makes those repeats harmless. ## How many credits does an incremental pull save? Each call costs 1 credit on success, and failed calls cost nothing and return `X-Credits-Used: 0`, so savings are pages not fetched. The recorded Craigslist search reports 821 results at 360 a page: a full pull is 3 calls. An incremental run that finds its mark on page 1 is 1 call, saving 2 credits per query per run. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Job (Craigslist, 20 queries like the recorded one) | Calls a day | Credits a month | | --- | --- | --- | | Full pull, hourly | 20 × 3 × 24 = 1,440 | 43,200 | | Incremental, hourly, 1 page a run | 20 × 1 × 24 = 480 | 14,400 | | Incremental, every 4 hours | 20 × 1 × 6 = 120 | 3,600 | Worked example: 20 queries hourly drops from 43,200 credits a month to 14,400 when each run needs one page, a saving of 28,800 credits. Busy queries will sometimes need two pages; budget for that. A Starter pack of 10,000 credits covers the four-hourly job for almost three months, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Hourly runs of 20 queries stay well inside the free tier's 1 request a second; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover paid rates. For when to run the job, see [scheduling web data pulls](https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue), and for loading the rows, [loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres), which covers upserts. To try the searches, [get a free API key](https://perceptlayer.com/signup) and run them in the playground on the [Craigslist API page](https://perceptlayer.com/apis/craigslist) and the [eBay API page](https://perceptlayer.com/apis/ebay). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Craigslist **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/craigslist) - [eBay **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/ebay) ## Frequently asked questions ### How do I fetch incremental data from an API? Fetch only the records that are new or changed since the previous run, the way an incremental load does. It's a pull that fetches only records that are new or changed since the previous run. You sort results newest first, store a mark per query (a timestamp such as Craigslist's `bumped_at`, or a set of seen IDs where results carry no date, as on eBay), and stop paging when you reach records older than the mark. ### What if the API has no updated-at field? Track IDs. Keep the set of record IDs you've seen per query, request a newest-first sort and stop at the first page with no unseen items. On eBay that means `product_id`, ignoring `sponsored` results when you decide to stop, since sponsored slots may not follow the sort order. Prune old IDs so the set doesn't grow forever. ### How do I avoid missing records between runs? Re-read an overlap window before the mark, such as 30 minutes, and upsert by ID so the repeats don't create duplicates. Don't stop on the first older record unless results are sorted by date: the recorded Craigslist search, made without `sort`, returned one posting out of time order. Cap pages per run so a long gap can't run away. ### How much do incremental pulls save? The pages you don't fetch. The recorded Craigslist search reports 821 results at 360 a page, 3 credits for a full pull; an incremental run that ends on page 1 costs 1 credit. For 20 queries hourly, that's 14,400 credits a month instead of 43,200. Failed calls cost nothing. ### How should I handle reposted and renewed listings? Renewed Craigslist postings keep their `posting_id` and get a new `bumped_at`, so upsert them and record any price change. Reposts get a new ID while the original stays up, so match them on title, price and location instead. Keep both events: a renewal at a lower price is a price cut worth tracking. incremental load python pagination data engineering craigslist ebay ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 31 Jul 2026 Perceptlayer 8 min read ## [Paginate a Web Data API in Python: Safe Page Loops](https://perceptlayer.com/blog/paginate-web-data-api-python) Page through the eBay search endpoint in Python with has\_more, dedupe by product\_id and a credit ceiling. Each page costs 1 credit. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "Track Brand Mentions in AI Answers with an API" description: "A daily Python job that sends fixed prompts to an LLM answers endpoint and Google's AI overview, logs brand mentions and cited domains, at 2 credits per prompt." url: https://perceptlayer.com/blog/track-brand-mentions-in-ai-answers --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Track Brand Mentions in AI Answers with an API 24 Sept 2026 Perceptlayer 8 min read To track brand mentions in AI answers, send the same set of prompts every day to an AI answer engine and to Google's AI overview, then record which brands each answer names and which domains it links. With Perceptlayer that's `GET /v1/llm-answers/answer` with a `prompt` and `GET /v1/google-search/search-ai-overview` with a `query`, 1 credit each. This tutorial builds the job in Python with SQLite: 15 prompts a day is 900 credits a month. ## Key takeaways - Two calls per prompt per day: `/v1/llm-answers/answer` (required `prompt`, optional `model`, `locale`, `timezone`) and `/v1/google-search/search-ai-overview` (required `query`, optional `hl`, `gl`). - `/v1/llm-answers/models` lists the models you can pass as `model`, filtered by `engine` set to `chatgpt` or `perplexity`. - The recorded LLM answer gives `answer.text`, a `sources` list where each source has `url`, `attribution` and a `cited` flag, and `model.resolved`: match brands in the text and count only sources with `cited: true`. - One answer is one sample. Report the share of days a brand appears per prompt, over weeks, not whether it appeared today. - 15 prompts × 2 calls × 30 days = 900 credits a month. The 100 free credits cover the first 3 days; the Starter pack's 10,000 covers 11 months. Failed calls cost nothing. ## What are you building? A script you run once a day. It reads a fixed list of prompts and the brands you care about, asks an AI answer engine each prompt, fetches Google's AI overview for the same question, and stores one row per prompt, engine and day. Each row says which of your brands were named and which domains the answer linked. A second query turns the rows into a weekly share-of-answers table. Fixed prompts matter more than clever ones. Brand visibility in AI answers is only comparable over time if you ask the same questions in the same words, with the same model and locale, every day. Pick 10 to 20 prompts a buyer would actually type, such as "best project management tool for a 10-person agency", rather than prompts that contain your brand name. You need Python 3.10 or newer, the `requests` package and an API key. [Get a free API key](https://perceptlayer.com/signup); verifying your email gives you 100 free credits on signup. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the `X-API-Key` header. ## Which endpoints does the job call? Two endpoints do the work, and a third helps you choose a model once. Each costs 1 credit per successful call, and a failed call costs nothing and returns `X-Credits-Used: 0`. We have a recorded response for the LLM answer endpoint, shown in Step 3, but not for the AI overview, so the code handles that one without depending on its field names. | Endpoint | Required | Optional | Credits | | --- | --- | --- | --- | | [`/v1/llm-answers/answer`](https://perceptlayer.com/apis/llm-answers/answer) | `prompt` (up to 4,000 characters) | `q`, `model` (up to 64), `timezone`, `locale` (up to 16), `history` | 1 | | [`/v1/google-search/search-ai-overview`](https://perceptlayer.com/apis/google-search/search-ai-overview) | `query` (up to 2,048 characters) | `hl`, `gl`, `google_domain`, `uule` | 1 | | [`/v1/llm-answers/models`](https://perceptlayer.com/apis/llm-answers/models) | none | `engine`: `chatgpt` or `perplexity` | 1 | The two answer sources behave differently, and you should expect that in the data. Google says AI Overviews appear only when its systems judge them additive to classic search, so they often don't trigger ( [Google Search Central](https://developers.google.com/search/docs/appearance/ai-features), 2026). An AI overview row with no text is a result, not an error: for that prompt, that day, there was no overview to appear in. ## Step 1: How do you choose prompts, brands and a model? Put the prompts and brands in a config file so a change shows up in version control, and pin the model and locale. Call the models endpoint once to see which models it lists for an engine, then copy one into the config. The call costs 1 credit, so there's no need to repeat it daily. ```bash curl "https://api.perceptlayer.com/v1/llm-answers/models?engine=chatgpt" \ -H "X-API-Key: $API_KEY" ``` Then write `config.json`: ```json { "model": "PASTE_A_MODEL_FROM_THE_MODELS_CALL", "locale": "en-US", "hl": "en", "gl": "us", "brands": ["Asana", "Trello", "Monday.com", "ClickUp", "Notion"], "prompts": [ "best project management tool for a 10-person agency", "what is the easiest kanban app for a small team", "project management software with time tracking" ] } ``` List your own brand and the four or five rivals a buyer compares you with. Spell brands the way they're written in prose, because the match is on words. If you'd rather not pin one, leave `model` out, and keep it out on every run so the series stays comparable. ## Step 2: How do you call both answer sources? One function per source, each returning the parsed JSON or `None` with the error code printed. Pass the prompt as `prompt` to the answer endpoint and as `query` to the AI overview endpoint. Use a long timeout, since generating an answer can take a while. ```python import os import requests BASE = "https://api.perceptlayer.com/v1" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def call(path, params): r = requests.get(f"{BASE}/{path}", params=params, headers=HEADERS, timeout=120) if r.status_code != 200: print(path, r.status_code, r.json()["error"]["code"]) return None, 0 return r.json(), int(r.headers.get("X-Credits-Used", "0")) def llm_answer(cfg, prompt): params = {"prompt": prompt, "locale": cfg["locale"]} if cfg.get("model"): params["model"] = cfg["model"] return call("llm-answers/answer", params) def ai_overview(cfg, prompt): return call("google-search/search-ai-overview", {"query": prompt, "hl": cfg["hl"], "gl": cfg["gl"]}) ``` Each call returns the credits it used, read from the `X-Credits-Used` header, so the job can log its own spend. The calls run one after another, so a run stays within a free account's 1 request a second; if you parallelise it and get `rate_limited` (429), wait the seconds in `Retry-After`. ## Step 3: How do you extract brands and cited sources? For the LLM answer, read the fields the recording shows. Our recorded call with `prompt=What is the tallest mountain in Europe? Give two sources.` returns the answer text, the sources the engine looked at, and which of them it cited. Trimmed with `…`: ```json { "success": true, "data": { "answer": { "text": "The tallest mountain in Europe is **Mount Elbrus**, located in the Caucasus Mountains of southwestern Russia. Its highest summit reaches **5,642 metres (18,510 feet)** above sea level. …", "length": 607 }, "sources": [ { "title": "8/28/2023\nEurope: Physical Geography\nD O N AT E\nEd", "url": "https://media.nationalgeographic.org/assets/reference/assets/europe-physical-geography-1.pdf", "attribution": "media.nationalgeographic.org", "pub_date": "2025-06-13", "type": "search_result", "cited": false, … }, { "title": "El'brus", "url": "https://education.nationalgeographic.org/resource/elbrus/", "attribution": "education.nationalgeographic.org", "pub_date": "2023-10-19", "type": "search_result", "cited": true, … }, { "title": "Explore_EN", "url": "https://europa.eu/europago/explore/pdf/flip-book/lets-explore-europe-en/NA0114598ENC_002.pdf", "attribution": "europa.eu", "pub_date": "2014-09-02", "type": "search_result", "cited": false, … } ], "citations": […], "model": { "resolved": "gpt-6", "requested": "auto" }, … } } ``` Two details matter for tracking. Of the three sources, only one has `cited: true`, so "sources the engine read" and "sources it cited" are different lists; record both. And `model` shows `requested: auto` resolved to a specific model, so store `model.resolved` with every row, or a silent model change will look like a change in visibility. The AI overview response isn't recorded, so for it the code walks every string: a brand counts if its name appears as a whole word, and a domain counts if any URL points at it. ```python import re from urllib.parse import urlparse def strings(obj): if isinstance(obj, str): yield obj elif isinstance(obj, dict): for v in obj.values(): yield from strings(v) elif isinstance(obj, list): for v in obj: yield from strings(v) def find_brands(text, brands): return [b for b in brands if re.search(rf"(?> track.log 2>&1 ``` After a week or more, this query gives each brand's share of answers by source: ```python import json import sqlite3 from collections import Counter db = sqlite3.connect("ai_mentions.db") rows = db.execute("SELECT source, mentioned FROM answers WHERE day >= date('now', '-28 days')").fetchall() totals, hits = Counter(), Counter() for source, mentioned in rows: totals[source] += 1 for brand in json.loads(mentioned): hits[(source, brand)] += 1 for (source, brand), n in sorted(hits.items()): print(f"{source:12} {brand:12} {n}/{totals[source]} answers ({n / totals[source]:.0%})") ``` The output is one line per source and brand: how many of the period's answers named the brand, out of how many, and the percentage. Do the same with `domains` to see which sites the engines lean on for your category; those are the pages worth earning a mention on. For keeping a scheduled job inside a fixed number of credits, the guide to [budgeting credits per scheduled run](https://perceptlayer.com/blog/scheduled-agent-credit-budget) adds a hard cap. ## How should you read the numbers? As rates over time, not facts about one day. An AI answer is one sample from a system that can answer the same prompt differently tomorrow, and the sources it cites are its choice, not a ranking. OpenAI's own help page notes that search results and citations can be incomplete, outdated or incorrect ( [OpenAI Help Center](https://help.openai.com/en/articles/9237897-chatgpt-search), 2026). Treat a brand's share of answers as a trend to watch, and check the cited pages before acting on them. Keep the prompt set, model, locale and country fixed for as long as you want comparable numbers. When you change any of them, start a new series rather than mixing it into the old one. And compare sources side by side: a brand can be common in the AI overview and rare in the LLM answer, or the reverse, which tells you where to focus. ## What does it cost per prompt per day? Two credits per prompt per day: 1 for the LLM answer and 1 for the AI overview. Every call is 1 credit on success and 0 on failure, so the monthly cost is prompts × 2 × days. | Prompts | Calls a day | Credits a month (30 days) | | --- | --- | --- | | 15 | 30 | 15 × 2 × 30 = 900 | | 50 | 100 | 50 × 2 × 30 = 3,000 | | 50, two models each | 150 | 50 × 3 × 30 = 4,500 | The 100 free credits cover fifteen prompts for 3 days, and the Starter pack's 10,000 covers them for 11 months. Fifty prompts across two models is 4,500 credits a month, within the Starter pack's 10,000 for two months; purchased credits last 12 months. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance and the [pricing page](https://perceptlayer.com/pricing) has what packs cost. Start by running one of your prompts in the playground on the [LLM Answers API page](https://perceptlayer.com/apis/llm-answers). ## APIs in this post - [LLM Answers **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/llm-answers) - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How much does tracking one prompt cost? Two credits a day: 1 for `/v1/llm-answers/answer` and 1 for `/v1/google-search/search-ai-overview`, so 60 credits a month per prompt. Failed calls cost nothing. The 100 free credits, granted once, cover one prompt tracked daily on both sources for 50 days, or 15 prompts for 3 days, and the [pricing page](https://perceptlayer.com/pricing) has what credit packs cost beyond that. ### Which AI engines can I track? The models endpoint takes an `engine` of `chatgpt` or `perplexity` and lists the models it offers for that engine; pass one as `model` to the answer endpoint. Google's AI overview comes from its own endpoint on the [Google Search API](https://perceptlayer.com/apis/google-search). Pin the model you choose so day-to-day changes come from the answers, not your settings. ### Why is the AI overview empty for some prompts? Google shows AI Overviews only when its systems decide they add something to classic results, so many queries don't get one. Store the empty result as a row with little or no text: the share of days an overview appears at all is itself worth tracking, alongside which brands it names when it does. ### Should my prompts include my brand name? No, not for visibility tracking. A prompt that names your brand tells you how the engine describes you, which is useful, but it can't tell you whether you'd be recommended unprompted. Keep a separate small set of branded prompts if you want to monitor how the answer describes your product. ### Can I track answers in other countries and languages? Yes. Set `locale` (up to 16 characters, such as `de-DE`) and `timezone` on the answer endpoint, and `hl` and `gl` on the AI overview endpoint. Treat each market as its own series with its own rows, because answers and cited sources differ by language and country. ai search brand monitoring llm answers ai overviews python ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Website to Markdown: Clean Page Text for LLMs](https://perceptlayer.com/blog/website-to-markdown-for-llms) Turn a website into markdown with one call (response\_type=markdown, 1 credit a page) or with markdownify in Python, then strip what an LLM doesn't need. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. --- title: "Google Patents API: Search Patents and Get Details" description: "Search Google Patents by keyword, inventor or assignee with one GET call, then fetch full details by patent_id. Both endpoints cost 1 credit per call." url: https://perceptlayer.com/blog/google-patents-api-search-details --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Patents API: Search Patents and Get Details 22 Sept 2026 Perceptlayer 6 min read You can get Google Patents results as JSON with two calls. `GET /v1/google-patents/search` takes a query and returns matching patents with title, dates, inventor and assignee. `GET /v1/google-patents/details` takes one `patent_id` and returns that patent's record. Each successful call costs 1 credit. ## Key takeaways - Search first, then fetch details: `search` needs only `q` (up to 500 characters), and `details` needs only the `patent_id` that search returns. - `search` filters by `status` ( `GRANT` or `APPLICATION`), `type` ( `PATENT` or `DESIGN`), `sort` ( `new` or `old`), plus `country`, `language`, `before`, `after`, `inventor` and `assignee`. - Both endpoints cost 1 credit on success. A failed call costs nothing and returns `X-Credits-Used: 0`. - The recorded search for `machine learning` reported 122,797 results over 99 pages, so page through with `page` rather than expecting everything in one response. - For whole-corpus analysis, an official bulk dataset is usually a better fit than any per-call API. ## How do you search Google Patents with an API? Send a GET request to `/v1/google-patents/search` with a `q` parameter and your key in the `X-API-Key` header. The response is JSON: a `data` object with result totals and a `patents` array. Every item carries a `patent_id`, a title, a snippet, dates, inventor and assignee. [Get a free API key](https://perceptlayer.com/signup) if you don't have one yet. ```bash curl "https://api.perceptlayer.com/v1/google-patents/search?q=machine+learning" \ -H "X-API-Key: $API_KEY" ``` Here is an excerpt of the recorded response for that request, trimmed with `…`: ```json { "success": true, "data": { "total_results": 122797, "total_pages": 99, "current_page": 1, "many_results": false, "patents": [ { "patent_id": "patent/US12438891B1/en", "rank": 0, "title": "Anomaly detection based on ensemble machine learning model", "snippet": "accessing the entity profile to read the plurality of features scores for the entity; …", "publication_number": "US12438891B1", "language": "en", "dates": { "priority": "2015-08-31", "filing": "2022-02-18", "grant": "2025-10-07", "publication": "2025-10-07" }, "inventor": "…", "assignee": "Splunk Inc.", "family_status": [ { "country": "US", "status": "ACTIVE" } ] }, … ], "cached": false, "response_time_ms": 731 } } ``` Authentication is a single header; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the `api_key` query parameter for places where headers aren't possible. The [requests and responses docs](https://docs.perceptlayer.com/requests) describe the envelope. ## Which parameters does the search endpoint take? The search endpoint takes one required parameter, `q`, and eleven optional ones that narrow or order the results. Only `sort`, `status` and `type` have a fixed set of allowed values. The rest are free strings or integers, and nothing more is documented about them, so test a value in the [Google Patents search playground](https://perceptlayer.com/apis/google-patents/search) before you build on it. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `q` | string | yes | Search query, up to 500 characters | | `page` | integer | no | Results page; compare with `total_pages` in the response | | `num` | integer | no | Number of results | | `sort` | string | no | `new` or `old` | | `before` | string | no | Date upper bound | | `after` | string | no | Date lower bound | | `country` | string | no | Country filter | | `language` | string | no | Language filter | | `status` | string | no | `GRANT` or `APPLICATION` | | `type` | string | no | `PATENT` or `DESIGN` | | `inventor` | string | no | Inventor name | | `assignee` | string | no | Assignee name, such as a company | A typical filtered call asks for granted utility patents, newest first: ```bash curl "https://api.perceptlayer.com/v1/google-patents/search?q=solid+state+battery&status=GRANT&type=PATENT&sort=new" \ -H "X-API-Key: $API_KEY" ``` ## How do you get the details for one patent? Pass a `patent_id` from the search results to `/v1/google-patents/details`. It's the only parameter, and it's required. The search response gives you the value to use in each item's `patent_id` field, for example `patent/US12438891B1/en` in the recorded sample above. ```bash curl "https://api.perceptlayer.com/v1/google-patents/details?patent_id=patent/US12438891B1/en" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a details response for this article, so we won't show one. Open the [Google Patents details endpoint](https://perceptlayer.com/apis/google-patents/details) and run it in the playground to see the fields for a patent you care about. That's the quickest way to decide which of them your code will read. The two calls suit two jobs. A search page lists many patents for 1 credit, with the title, snippet, dates and assignee, so it works for triage. Details returns one patent for 1 credit, so save it for the short list you actually need to read. ## How do you pull patents for a topic in Python? Loop over pages of search results, filter on the fields search already returns, then call details only for what survives. The script below stops at a page cap, so it can never spend more than a number you chose. It retries once on `429` and `503` using the `Retry-After` header, as the [rate limits docs](https://docs.perceptlayer.com/rate-limits) advise. ```python import json import os import time import requests BASE = "https://api.perceptlayer.com/v1/google-patents" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, params): for attempt in range(2): r = requests.get(f"{BASE}/{path}", params=params, headers=HEADERS, timeout=30) if r.status_code in (429, 503) and attempt == 0: time.sleep(int(r.headers.get("Retry-After", "1"))) continue r.raise_for_status() return r.json()["data"] def search_topic(query, max_pages=3): found = [] page = 1 while page <= max_pages: data = get("search", {"q": query, "status": "GRANT", "sort": "new", "page": page}) found.extend(data["patents"]) if page >= data["total_pages"]: break page += 1 return found patents = search_topic("solid state battery") # Triage on fields search already returns, before spending on details. shortlist = [p for p in patents if p["dates"]["grant"] >= "2025-01-01"][:25] records = [get("details", {"patent_id": p["patent_id"]}) for p in shortlist] with open("patents.json", "w") as f: json.dump(records, f) print(len(patents), "found,", len(records), "detailed") ``` The grant date is compared as an ISO string, which matches the format in the recorded sample ( `2025-10-07`). We haven't recorded a response for an application, so we haven't confirmed what `dates.grant` holds for patents without a grant. The search above sets `status` to `GRANT` so the filter doesn't depend on it. ### What does a run cost? Every successful call is 1 credit, so the cost is the search pages plus the details calls. With `max_pages=3` and a shortlist capped at 25, the most this script can spend is 3 + 25 = 28 credits. Failed calls aren't billed. Read `X-Credits-Used` and `X-Credits-Remaining` on any response to track it, and see the [credits docs](https://docs.perceptlayer.com/credits) and [pricing](https://perceptlayer.com/pricing) for what credits cost. The free tier gives 100 credits once, after you verify an email address, which covers 3 runs of this script at its cap (3 × 28 = 84 credits). If your pipeline repeats the same queries, cache the results; the post on [caching API responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses) shows how. To walk further than three pages, see [paginating a web data API safely](https://perceptlayer.com/blog/paginate-web-data-api-python). ## When is an official bulk dataset a better fit? If you need the whole corpus, or every patent in a field over many years, use an official bulk dataset. A per-call API charges per call and fits targeted lookups and monitoring, while a dataset you query yourself fits full-corpus statistics. Using the API for the second job spends credits on data you can get in bulk. One official option is worth knowing: [Google Patents Public Datasets on BigQuery](https://cloud.google.com/blog/topics/public-datasets/google-patents-public-datasets-connecting-public-paid-and-private-patent-data) puts patent publications from many countries in SQL-queryable tables, so landscape analysis runs as a query rather than a crawl. The API suits the other cases: an agent that looks up the patents behind a product claim, a dashboard that watches a competitor's new grants, or a script that enriches a list of company names. The endpoints cover search on [Google Patents](https://patents.google.com/), and the data is returned as found at the time of the call. For agents, the [MCP server](https://docs.perceptlayer.com/ai-agents) exposes the same endpoints as tools. `search_endpoints` and `get_endpoint` look up the catalogue for free, and `call_endpoint` spends credits only on success. ## What can go wrong? Errors come back as an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. The ones you'll meet here are `invalid_parameters` (422), for example when `status` isn't `GRANT` or `APPLICATION`; `invalid_api_key` (401); `insufficient_credits` (402) when the balance runs out; and `rate_limited` (429). The [errors docs](https://docs.perceptlayer.com/errors) list them all. Free accounts get 1 request a second, shared by all keys on the account. The script above is sequential, so it stays inside that. If you parallelise details calls, read `RateLimit-Remaining` and back off on `Retry-After`. A timed-out request may still have succeeded and been billed, because requests have no idempotency key. Next step: run one search in the [playground on the Google Patents API page](https://perceptlayer.com/apis/google-patents), then copy the cURL call into your own code. The same key also covers [Google Scholar](https://perceptlayer.com/blog/google-scholar-api) if you want papers next to patents, and the rest of the [search engines APIs](https://perceptlayer.com/verticals/search). ## APIs in this post - [Google Patents **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/google-patents) ## Frequently asked questions ### Is there an official way to get Google Patents data? For bulk analysis, Google publishes [Google Patents Public Datasets on BigQuery](https://cloud.google.com/blog/topics/public-datasets/google-patents-public-datasets-connecting-public-paid-and-private-patent-data). For per-query lookups, Perceptlayer's `search` and `details` endpoints return Google Patents results as JSON, with 1 credit per successful call. Use BigQuery for full-corpus work and the API for lookups. ### How much does the Google Patents API cost? Both `search` and `details` cost 1 credit per successful call, and failed calls cost nothing. Free accounts get 100 credits after email verification, with no credit card. Fetching 100 patents' details after 5 search pages is 5 + 100 = 105 credits, 5 more than the free credits. [Pricing](https://perceptlayer.com/pricing) lists what credit packs cost. ### Can I search by inventor or company? Yes. Use `inventor` for a person's name and `assignee` for the owning organisation, alone or together with `q`, which is always required. Add `status=GRANT` to keep only granted patents. The recorded sample shows `assignee` as a plain string, so match the company name as Google Patents writes it. ### How do I get all the results for a query? Read `total_pages` from the first response, then request `page=2`, `page=3` and so on until you reach it. The recorded search for `machine learning` reported 99 pages. Cap your loop, because each page is a billed call, and cache anything you'll reread. ### Do I need the details call for every patent? No. Search already returns title, snippet, publication number, dates, inventor, assignee and family status for each hit. Filter on those first and call `details` only for the patents you need to read in full. That keeps a run to a handful of credits instead of one details call per hit. patents google patents search research json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Sept 2026 Updated 22 Oct 2026 Perceptlayer 7 min read ## [Google News API: Search News Articles as JSON](https://perceptlayer.com/blog/google-news-api) One GET call to /v1/google-news/news returns articles with title, link, source and ISO date as JSON for 1 credit. Parameters, a real response, cost. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 19 Aug 2026 Updated 6 Nov 2026 Perceptlayer 8 min read ## [Google Events API: Find Local Events as JSON](https://perceptlayer.com/blog/google-events-api-local-events) Search Google Events as JSON with one GET: q, hl, gl, location and start parameters, a recorded London response, and 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Aug 2026 Updated 26 Oct 2026 Perceptlayer 6 min read ## [Yelp Reviews API: Business Search and Reviews as JSON](https://perceptlayer.com/blog/yelp-reviews-api-json) Three Yelp endpoints return search results, business details and reviews as JSON, 1 credit per call. Parameters, a real response and a cost example. --- title: "Realestate.com.au API: Australian Listings as JSON" description: "Search realestate.com.au by location and channel (buy, rent, sold), then open each listing by URL. Parameters, a recorded Sydney response and the cost." url: https://perceptlayer.com/blog/realestate-com-au-api-listings --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Realestate.com.au API: Australian Listings as JSON 22 Sept 2026 Perceptlayer 6 min read realestate.com.au has no self-serve API for reading its listings. To get them as JSON, call `GET /v1/realestate-com-au/search` with a `location` such as `Sydney, NSW` and a `channel` of `buy`, `rent` or `sold`. Each successful call costs 1 credit and returns a page of listings with address, price text, bedrooms, agency and a listing URL, which `/v1/realestate-com-au/property` takes to return the full listing. ## Key takeaways - The flow is three calls: `locations` to check a place name, `search` with `location` and `channel`, then `property` with each listing's `url`. - A recorded search for `Sydney, NSW` returned `total_results` 596 with `pageSize` 25, so the whole result set is 24 pages, or 24 credits. - `price` is display text, not a number: the same recorded page has `Contact Agent` and `Buyers Guide $2,200,000`. Parse it, and keep the raw string. - The recorded search has `surroundingSuburbs: true` and returned a Millers Point listing for a Sydney search, so filter on `address.suburb` if you need one suburb only. - All 9 realestate.com.au endpoints cost 1 credit per successful call, and failed calls cost nothing. ## Is there an official realestate.com.au API? Not one we could find for reading listings: there is no public, self-serve API that returns realestate.com.au search results to any developer who signs up. REA Group, which runs the site, sells property data separately through PropTrack, its data and valuations business, which offers property data APIs including automated valuations ( [PropTrack](https://www.proptrack.com.au/products/property-data-and-insights/apis/), 2026). If you need automated valuations or a licensed data product, talk to PropTrack. If you need what the listing pages show, as JSON, without a sales process, the [realestate.com.au API](https://perceptlayer.com/apis/realestate-com-au) returns it with the same key as every other API in the catalogue. Data is collected from publicly available sources and returned as found at the time of the call, and whether your use is allowed depends on the site's terms and Australian law. ## Which endpoints does the realestate.com.au API have? Nine GET endpoints, each 1 credit per successful call. Three carry the main flow (locations, search, property). Two give area context: suburb profiles and sales events by state. The other four cover agents and agencies. Most identify a page by its realestate.com.au `url`, so the URLs a search returns are the inputs to the next call. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | `/v1/realestate-com-au/locations` | Location matches | `query` | `limit` | | `/v1/realestate-com-au/autocomplete` | Typeahead matches | `query` | `limit`, `types`, `source` | | [`/v1/realestate-com-au/search`](https://perceptlayer.com/apis/realestate-com-au/search) | A page of listings | `location` | `channel`, `page`, `sort`, price, room and type filters | | [`/v1/realestate-com-au/property`](https://perceptlayer.com/apis/realestate-com-au/property) | One listing | `url` | none | | `/v1/realestate-com-au/suburb-profile` | A suburb profile | `url` | none | | [`/v1/realestate-com-au/sales-events`](https://perceptlayer.com/apis/realestate-com-au/sales-events) | Sales events | none | `state`, `url` | | `/v1/realestate-com-au/agents` | Agents | none | `url`, `location`, `page` | | `/v1/realestate-com-au/agent-profile` | One agent | `url` | none | | `/v1/realestate-com-au/agency-profile` | One agency | `url` | none | `sales-events` takes `state` as one of `act`, `nsw`, `nt`, `qld`, `sa`, `tas`, `vic` or `wa`. ## How do you search realestate.com.au listings? Call `GET /v1/realestate-com-au/search` with `location` and, usually, `channel`. `location` is free text up to 120 characters, written the way the site writes it, such as `Sydney, NSW`. If you're not sure how a place is spelled, call `/v1/realestate-com-au/locations` with `query=Sydney` first. `channel` is `buy`, `rent` or `sold`, and `page` steps through results. This is the request behind the recorded response below: ```bash curl "https://api.perceptlayer.com/v1/realestate-com-au/search?location=Sydney%2C+NSW&channel=buy&page=1" \ -H "X-API-Key: $API_KEY" ``` [Get a free API key](https://perceptlayer.com/signup) if you don't have one; keys go in the `X-API-Key` header, as the [authentication docs](https://docs.perceptlayer.com/authentication) explain. ### Which search parameters can you use? Search takes one required parameter and eleven optional ones. The types and limits come from the endpoint definition, and nothing else about them is documented, so don't assume a default sort. | Parameter | Type | Notes | | --- | --- | --- | | `location` | string, required | Up to 120 characters, such as `Sydney, NSW` | | `channel` | string | `buy`, `rent` or `sold` | | `page` | integer | Results page | | `sort` | string | Up to 40 characters | | `min_price`, `max_price` | integer | Price bounds | | `min_bedrooms`, `max_bedrooms` | integer | Bedroom bounds | | `min_bathrooms` | integer | Minimum bathrooms | | `min_carspaces` | integer | Minimum parking spaces | | `property_types` | string | Up to 200 characters | | `keywords` | string | Up to 200 characters | For rentals in Parramatta with two or more bedrooms, that's `location=Parramatta, NSW&channel=rent&min_bedrooms=2`. Switch `channel` to `sold` for recent sales in the same area. ### What does the recorded response contain? The response has `data.total_results`, a `pagination` object and a `listings` array. This excerpt, trimmed with `…`, shows the paging fields and the second listing on the page: ```json { "success": true, "data": { "channel": "buy", "location": "Sydney, NSW", "total_results": 596, "pagination": { "page": 1, "pageSize": 25, "localities": [{ "searchLocation": "Sydney CBD, NSW" }], "filters": { "surroundingSuburbs": true, … } }, "listings": [ …, { "id": "151002436", "url": "https://www.realestate.com.au/property-apartment-nsw-millers+point-151002436", "property_type": "Apartment", "address": { "display": { "fullAddress": "28A High Street, Millers Point, NSW 2000", … }, "suburb": "Millers Point", "state": "NSW", "postcode": "2000" }, "price": "Buyers Guide $2,200,000", "features": { "bedrooms": { "value": 3 }, "bathrooms": { "value": 2 }, "parkingSpaces": { "value": 0 }, … }, "property_sizes": { "land": { "displayValue": "103", … } }, "listing_company": { "name": "LJ Hooker - Blacktown", "id": "EKORXD", "ratingsReviews": { "avgRating": 5, "totalReviews": 202 }, … }, … } ], … } } ``` Three details matter when you load this. Room counts sit one level down, under `features.bedrooms.value`. The listing's `url` is what the `property` endpoint takes. And the search resolved `Sydney, NSW` to the locality `Sydney CBD, NSW` with `surroundingSuburbs: true`, which is why a Millers Point listing appears. The first listing on the same page is in Sydney itself, with `price` set to `Contact Agent`. ## How do you turn the price text into a number? Keep the raw `price` string and add a parsed column next to it. On realestate.com.au the price is whatever the agent displays, so one page can mix a guide, a range and no figure at all. In the recorded page, one listing says `Contact Agent` and the other `Buyers Guide $2,200,000`. A parser that takes the first dollar figure and leaves the rest empty is honest about what the page gave you: ```python import os import re import requests URL = "https://api.perceptlayer.com/v1/realestate-com-au/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} MONEY = re.compile(r"\$\s?([\d,]+)") def parse_price(text): m = MONEY.search(text or "") return int(m.group(1).replace(",", "")) if m else None r = requests.get(URL, params={"location": "Sydney, NSW", "channel": "buy", "page": 1}, headers=HEADERS, timeout=60) r.raise_for_status() for item in r.json()["data"]["listings"]: print(item["id"], item["address"]["suburb"], item["features"]["bedrooms"]["value"], item["price"], parse_price(item["price"])) ``` We checked `parse_price` against the recorded page but haven't run the request loop live for this article. For the two listings in the recorded page, `parse_price` returns `None` and `2200000`. A range such as a lower and upper figure would return the lower one, so if your analysis needs ranges, capture both matches with `MONEY.findall`. ## What does a suburb-level pull cost? Each search page is one call and 1 credit, so a full pull costs the number of pages. With `total_results` 596 and `pageSize` 25, the recorded Sydney search needs 596 ÷ 25 = 23.84, rounded up to 24 pages: 24 credits. Opening every listing with `property` adds one call each, 596 credits, for 620 credits in total. | Step | Calls | Credits | | --- | --- | --- | | `search`, 24 pages | 24 | 24 | | `property` for every listing | 596 | 596 | | **Full pull, buy channel** | **620** | **620** | Run the search pages weekly and skip `property` for listings you've already stored, and the recurring cost falls to 24 credits plus one call per new listing. The 100 free credits on signup cover the first four weekly search passes (4 × 24 = 96 credits) before you open new listings; ongoing runs need a pack. Read `total_results` from page one rather than hard-coding it, since it changes daily. Failed calls return `X-Credits-Used: 0`; the [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what packs cost. ## When should you call Domain.com.au as well? Call both portals when you need coverage rather than one site's view, because a listing can appear on either and the two return different fields. Domain's API has auction results by city and suburb insights by bedrooms and property type; realestate.com.au has agency ratings, sales events by state and suburb profiles. The [Domain.com.au guide](https://perceptlayer.com/blog/domain-com-au-api-listings) compares the two response shapes field by field, so it isn't repeated here. The listing IDs differ between portals, so you can't join on them. Normalise the address (unit, street number, street, suburb, postcode) and match on that; the article on [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) has the method. To see the fields for your own area first, run a `search` in the playground on the [realestate.com.au API page](https://perceptlayer.com/apis/realestate-com-au). ## APIs in this post - [realestate.com.au **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/realestate-com-au) ## Frequently asked questions ### How much does the realestate.com.au API cost? Every one of the 9 endpoints costs 1 credit per successful call, and failed calls cost nothing. The recorded Sydney search is 24 pages, so a full pass is 24 credits before opening any listings. Every verified account gets 100 free credits on signup, and the [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Can I get sold prices from realestate.com.au? Yes, through the same search endpoint with `channel=sold` and a `location`. Sold results come back as listings like the buy channel, with whatever price text the site shows for each sale. Where a sale shows no figure, the parser above returns `None`, so keep the raw `price` text next to any parsed number. ### Why did my search return listings from other suburbs? The recorded search shows `surroundingSuburbs: true` in its filters, and a search for `Sydney, NSW` returned a listing in Millers Point. If you need one suburb only, filter the listings on `address.suburb` and `address.postcode` after the call. Credits are per call, not per listing, so the filtering costs nothing extra. ### Does the API return agents' personal details? Listings include a `listers` array with the agents' names and job titles as shown on the page, and there are agent and agency profile endpoints. Australia's privacy regulator says personal information can include information about a person's work activities, and lists a name as an example ( [OAIC](https://www.oaic.gov.au/privacy/privacy-guidance-for-organisations-and-government-agencies/handling-personal-information/what-is-personal-information), 2026). Use agency-level fields for analysis and drop names you don't need. ### What happens when a call fails? You get an HTTP status and a JSON body with an error `code`, a `message` and a `request_id`, and `X-Credits-Used` is 0, so a failed `property` lookup for a withdrawn listing costs nothing. A `location` over 120 characters fails with `invalid_parameters` (422). The [errors docs](https://docs.perceptlayer.com/errors) list every code and what to do about it. realestate.com.au australia real estate listings property data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Aug 2026 Perceptlayer 7 min read ## [Domain.com.au API: Australian Listings and Suburb Data](https://perceptlayer.com/blog/domain-com-au-api-listings) Call /v1/domain-com-au/search for Australian listings, then property, auction results and suburb insights as JSON. Parameters, a real response, 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 9 min read ## [Zillow Listings API: Get Property Data as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) One GET to /v1/zillow/search returns listings near a point as JSON with price, beds, baths and address. Parameters, a real response, 1 credit per call. --- title: "Scheduling Web Data Pulls: Cron, Queues or Workflows" description: "Cron, a job queue or a workflow engine for recurring API pulls? Compare failure handling and credit cost, with a verdict per team size and a cron script." url: https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Scheduling Web Data Pulls: Cron, Queues or Workflows 22 Sept 2026 Perceptlayer 10 min read Use cron if one script finishes the whole pull inside its schedule window, add a job queue once you fan out to hundreds of calls or need per-item retries, and move to a workflow engine only when steps depend on each other and must survive restarts. Failure handling and cost control decide it, not scheduling syntax. This article compares the three on a Google Trends pull and gives a verdict per team size. ## Key takeaways - Cron costs nothing to run and is enough for a pull of a few hundred calls per run, as long as the script skips work it has already done. - A queue turns each call into its own retryable job, so one `429` or `503` delays one keyword, not the whole run. - A workflow engine records progress between steps, which pays off when a later call needs the result of an earlier one. - Every pattern needs your own record of what was fetched: requests have no idempotency key, so a timed-out call may have been billed. - A daily pull of 200 keywords at 1 credit each is 6,000 credits a month; the same pull hourly is 144,000. ## What are you actually scheduling? A recurring web data pull is a loop of API calls on a clock: for each keyword, place or product, call an endpoint, store the result, and do it again tomorrow. The scheduler only decides when the loop starts. What separates cron, queues and workflows is what happens when call number 87 of 200 fails. Take a concrete job. You track search interest for 200 keywords with `GET /v1/google-trends/interest`, which takes `q`, plus optional `geo`, `time_range`, `hl` and `search_type`. Each successful call costs 1 credit; failed calls cost nothing and return `X-Credits-Used: 0`. A daily run is 200 credits. This is the same shape as most scheduled pulls: prices, listings, reviews, rankings. The [Google Trends API](https://perceptlayer.com/apis/google-trends) is a good test case because the calls are cheap, independent and repeated for the same keys every day. ## How do cron, queues and workflows compare? Cron runs a script on a fixed schedule and forgets it, a job queue stores each unit of work and retries it independently, and a workflow engine stores the whole run's progress as durable state. Cron is cheapest to operate, a workflow engine is safest for long multi-step runs, and a queue sits between them on both counts. | | Cron | Job queue | Workflow engine | | --- | --- | --- | --- | | Unit of retry | The whole run, or whatever your script retries inline | One job (one keyword) | One step, with its own retry policy | | State between failures | Only what you write to a file or database | Queue contents plus your results table | Recorded by the engine | | Rate-limit handling | Sleep inside the script | Delay the one job, cap consumer concurrency | Retry policy with a backoff per step | | Overlapping runs | You prevent them (a lock) | Natural: jobs interleave | Each run is a separate instance | | Extra infrastructure | None | A queue and a consumer | An engine, workers and a history store | | Cost visibility | Count calls in the script | Count completed jobs | Count completed steps | | Fits | One script, one table | Fan-out, spiky volume | Dependent steps, long or auditable runs | None of the three removes the need to design for repeats. Queues deliver work more than once under some failure modes, cron can start a second run before the first ends, and a workflow retries a step that may already have succeeded. You handle that in your data model, not in the scheduler. ## Which failures should every scheduled pull handle? Every scheduled pull has to handle five outcomes: a rate limit, a temporary outage, a client timeout, a bad request and an empty balance. Each needs a different response, and only the first two should retry automatically. The [error reference](https://docs.perceptlayer.com/errors) lists the codes; here is how each one should behave in a scheduled job. | Response | Meaning | What the job does | | --- | --- | --- | | `429` `rate_limited` | Rate limited; carries `Retry-After` | Wait `Retry-After` seconds, retry | | `503` `temporarily_unavailable` | Temporarily unavailable; carries `Retry-After` | Wait `Retry-After` seconds, retry | | `502` `source_error` | An error from the source; no `Retry-After` is documented | Retry a few times with a delay, then give up on this key | | Client timeout | You don't know if it was billed | Treat as unknown; check your own record before repeating | | `422` `invalid_parameters` | The request is wrong | Don't retry; fix the input | | `402` `insufficient_credits` | Prepaid balance is empty | Stop the whole run; nothing more is debited | The timeout row matters most. Requests carry no idempotency key, so a request whose reply was lost may have succeeded and been billed. The pattern in [retrying API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) applies to all three schedulers: write a row keyed by keyword, geography and time window, and check it before you call. The `402` row is why a run needs a stop condition. Retrying 200 jobs against an empty balance wastes time and fills your logs. For the full set of status handling in code, see [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python). ## When is cron enough? Cron is enough when the whole pull finishes well inside its schedule interval and a failed run can simply be rerun. For 200 calls at the free tier's 1 request a second, a run takes a little over three minutes of requests. With a paying account's minimum of 5 requests a second (300 a minute), the same run takes about 40 seconds. The script below pulls interest for a keyword list and stores each result in SQLite. It writes an `unknown` row before each call and marks it `ok` only when the response arrives. A rerun skips finished keywords and skips `unknown` ones too, listing them for you to review, because a timed-out call may have been billed. It honours `Retry-After` and stops on `402`. ```python import os, sqlite3, sys, time, datetime import requests URL = "https://api.perceptlayer.com/v1/google-trends/interest" KEYWORDS = ["tesla", "rivian", "lucid"] GEO = "US" PAUSE = 1.0 # seconds between calls; 1 request a second on the free tier TIMEOUT = object() # sentinel: the reply was lost, the call may have been billed db = sqlite3.connect("trends.db") db.execute("""CREATE TABLE IF NOT EXISTS pulls ( keyword TEXT, geo TEXT, day TEXT, status TEXT, fetched_at TEXT, body TEXT, PRIMARY KEY (keyword, geo, day))""") day = datetime.date.today().isoformat() headers = {"X-API-Key": os.environ["API_KEY"]} def fetch(keyword): params = {"q": keyword, "geo": GEO, "time_range": "1y"} for attempt in range(4): try: r = requests.get(URL, params=params, headers=headers, timeout=30) except requests.Timeout: return TIMEOUT # every response carries the balance; log it to resolve "unknown" rows later print(f"{r.status_code} {keyword} credits_remaining={r.headers.get('X-Credits-Remaining')}") if r.status_code == 200: return r.text if r.status_code == 402: release(keyword) sys.exit("insufficient_credits: stopping the run") if r.status_code in (429, 503): time.sleep(min(int(r.headers.get("Retry-After", "5")), 60)) continue err = r.json().get("error", {}) print(f"{r.status_code} {err.get('code')} {keyword} {err.get('request_id')}") if r.status_code == 502: time.sleep(5) continue return None return None def release(keyword): # an error response was not billed, so the attempt can be retried later db.execute("DELETE FROM pulls WHERE keyword=? AND geo=? AND day=? AND status='unknown'", (keyword, GEO, day)) db.commit() for kw in KEYWORDS: row = db.execute("SELECT status FROM pulls WHERE keyword=? AND geo=? AND day=?", (kw, GEO, day)).fetchone() if row and row[0] == "ok": continue if row: print(f"review {kw}: earlier attempt has no recorded outcome, skipping") continue # record the attempt before calling, so a timeout or crash leaves a trace db.execute("INSERT INTO pulls VALUES (?,?,?,?,?,NULL)", (kw, GEO, day, "unknown", datetime.datetime.utcnow().isoformat())) db.commit() body = fetch(kw) if body is TIMEOUT: print(f"timeout {kw}: left as unknown, may have been billed") elif body: db.execute("UPDATE pulls SET status='ok', body=? WHERE keyword=? AND geo=? AND day=?", (body, kw, GEO, day)) db.commit() else: release(kw) time.sleep(PAUSE) ``` Schedule it with a lock so a slow run can't overlap the next one: ```bash 0 6 * * * flock -n /tmp/trends.lock python3 /opt/pulls/pull.py >> /var/log/trends.log 2>&1 ``` Set `API_KEY` in the environment of the cron job. The response for each keyword is a JSON document with `timeline_data` and `interest_over_time`; to load such documents into a database, see [loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres). Cron's weak spot is visibility. A run that dies at 3 a.m. leaves a log line and nothing else, so add an alert on a missing `ok` row for today, not on the exit code. Rows stuck at `unknown` need a person: compare the `X-Credits-Remaining` values you logged before and after the call, then delete the row to allow a retry if no credit was taken. ## When does a job queue earn its place? A job queue earns its place when a pull is large enough that one slow or failing item shouldn't hold up the rest, or when volume is spiky. Each keyword becomes a message, a consumer makes one call per message, and a failure retries that message alone. The cost is a queue, a consumer process and a dead-letter destination to watch. Queues also give you one control cron doesn't: consumer concurrency. Rate limits are per account and shared by all its keys, counted per minute, so ten consumers running flat out compete for the same budget. Cap the consumer count to your account's rate, and read `RateLimit-Remaining` and `RateLimit-Reset` if you want to slow down before you hit a `429`. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the exact headers, and [concurrent API requests in Python](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) shows a bounded-concurrency client. The decision logic of a consumer is small. This function maps a response to what the queue should do with the message: ```python def decide(status, headers): """Return (action, delay_seconds) for a queue message.""" if status == 200: return "ack", 0 if status in (429, 503): return "retry", int(headers.get("Retry-After", "5")) if status == 502: return "retry_limited", 30 if status == 402: return "halt", 0 # pause the consumers, not just this job return "dead_letter", 0 # 401, 403, 404, 422: retrying won't help ``` Most queues deliver at least once, so a message can arrive twice. Amazon documents this behaviour for standard queues ( [Amazon SQS, standard queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html)). The consumer must therefore do the same check the cron script does: look up keyword, geography and window in your results table before calling the API. A duplicate delivery then costs a database read, not a credit. ## When do you need a workflow engine? You need a workflow engine when a run has several dependent steps, takes long enough that a restart in the middle is likely, or has to be auditable step by step. The engine persists each step's result, so a crashed worker resumes after the last completed step instead of repeating paid calls. The Google Events endpoints show where dependency appears. `GET /v1/google-events/details` requires an `event_token`, which only a search returns, so a pull that follows up on events has a second stage whose input comes from the first. A pipeline might then fetch, validate, load and notify, with different retry rules at each stage. Engines such as Temporal record a workflow's event history and replay it to recover state after a failure ( [Temporal documentation, Workflows](https://docs.temporal.io/workflows)), and they apply a retry policy to each activity ( [Temporal documentation, Retry Policies](https://docs.temporal.io/encyclopedia/retry-policies)). That is real value for multi-stage runs. For a single loop of independent calls it is overhead: you run and monitor an engine to get what a results table and a queue already give you. The best test is to ask whether a failure at step three should resume at step three. If the answer is "just rerun everything, it's cheap", you don't need a workflow engine yet. A 200-credit run is cheaper to repeat than a cluster is to operate. ## What does each option cost in credits? Scheduling doesn't change the price of a call, but it changes how many calls you make and how many you repeat. Cost is calls × 1 credit, so the schedule frequency and the retry discipline are the two levers. Credit packs and what they cost are on the [pricing page](https://perceptlayer.com/pricing); here the numbers are in credits only. | Pull | Calls per run | Runs per month | Credits per month | | --- | --- | --- | --- | | 200 keywords, daily | 200 | 30 | 200 × 30 = 6,000 | | 200 keywords, every 6 hours | 200 | 120 | 200 × 120 = 24,000 | | 200 keywords, hourly | 200 | 720 | 200 × 720 = 144,000 | The daily pull is above the 100 free credits on signup, so it needs a pack: 6,000 credits fits the Starter pack's 10,000. The 6-hourly pull of 24,000 fits the Build pack's 50,000, and the hourly pull of 144,000 fits the Growth pack's 200,000. Purchased credits last 12 months, with no subscription. Before raising frequency, check whether the data changes that fast. Weekly-bucketed interest values, as in the recorded `timeline_data` points ( `"date": "Oct 19 – 25, 2025"`), change slowly: past weeks are fixed buckets, and only the current week's value can move between hourly runs. Caching and TTLs are covered in [caching API responses](https://perceptlayer.com/blog/cache-web-data-api-responses), and per-run budgets in [budgeting credits per scheduled run](https://perceptlayer.com/blog/scheduled-agent-credit-budget). Retries cost nothing when they follow an error response, because failed calls are free. The expensive repeat is the timeout: the call may have succeeded and been billed, so a blind retry pays twice. Your results table is the cost control. ## Which one should your team pick? Pick by how many people run the pipeline and how many steps it has, not by how fashionable the tool is. A solo developer or a team of two should start with cron. A small team with fan-out or deadlines should add a queue. A platform team running many pipelines with dependent stages is where a workflow engine pays back. | Situation | Verdict | | --- | --- | | Solo or two people, under a few hundred calls per run | Cron with a results table and a lock | | Small team, hundreds to thousands of calls per run, need per-item retries | Queue with capped consumers | | Spiky load (many keywords added at once) | Queue; cron would overrun its window | | Dependent stages, long runs, audit trail required | Workflow engine | | Many teams sharing pipelines and on-call | Workflow engine, with queues inside steps if fan-out is large | | An agent triggers pulls on demand | Queue or direct calls; see the [MCP docs](https://docs.perceptlayer.com/ai-agents) | Migration is gentle in this order. The results table and the `decide` logic carry over unchanged from cron to a queue, and the queue's per-item steps become workflow activities later. If you start with the most complex option, you pay its operating cost from day one. If you are weighing a scheduled API against a scraper you maintain, [what maintaining a scraper involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost) covers that comparison. To try the pull above, [get a free API key](https://perceptlayer.com/signup) (100 free credits on signup, no credit card) and run the cron script against three keywords first. ## APIs in this post - [Google Trends **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-trends) ## Frequently asked questions ### How often should I schedule an API data pull? As often as the data changes and no more. The recorded Google Trends interest response buckets values by week, so hourly pulls of a one-year window repeat the same numbers. Daily is a common start. At 1 credit per call, 200 keywords daily is 6,000 credits a month; hourly is 144,000. ### What happens to a scheduled run when my credits run out? Calls return `insufficient_credits` (402) and nothing more is debited. There is no automatic top-up, so your job must treat 402 as a stop signal, not a retry. Alert on it, and check `X-Credits-Remaining`, which every response carries, before large runs. ### Can I run pulls in parallel to finish faster? Yes, within your account's request rate. Limits are per account, shared by all keys, and counted per minute: 1 request a second on the free tier, and at least 5 a second (300 a minute) on a paying account. Parallel workers beyond that only produce `429` responses, so cap concurrency to your rate. ### Is a retry after a timeout safe? Not automatically. Requests have no idempotency key, so a call whose reply was lost may have succeeded and been billed. Record each fetch by keyword, geography and window in your own table, and check it before repeating. Retries after `429` and `503` are safe because those calls are not billed. scheduling cron job queue workflows google trends retries ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 9 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Handle Web Data API Errors in Python: 4xx, 5xx and Timeouts](https://perceptlayer.com/blog/handle-web-data-api-errors-python) Map the API's error codes to retry, fix or stop in Python: 429 and 503 honour Retry-After, 4xx stops, and failed calls cost 0 credits. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 8 Aug 2026 Updated 10 Nov 2026 Perceptlayer 11 min read ## [Scraper or API: What Maintaining a Scraper Really Involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost) What a scraper costs to keep running: selector fixes, proxies, retries and monitoring, set against an API at 1 credit per successful call. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 27 Jul 2026 Perceptlayer 10 min read ## [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) Retry only 429, 502 and 503. Failed responses return X-Credits-Used: 0, but a timeout is the gap. The credit arithmetic, a Python loop and a balance check. --- title: "Salary Data from Job Sites: Reading Ranges Without Bias" description: "Glassdoor's salaries endpoint returns p10 to p90 total pay, a currency and a national count. How to read those ranges and the biases of self-reported pay." url: https://perceptlayer.com/blog/salary-data-job-sites-bias --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Salary Data from Job Sites: Reading Ranges Without Bias 20 Sept 2026 Perceptlayer 7 min read Salary data from job sites is usable if you treat it as a probably self-reported distribution, not a measurement. Read the percentile range, not a single average. Check the currency and pay period. Check how many reports sit behind the number. Then compare it with a source that doesn't rely on volunteers. This article walks through a recorded Glassdoor salaries response and lists the biases to correct for. ## Key takeaways - The `/v1/glassdoor/salaries` response gives per-employer `total_pay` at p10, p25, p50, p75 and p90, plus `currency` and `pay_period`. It has no sample size on employer rows. - Sample size appears in two other places: `estimate.salaries_count` (727,155 in our recording) and `salary_count` on each company from `/v1/glassdoor/companies-search` (4,702 for Stripe, 38 for Stripe OLT). - In the recording, Google's p10 total pay (207,909.08) sits above the US-wide p75 (192,868.14). The response doesn't say how employer rows and the national estimate relate, so don't mix them. - The recorded Indeed jobs response has no structured pay field, so don't plan a salary pipeline on it without checking the fields first. - Each salary call costs 1 credit, and the free tier has 100 credits on signup. ## What does the recorded salaries response contain? A call to `GET /v1/glassdoor/salaries?job_title=software+engineer` returns a list of employer rows and one national `estimate` block. Each employer row carries `currency`, `pay_period`, `base_pay_mean`, `additional_pay_mean` and a five-point `total_pay` distribution. The `estimate` adds `location`, `confidence` and `salaries_count`. Here is the shape, trimmed from the recording: ```json { "success": true, "data": { "job_title": "software engineer", "salaries": [ { "job_title": "Software Engineer", "employer": { "id": 9079, "name": "Google", "rating": 4.4 }, "currency": "USD", "pay_period": "ANNUAL", "base_pay_mean": 184722.83, "additional_pay_mean": 126972.82, "total_pay": { "p10": 207909.08, "p50": 311695.65, "p90": 486503.67 } } ], "total_results": 104377, "estimate": { "currency": "USD", "pay_period": "ANNUAL", "location": "United States", "confidence": "CONFIDENT", "salaries_count": 727155, "total_pay": { "p10": 99464.84, "p50": 152101.59, "p90": 237195.82 } } } } ``` The endpoint takes `job_title` (required), plus optional `employer_id`, `page` and `limit`. See the [Glassdoor salaries endpoint](https://perceptlayer.com/apis/glassdoor/salaries) for the full page, or the earlier [Glassdoor API walkthrough](https://perceptlayer.com/blog/glassdoor-salary-data-api) for reviews and salaries together. ## How wide are the ranges, and what do they say? The recorded p90 is roughly 2.0 to 2.4 times the p10 in every row we have. A range that wide is the honest answer to "what does this job pay", and a single midpoint hides it. Compare spread and level separately. | Row | p10 | p50 | p90 | p90 / p10 | | --- | --- | --- | --- | --- | | Google, total pay | 207,909.08 | 311,695.65 | 486,503.67 | 2.34 | | Microsoft, total pay | 153,947.14 | 218,040.69 | 318,811.92 | 2.07 | | US estimate, total pay | 99,464.84 | 152,101.59 | 237,195.82 | 2.38 | | US estimate, base pay | 79,463.04 | 117,615.72 | 174,086.68 | 2.19 | All values are `USD` and `ANNUAL`. Two readings follow. First, the gap between US total pay and base pay at the median is 34,485.87 (152,101.59 minus 117,615.72), so bonus and stock are a real share of what people report. Second, an employer row doesn't look like a slice of the national row. Google's p10 is above the national p75, and the response doesn't say how the two relate, so don't compare them directly. One more detail worth checking in your own data: for both employers, `base_pay_mean` plus `additional_pay_mean` equals the `total_pay.p50` exactly (184,722.83 + 126,972.82 = 311,695.65 for Google). The response doesn't say how the median is derived, so verify this on the rows you use before treating the p50 as an independent observation. ## Which fields tell you how much to trust a number? Trust depends on sample size, and the response spreads it across endpoints. The employer rows have no count, the `estimate` has `salaries_count` and a `confidence` label, and the company search has `salary_count` per employer. Pull the count before you quote a range. | Field | Where | Recorded value | Use it for | | --- | --- | --- | --- | | `estimate.salaries_count` | `/v1/glassdoor/salaries` | 727,155 | Size of the national pool for the title | | `estimate.confidence` | `/v1/glassdoor/salaries` | `CONFIDENT` | A label to filter on; we have no documented rule for it | | `total_results` | `/v1/glassdoor/salaries` | 104,377 | Employer rows for the title, not reports | | `salary_count` | `/v1/glassdoor/companies-search` | 4,702 (Stripe), 38 (Stripe OLT) | A company-level count; it sits on the company record, not on a title | The last row is the trap. `salary_count` appears on the company record, with no job title attached, so it looks company-wide: 4,702 at Stripe probably doesn't mean 4,702 software engineer salaries. The field isn't documented, so check it against your own pulls. Stripe OLT, with 38, shouldn't get a published percentile range at all. Look up an `employer_id` with the [companies search endpoint](https://perceptlayer.com/apis/glassdoor/companies-search), then pass it to salaries. Also watch units. Every recorded row says `USD` and `ANNUAL`, but the fields exist because other values can occur. Reject any row whose `currency` or `pay_period` you didn't expect rather than converting it silently. ## What biases does self-reported pay carry? Self-reported pay is skewed by who reports, what they report and when. The response doesn't document the inputs behind any one number, so we can't say how much of it is user-submitted. What the response does give is a count of the salaries behind the national figure ( `salaries_count`), so treat it as a distribution of individual reports, not a payroll census. Treat the list below as a checklist, not a footnote. None of it can be removed from the JSON; you correct for it by comparison. The middle column says whether our two-employer recording shows anything. The rest are general risks of self-reported sources that we haven't measured here. | Bias | Evidence in the recording | What to do | | --- | --- | --- | | Total-pay definitions | Shown: `additional_pay_mean` is 126,972.82 for Google and 56,847.98 for Microsoft, so bonus and stock vary a lot by employer | Compare base and total separately | | Seniority blur | Consistent with it: p90/p10 is 2.07 to 2.38 for one title | Filter by employer and title, check the spread | | Location mixing | Shown: the `estimate` says `United States`, so a city premium is flattened | Don't apply a national range to one city | | Self-selection | General risk; not testable from the JSON | Compare with an employer-reported source | | Rounding and recall | General risk; not testable from the JSON | Use ranges, not exact values | | Employer mix | General risk; the recording has only two employer rows, so it can't show who dominates | Don't read the employer list as the market | | Staleness | General risk; the rows carry no report dates | Re-pull on a schedule and diff the percentiles | | Selective sharing | General risk; nothing in the response says whether reports are verified | Cross-check outliers before using them | The `additional_pay_mean` gap tests the definition problem. The wide p90/p10 ratio fits seniority blur: if one title were one job, you'd expect a narrower range, though the ratio alone doesn't prove it. The table doesn't prove any of the biases for this sample; it tells you where to look. ## What should you compare it with? Compare job-site pay with a survey that employers report to. The US Bureau of Labor Statistics builds its OEWS estimates from employer responses: a sample of about 1.1 million establishments collected over three years ( [BLS, Occupational Employment and Wage Statistics, 2025](https://www.bls.gov/oes/oes_emp.htm)). That is a different method with its own limits, such as a May reference date and a lag, but it doesn't depend on volunteers. The practical rule: use job-site data for the shape and the employer-level detail, and use a survey for the level. If your Glassdoor national p50 for a title sits far from the OEWS median for the closest occupation, suspect definitions first (total versus base pay) and mix second. For official methodology and tables, see the [BLS OEWS program](https://www.bls.gov/oes/). ## Can Indeed fill the gap? Not from the recording we have. The [Indeed jobs endpoint](https://perceptlayer.com/apis/indeed/jobs) takes `query`, `location`, `country`, `job_type` and more, and returns postings. The recorded job objects carry `id`, `title`, `company`, `location`, `description_html`, `attributes`, `date_published` and `apply_url`. None of those is a structured salary field. So treat Indeed as a way to count and describe postings, not to read pay. If a posting states a range, it would be in the text, and you'd have to extract it yourself and handle currency, period and wording. A posted range is also an employer's statement of intent, a different thing from what employees report earning. See [Indeed Jobs API](https://perceptlayer.com/blog/indeed-jobs-api-json) for the fields and [job posting data for labour-market research](https://perceptlayer.com/blog/job-posting-data-labour-market-research) for what postings can show. ## How do you pull and sanity-check ranges in code? Pull the rows, assert the units, compute the spread, and refuse to report ranges without a count. This script runs as written once `API_KEY` is set, and costs 1 credit per call. ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def salary_ranges(job_title, employer_id=None): params = {"job_title": job_title} if employer_id: params["employer_id"] = employer_id r = requests.get(f"{BASE}/v1/glassdoor/salaries", headers=HEADERS, params=params, timeout=30) r.raise_for_status() data = r.json()["data"] est = data.get("estimate") or {} print("estimate:", est.get("location"), est.get("confidence"), est.get("salaries_count")) for row in data["salaries"]: if row["currency"] != "USD" or row["pay_period"] != "ANNUAL": print("skip unexpected units:", row["employer"]["name"]) continue pay = row["total_pay"] print( row["employer"]["name"], round(pay["p10"]), round(pay["p50"]), round(pay["p90"]), "spread", round(pay["p90"] / pay["p10"], 2), ) salary_ranges("software engineer") ``` Add a second call to `/v1/glassdoor/companies-search` for `salary_count` on any employer you intend to publish. A run over 100 job titles, one page each, costs 100 × 1 credit = 100 credits, exactly the 100 free credits you get once on signup. Walking all 10,438 pages for one title would cost 10,438 credits, which is rarely worth it; the first page plus the `estimate` block is usually enough. Authentication is covered in the [authentication docs](https://docs.perceptlayer.com/authentication), and [credits](https://docs.perceptlayer.com/credits) explains billing. For what credits cost, see [pricing](https://perceptlayer.com/pricing). Data is collected from publicly available sources and returned as found at the time of the call. Re-run the same query later and the percentiles can move. To try it on your own job titles, [get a free API key](https://perceptlayer.com/signup) and run the salaries call in the playground on the [Glassdoor API page](https://perceptlayer.com/apis/glassdoor). More jobs data lives under [Jobs APIs](https://perceptlayer.com/verticals/jobs). ## APIs in this post - [Glassdoor **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/glassdoor) - [Indeed **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/indeed) ## Frequently asked questions ### How accurate is salary data from job sites? It is accurate as a description of what was reported, and unverified as a description of what everyone earns. Percentile ranges are more reliable than means. Check the report count, the currency and pay period, and compare the level with an employer-reported survey such as the BLS OEWS before relying on it. ### Does the Glassdoor salaries endpoint return a sample size? Not on the employer rows. The national `estimate` block returns `salaries_count` (727,155 in our recording), and `/v1/glassdoor/companies-search` returns a company-level `salary_count`. The employer row for a title has no count, so don't publish thin ranges without checking the company-level figure. ### Can I get salary data from Indeed? The recorded response from `/v1/indeed/jobs` has no structured salary field. Its fields are the job `id`, `title`, `company`, `location`, `description_html`, `attributes`, `date_published` and `apply_url`. Any pay stated in a posting would have to be extracted from the text yourself, and it reflects what the employer offers. ### How much does it cost to pull salary ranges? Each call to `/v1/glassdoor/salaries` costs 1 credit, and failed calls cost nothing. Looking up 100 job titles at one page each is 100 × 1 credit = 100 credits. Every account gets 100 free credits once, after verifying an email address, with no credit card. salary data glassdoor indeed compensation jobs ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 27 Oct 2026 Perceptlayer 8 min read ## [Jobs API: Indeed, Glassdoor and Google Jobs Compared](https://perceptlayer.com/blog/jobs-api-comparison) Indeed returns postings with apply\_url and coordinates, Glassdoor returns ratings, reviews and pay percentiles, Google Jobs adds date filters. 1 credit a call. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 1 Oct 2026 Perceptlayer 8 min read ## [Job Posting Data for Labour-Market Research](https://perceptlayer.com/blog/job-posting-data-labour-market-research) Which Indeed posting fields support trend analysis, where postings mislead versus hires, and a weekly collection plan that costs 3,000 credits a month. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. --- title: "Trainline API: Train Times and Fares as JSON | Perceptlayer" description: "Trainline's partner API needs a commercial deal. 14 endpoints return stations, journeys and a fares calendar as JSON at 1 credit each, plus a month's fare cost." url: https://perceptlayer.com/blog/trainline-api-train-times-fares --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Trainline API: Train Times and Fares as JSON 20 Sept 2026 Perceptlayer 8 min read Trainline's own API is sold to travel companies through Trainline Partner Solutions, with onboarding by contact and no self-serve sign-up. The Perceptlayer Trainline API is the read-only route: 14 GET endpoints return stations, journeys with times, ticket options and a fares calendar as JSON, each at 1 credit per successful call. The usual chain is `stations` to find the two stations, then `journeys` for a date or `fares-calendar` for a range of dates. ## Key takeaways - Trainline's Global API is a wholesale distribution product for travel sellers, booking tools and travel management companies, onboarded through its partnerships team. - Britain's National Rail Data Portal offers timetable and fares feeds for development, and the Darwin feeds give real-time running; neither returns Trainline's live journey prices. - `GET /v1/trainline/journeys` needs `origin`, `destination` and `date`, and takes `journey_type`, passenger counts, `transport_mode` ( `all`, `train`, `coach`) and `currency` ( `GBP`, `EUR`). - `GET /v1/trainline/fares-calendar` takes `origin`, `destination`, `date_from` and `date_to`, so a month of prices on one route can be one call and 1 credit. - We haven't recorded a Trainline response, so this guide gives the requests, the parameters and the costs, and names what to check in the playground. ## Is there an official Trainline API? Yes, but not for individual developers. Trainline Partner Solutions sells the Trainline Global API to travel sellers, online travel agencies, travel management companies and corporate booking tools; Trainline's own announcements describe partners such as Egencia reaching rail content through it with one connection ( [Trainline Partner Solutions](https://tps.thetrainline.com/), 2026). Access starts with a conversation through its [partnerships page](https://www.thetrainline.com/about-us/partnerships), and it's built for selling tickets, not for reading prices. For British rail, there's also open data. The National Rail Data Portal provides timetable data updated weekly and fares data updated three times a year for development and proof-of-concept work, and the Darwin feeds give real-time train running ( [Rail Delivery Group](https://www.raildeliverygroup.com/our-services/essential-services/real-time-train-journey-information.html), 2026). If you need the published fare tables or live departures, start there: it's the source the industry uses. Regular production feeds of fares data need a licence ( [Rail Delivery Group, RSP data](https://www.raildeliverygroup.com/our-services/rail-data/rsp-data.html), 2026). What neither gives you is the price a traveller sees on Trainline for a given train on a given day, including advance fares, which is what the [Trainline API](https://perceptlayer.com/apis/trainline) returns. Data is collected from publicly available sources and returned as found at the time of the call. | You need | Use | | --- | --- | | To sell rail tickets in your product | Trainline Partner Solutions | | Timetables, published fare tables, live running in Britain | National Rail Data Portal and Darwin | | Journey times and prices as shown on Trainline, as JSON | [`/v1/trainline/journeys`](https://perceptlayer.com/apis/trainline/journeys) and [`/v1/trainline/fares-calendar`](https://perceptlayer.com/apis/trainline/fares-calendar) | ## Which Trainline endpoints are there? Fourteen, in four groups. Stations endpoints resolve names to stations. Journeys endpoints search a route and date and then drill into one search with its `search_id`. Fares endpoints return prices over a date range. Railcard endpoints list cards and their discounts. All are GET and all cost 1 credit on success. | Group | Endpoints | Required parameters | | --- | --- | --- | | Stations | `stations`, `stations-nearby` | `query`; `station_id` | | Journey search | `journeys` | `origin`, `destination`, `date` | | One search, drilled into | `journeys-page`, `journeys-return`, `journeys-ticket-options`, `journeys-price-prediction`, `journeys-local-transport` | `search_id`, plus a journey ID where needed | | One train | `journeys-calling-points` | `timetable_id`, `carrier`, `departure_time`, `origin`, `destination` | | Fares over dates | `fares-calendar`, `fares-calendar-times` | `origin`, `destination`, `date_from`, `date_to` | | No parameters | `fares-best`, `cards`, `cards-discounts` | none | The full list, with each endpoint's page and playground, is on the [Trainline API page](https://perceptlayer.com/apis/trainline). The [travel APIs](https://perceptlayer.com/verticals/travel) cover flights and hotels on the same key. ## How do you find a station? Call `GET /v1/trainline/stations` with `query`, a station or city name of up to 100 characters. `limit` caps the matches and `locale` sets the language of the names. This is the first call of every chain, because `origin` and `destination` on the journey and fare endpoints take a station, not free text. Put your key in the `X-API-Key` header; keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ```bash curl "https://api.perceptlayer.com/v1/trainline/stations?query=Manchester&limit=5" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a stations response, so we can't name the field that holds the identifier to pass on as `origin` or `destination`, or show its format. Run the call in the playground on the Trainline API page first and note it. Station identifiers don't change, so look up the stations you track once and store them. ## How do you search journeys for a date? Call `GET /v1/trainline/journeys` with `origin`, `destination` and `date`. The optional parameters cover a time of day, return trips ( `journey_type` of `single`, `return` or `open_return`, with `return_date` and `return_time`), passengers ( `adults`, `children`, `child_age`), `transport_mode` ( `all`, `train`, `coach`) and `currency` ( `GBP` or `EUR`). ```bash curl "https://api.perceptlayer.com/v1/trainline/journeys?origin=$ORIGIN&destination=$DESTINATION&date=$DATE&journey_type=single&adults=1¤cy=GBP" \ -H "X-API-Key: $API_KEY" ``` The shell variables stand for values you take from the stations call and a date. The date and time formats aren't documented in the endpoint definition, so check them on the [Journeys endpoint page](https://perceptlayer.com/apis/trainline/journeys) before you script it. We haven't run this request for the article. | Parameter | Type | Allowed values or notes | | --- | --- | --- | | `origin`, `destination` | string, required | Stations from the stations endpoint | | `date` | string, required | Outbound date | | `time` | string | Outbound time | | `journey_type` | string | `single`, `return`, `open_return` | | `return_date`, `return_time` | string | For returns | | `adults`, `children` | integer | Passenger counts | | `child_age` | integer | | | `transport_mode` | string | `all`, `train`, `coach` | | `currency` | string | `GBP`, `EUR` | ### How do the follow-up journey endpoints use search\_id? A journey search is a session you drill into. Each follow-up endpoint takes a `search_id` from a journeys response: `journeys-page` moves to the next or previous set of times ( `page` of `next` or `previous`, `direction` of `outward` or `inward`); `journeys-ticket-options` takes an `outward_journey_id`, and optionally an `inward_journey_id`, and returns the tickets for that pairing; `journeys-return` lists return options for an outward journey; and `journeys-price-prediction` takes a `journey_id`. Every follow-up is another call at 1 credit. Fetching ticket options for ten departures on one day is one search plus ten calls, 11 credits. Without a recording we can't say how long a `search_id` stays valid, so run the follow-ups soon after the search and expect a stale ID to fail; failures cost nothing. ## How do you get a month of fares on one route? Use `GET /v1/trainline/fares-calendar` with `origin`, `destination`, `date_from` and `date_to`, plus `currency` if you want `GBP` or `EUR` explicitly. It returns fares across the dates in the range, which is what you want for "when is it cheapest to travel" questions. `fares-calendar-times` takes the same parameters and, by its name, breaks fares down by departure time. ```bash curl "https://api.perceptlayer.com/v1/trainline/fares-calendar?origin=$ORIGIN&destination=$DESTINATION&date_from=$DATE_FROM&date_to=$DATE_TO¤cy=GBP" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a fares-calendar response, so check two things in the [Fares Calendar playground](https://perceptlayer.com/apis/trainline/fares-calendar) before relying on it: whether a 30-day range comes back in one call or is cut short, and whether each day carries one cheapest fare or several. Both decide how many calls a month costs. Two things limit what a fares calendar shows. Prices are as found at the time of the call, and advance fares change as trains fill, so a calendar is a snapshot, not a quote. And railcards and passenger types change the price a traveller pays; the [Cards](https://perceptlayer.com/apis/trainline/cards) and Cards Discounts endpoints list the railcards Trainline offers. ## What does it cost to scan a month of fares? Every Trainline endpoint costs 1 credit per successful call, and failed calls cost nothing and return `X-Credits-Used: 0`. If one `fares-calendar` call covers a month, a month of fares on one route is 1 credit. If the range turns out to be shorter, split it, for example into weeks at about 5 calls a month. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Job | Calls | Credits | | --- | --- | --- | | A month of fares, one route, one call | 1 | 1 | | The same, split into weekly ranges | 5 | 5 | | Daily journey search for 30 days, one route | 30 | 30 | | One day: search plus ticket options for 10 departures | 11 | 11 | | 50 routes, a monthly calendar each, re-checked daily | 1,500 a month | 1,500 | Worked example: tracking 50 routes with one fares-calendar call per route per day is 50 × 30 = 1,500 calls a month, so 1,500 credits, once you've confirmed one call covers your range. The 100 free credits you get once, after verifying an email address, cover the first 2 days of the 50-route job (2 × 50 = 100), enough to test it. A Starter pack of 10,000 credits covers the 50-route job for six months, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Free accounts run at 1 request a second and paid packs at 5 or more, shared by all of an account's keys; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the details. For the same snapshot-versus-quote caution applied to air fares, see [flight price data for fare tracking](https://perceptlayer.com/blog/flight-price-data-fare-tracking). ## Can an AI agent plan rail trips with it? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints` and `get_endpoint`, which are free catalogue lookups, and `call_endpoint`, which runs a Trainline endpoint and spends 1 credit on success. An agent can resolve two station names, search journeys for a date and compare a week of fares, in four or five calls. Tell the agent to quote prices as "seen at the time of the search", not as bookable. Our [AI travel planning agent](https://perceptlayer.com/blog/ai-travel-planning-agent-mcp) tutorial shows the pattern with flights and hotels. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents), and error codes are in the [errors docs](https://docs.perceptlayer.com/errors). To see the real responses, [get a free API key](https://perceptlayer.com/signup) and run a stations search in the playground on the [Trainline API page](https://perceptlayer.com/apis/trainline). ## APIs in this post - [Trainline **1 credit per call** · 15 endpoints](https://perceptlayer.com/apis/trainline) ## Frequently asked questions ### Does Trainline have a public API? Not a self-serve one. Trainline Partner Solutions sells its Global API to travel sellers, booking tools and travel management companies, with onboarding through its partnerships team. For British timetables, published fares and live running, the National Rail Data Portal and Darwin feeds are the open-data route. For journey times and prices as Trainline shows them, the Perceptlayer [Trainline API](https://perceptlayer.com/apis/trainline) returns JSON. ### How much does the Trainline API cost? Each of the 14 Trainline endpoints costs 1 credit per successful call, and failed calls cost nothing. A fares calendar for one route can be a single call. Every account gets 100 free credits after verifying an email address, and prepaid packs start at 10,000 credits. The [pricing page](https://perceptlayer.com/pricing) has what credits cost. ### Can I book tickets through it? No. The endpoints read stations, journeys, ticket options, fares and railcards; none of them books or holds a ticket. Prices are returned as found at the time of the call, and advance fares change as trains fill. To sell tickets in your own product, talk to Trainline Partner Solutions. ### Which currencies are supported? The journey and fare endpoints take an optional `currency` of `GBP` or `EUR`. Set it on every call so prices from different runs compare directly. Railcards change what a traveller pays; the `cards` and `cards-discounts` endpoints list the cards and discounts Trainline offers. ### What happens if a call fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`, and nothing is debited. A missing `origin`, `destination` or `date` returns `invalid_parameters` (422), and a `currency` other than `GBP` or `EUR` does too. Rate-limited (429) and temporarily unavailable (503) responses carry `Retry-After`. The [errors docs](https://docs.perceptlayer.com/errors) list every code. trainline train fares rail data uk rail travel api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 9 min read ## [Reddit Scraper or API: What You Get](https://perceptlayer.com/blog/reddit-scraper-vs-api) A Reddit scraper vs 14 Reddit endpoints at 1 credit a call: a recorded search with score, num\_comments and next\_after, and the cost per subreddit tracked. --- title: "AliExpress Product API: Search, Reviews and Shipping" description: "Chain AliExpress search, product, product-reviews and product-shipping, with every required parameter, at 1 credit per call, and cost a 100-product review pull." url: https://perceptlayer.com/blog/aliexpress-api-product-search-reviews --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # AliExpress Product API: Search, Reviews and Shipping 18 Sept 2026 Perceptlayer 6 min read AliExpress's own Open Platform is built for affiliates, sellers and dropshippers, each with their own app keys and approval. To read AliExpress product data as JSON without that, the Perceptlayer AliExpress API chains four GET endpoints: `search` (required `query`, `page`, `sort`), `product` ( `product_id`), `product-reviews` ( `product_id`, `page`, `page_size`, `filter`) and `product-shipping` ( `product_id`, `country`). Each successful call costs 1 credit. ## Key takeaways - Search has three required parameters, not one: `query`, `page` and `sort`, where `sort` is `default`, `orders`, `price_asc` or `price_desc`. - `product-reviews` requires all four of `product_id`, `page`, `page_size` and `filter`, with `filter` set to `all`, `local`, `image` or `additional`. - Shipping depends on the destination, so `product-shipping` needs a `country` as well as the `product_id`. One call per product per country. - All 9 AliExpress endpoints cost 1 credit per successful call. Reviews for 100 products at 3 pages each is 300 credits, plus 100 for product details. - If you earn affiliate commission on AliExpress links, its own affiliate API is the sanctioned route; this API is for reading product data. ## What does AliExpress's own API cover? AliExpress's Open Platform is organised around who is calling. Its getting-started guide has separate tracks for affiliate developers, sellers' apps and dropshipping developers, and seller apps must be authorised by the seller before they call any API ( [AliExpress Open Platform](https://openservice.aliexpress.com/doc/doc.htm), 2026). The affiliate programme accepts publishers with an online presence and traffic ( [AliExpress Portals](https://portals.aliexpress.com/), 2026). That's the right route if you promote AliExpress products for commission or run a store on it. If you need to read product listings, reviews and shipping options for research, price monitoring or an agent, without joining a programme, the [AliExpress API](https://perceptlayer.com/apis/aliexpress) returns them as JSON with one key. Data is collected from publicly available sources and returned as found at the time of the call. ## Which AliExpress endpoints are there? Nine GET endpoints in three groups: finding products, reading one product, and reading a store. Every one costs 1 credit per successful call. Most parameters are required, so a call missing one fails with `invalid_parameters` (422) and costs nothing. The table lists each endpoint with its required inputs. | Endpoint | Returns | Required | | --- | --- | --- | | `/v1/aliexpress/autocomplete` | Search suggestions | `query` (up to 100 characters) | | [`/v1/aliexpress/search`](https://perceptlayer.com/apis/aliexpress/search) | A page of products | `query`, `page`, `sort` | | [`/v1/aliexpress/product`](https://perceptlayer.com/apis/aliexpress/product) | One product | `product_id` | | `/v1/aliexpress/product-description` | Its description | `description_ref` | | [`/v1/aliexpress/product-reviews`](https://perceptlayer.com/apis/aliexpress/product-reviews) | A page of reviews | `product_id`, `page`, `page_size`, `filter` | | [`/v1/aliexpress/product-shipping`](https://perceptlayer.com/apis/aliexpress/product-shipping) | Shipping options | `product_id`, `country` | | `/v1/aliexpress/store` | A store | `seller_id`, `store_id` | | `/v1/aliexpress/store-benefits` | Store benefits | `seller_id`, `store_id` | | `/v1/aliexpress/store-products` | A store's products | `seller_id`, `store_id` | The chain this guide follows is search, then product, then reviews and shipping. The product description is a separate call because it takes a `description_ref` rather than the product ID; read that reference from the product response. ## How do you search AliExpress products? Call `GET /v1/aliexpress/search` with all three required parameters: the `query`, the `page` number and a `sort`. Add `min_price` and `max_price` to bound the price, `ship_from` to restrict where items ship from, and `filters[]` for the site's own filters. This request asks for the first page of phone cases, sorted by number of orders: ```bash curl "https://api.perceptlayer.com/v1/aliexpress/search?query=phone+case&page=1&sort=orders" \ -H "X-API-Key: $API_KEY" ``` Keys go in the `X-API-Key` header and start with `sk_live_`. [Get a free API key](https://perceptlayer.com/signup), and see the [authentication docs](https://docs.perceptlayer.com/authentication) for the details. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | Up to 200 characters | | `page` | integer | yes | Start at `1` | | `sort` | string | yes | `default`, `orders`, `price_asc` or `price_desc` | | `min_price`, `max_price` | number | no | Price bounds | | `ship_from` | string | no | Where the item ships from | | `filters[]` | list of strings | no | The site's search filters | `autocomplete` is a quick way to find the wording buyers use: send a partial term as `query` and it returns AliExpress's suggestions, which make better search queries than guesses. ### What does a search response contain? Our recorded search for `query=wireless earbuds&page=1&sort=orders` returns `total_results` 16,557 with `page_size` 60, and a `results` array. This is the first result, trimmed with `…`: ```json { "success": true, "data": { "query": "wireless earbuds", "sort": "orders", "page": 1, "page_size": 60, "total_results": 16557, "has_more": true, "results": [ { "product_id": "3256812408115438", "title": "HTC NE79 TWS Bluetooth 6.0 Earbuds AI Translation 135 Languages ENC Noise Cancelling HiFi Stereo Headphones with LED Display", "url": "https://www.aliexpress.com/item/3256812408115438.html", "price": { "amount": 4.35, "currency": "USD", "formatted": "US $4.35" }, "original_price": { "amount": 17.31, "currency": "USD", "formatted": "US $17.31" }, "discount_percent": 74, "rating": 4.9, "sold_count": 17921, "sold_text": "10,000+ sold", "selling_points": ["Fastest delivery in 6 days"], "is_sponsored": false, … }, … ] } } ``` `product_id` is what the product, reviews and shipping endpoints take. `price.amount` is the price shown, and `original_price` with `discount_percent` shows the advertised discount: 4.35 against 17.31 here. `sold_count` is a number while `sold_text` is the rounded label, so use the number for ranking. `is_sponsored` marks paid placement; filter on it before you treat order rank as popularity. ## How do you get a product's reviews? Call `GET /v1/aliexpress/product-reviews` with the `product_id` and the three paging and filter parameters, all required. `page` and `page_size` control the paging, and `filter` picks which reviews: `all`, `local`, `image` (reviews with photos) or `additional`. Nothing is documented about the largest `page_size` the endpoint accepts, so test it in the playground before you pick one. ```bash curl "https://api.perceptlayer.com/v1/aliexpress/product-reviews?product_id=$PRODUCT_ID&page=1&page_size=20&filter=all" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Notes | | --- | --- | --- | | `product_id` | string, required | From the search results | | `page` | integer, required | Start at `1` | | `page_size` | integer, required | Reviews per page | | `filter` | string, required | `all`, `local`, `image` or `additional` | The `image` filter is useful when you want reviews that show the item, for example to check that a product matches its listing photos. Reviews are written by people, so drop reviewer names and anything else that identifies them unless you have a reason and a lawful basis to keep it. This Python loop pulls a fixed number of review pages for a list of products and saves each page as it arrives, so one failure doesn't lose the rest: ```python import json import os import requests BASE = "https://api.perceptlayer.com/v1/aliexpress" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PRODUCT_IDS = ["3256812408115438"] # product_id values from search PAGES = 3 spent = 0 for pid in PRODUCT_IDS: for page in range(1, PAGES + 1): r = requests.get(f"{BASE}/product-reviews", headers=HEADERS, timeout=60, params={"product_id": pid, "page": page, "page_size": 20, "filter": "all"}) if r.status_code != 200: print(pid, page, r.json()["error"]["code"]) break spent += int(r.headers["X-Credits-Used"]) with open(f"reviews-{pid}-{page}.json", "w") as f: json.dump(r.json(), f) print("credits used:", spent) ``` We haven't run this loop live for this article, and the reviews response isn't recorded, so it saves pages as returned. The loop moves to the next product on the first error, and a failed call adds nothing to `spent` because it costs nothing. The [errors docs](https://docs.perceptlayer.com/errors) list the codes you might see. ## How do you check shipping to a country? Call `GET /v1/aliexpress/product-shipping` with the `product_id` and the destination `country`. Shipping options and costs on AliExpress depend on where the buyer is, so a price comparison that ignores shipping compares the wrong numbers. One call returns the options for one product to one country. ```bash curl "https://api.perceptlayer.com/v1/aliexpress/product-shipping?product_id=$PRODUCT_ID&country=US" \ -H "X-API-Key: $API_KEY" ``` The `country` parameter is a string with no documented format beyond that, so confirm the code style the endpoint expects in the playground first. If you sell into several markets, multiply: 50 products checked for 4 countries is 200 calls. ## What does a 100-product review pull cost? Each endpoint is 1 credit per successful call, so the cost is the number of calls. Take 100 products from search results: the search pages to find them, 100 `product` calls, 3 pages of reviews each and one shipping check each to a single country. The recorded search returned `page_size` 60, so 100 products take 2 search pages. | Step | Calls | Credits | | --- | --- | --- | | `search`, 2 pages of 60 | 2 | 2 | | `product` for 100 products | 100 | 100 | | `product-reviews`, 3 pages × 100 products | 300 | 300 | | `product-shipping`, 1 country × 100 products | 100 | 100 | | **Total** | **502** | **502** | That's 502 credits, more than the 100 free credits you get once on signup. Those cover a test pull of 19 products (2 + 19 × 5 = 97 credits); the full 100 needs a pack. Repeat it weekly to track new reviews and it's 502 × 4 = 2,008 credits a month, so the Starter pack's 10,000 covers four months. To cut it, skip `product` for products you already have and fetch only page 1 of reviews on later runs. Failed calls cost nothing; the [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what packs cost. For comparing AliExpress prices with other marketplaces, the [Walmart product search guide](https://perceptlayer.com/blog/walmart-product-search-api) and the [Google Shopping guide](https://perceptlayer.com/blog/google-shopping-api-product-prices) cover two more sources. To try this one, run a search in the playground on the [AliExpress API page](https://perceptlayer.com/apis/aliexpress). ## APIs in this post - [AliExpress **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/aliexpress) ## Frequently asked questions ### How much does the AliExpress API cost? All 9 endpoints cost 1 credit per successful call, and failed calls cost nothing. Reviews for 100 products at 3 pages each, with product details, 2 search pages and a shipping check, come to 502 credits. Every verified account gets 100 free credits once, on signup, enough to test the chain on 19 products, and the [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Do I need an AliExpress affiliate or seller account? No. One Perceptlayer key works for AliExpress and every other API in the catalogue, with no programme to join. If you want to earn commission on links, join the AliExpress affiliate programme and use its API, since this one only reads product data and doesn't generate affiliate links. ### Why does my search call fail with invalid\_parameters? Search requires `query`, `page` and `sort` together, and `sort` must be `default`, `orders`, `price_asc` or `price_desc`. Leaving out `page` or `sort`, or sending another sort value, fails with `invalid_parameters` (422) and a message naming the parameter. The failed call costs nothing. ### Can I get reviews with photos only? Yes. Set `filter=image` on `product-reviews`. The other values are `all`, `local` and `additional`. The filter is required, so every reviews call names one. Paging works the same way for every filter, with `page` and `page_size` both required. ### Are the prices and shipping costs live? They're what AliExpress showed at the time of the call, for the country you asked about in the case of shipping. Prices and shipping change, so store the time of each call with the data. For a price tracker, re-check the products you watch on a schedule rather than relying on an old pull. aliexpress ecommerce product data reviews shipping ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Amazon Product API: Search, Offers and Reviews as JSON](https://perceptlayer.com/blog/amazon-product-api-json) Search Amazon by keyword, then look each asin up with product, offers, rating-summary and customers-say. Domain values per endpoint, 1 credit a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Target API: Product Search and Prices as JSON](https://perceptlayer.com/blog/target-api-product-data) Search Target products as JSON with tcin, price.current, price.regular, is\_on\_sale and rating per result: 1 credit a page of 24, product lookups 1–2 credits. --- title: "How to Add an MCP Server to Claude Desktop and Cursor" description: "Add the Perceptlayer MCP server to Claude Desktop or Cursor with an API key header, run a first Google search, and check only successful calls cost credits." url: https://perceptlayer.com/blog/add-mcp-web-data-tools-claude-desktop --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # How to Add an MCP Server to Claude Desktop and Cursor 18 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read To add a remote MCP server to Claude Desktop, open Customize > Connectors, click Add custom connector and enter the server URL. For Perceptlayer that's `https://perceptlayer.com/mcp`, with your API key sent as an `Authorization: Bearer` request header. If your app doesn't offer request headers yet, add the server to `claude_desktop_config.json` through the `mcp-remote` bridge instead. Cursor takes the same URL and header in `mcp.json`. Then ask a question that needs live data, and read the credits each call reports. ## Key takeaways - The server URL is `https://perceptlayer.com/mcp` (Streamable HTTP), and the key goes in the `Authorization` header as `Bearer sk_live_...`. - In Claude Desktop's custom connector dialog, choose No sign-in and add the key under Request headers, a beta not every account has yet. Claude sends the value exactly as typed, so include `Bearer ` ( [Claude](https://claude.com/docs/connectors/custom/add-unlisted), 2026). - The server has three tools. `search_endpoints` and `get_endpoint` are free; `call_endpoint` costs the endpoint's credits, 1 for `/v1/google-search/search`, and only when the call succeeds. - Each `call_endpoint` result ends with `Credits used` and `Credits remaining`. A failed call returns an error code and debits nothing. - Verifying your email gives 100 free credits, once: enough for 100 one-credit searches. ## What do you need before you start? You need an API key, a client that supports remote MCP servers, and a couple of minutes. [Get a free API key](https://perceptlayer.com/signup); keys start with `sk_live_`, and verifying your email address gives you 100 free credits on signup, with no credit card. For Claude Desktop, you need either the Request headers section in the custom connector dialog or Node.js on your machine for the `mcp-remote` bridge. Cursor needs nothing extra. Keep the key out of shared files. A config file stores it in plain text, so don't commit a project-level `mcp.json` that contains it. The [authentication docs](https://docs.perceptlayer.com/authentication) cover key handling and revocation. ## How do you add the server as a Claude Desktop custom connector? Claude Desktop adds remote MCP servers as custom connectors, and an API key goes in as a request header. On a Free, Pro or Max plan you add it to your own account. On the Free plan you can add one custom connector. On Team and Enterprise plans an Owner adds it for the organization and members connect to it ( [Claude](https://claude.com/docs/connectors/custom/add-unlisted), 2026). Claude's docs mark request header authentication as a beta available to a limited set of organizations. If the section isn't in your dialog, use the config file route in the next section. 1. Open **Customize > Connectors** and click **Add custom connector**. 2. Enter a name, such as `Perceptlayer`, and the server URL `https://perceptlayer.com/mcp`. 3. For authentication, choose **No sign-in**. The server uses an API key, not OAuth. 4. Open **Request headers**, pick `authorization` from the list and enter `Bearer sk_live_...` with your key. Mark it required. 5. Click **Add**. Claude doesn't add a scheme to the header value. If you enter only the key, the server receives `Authorization: sk_live_...` and rejects it. You can't edit the header after saving. To change the key, remove the connector and add it again. These steps follow Claude's documentation; we haven't run them against our server for this article. ## How do you add it through claude\_desktop\_config.json instead? The config file runs local programs, so a remote server needs a small local bridge. The `mcp-remote` package is one: Claude Desktop starts it with `npx`, and it forwards each request to the remote URL with your header. Open the file from **Settings > Developer > Edit Config**, or directly at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS and `%APPDATA%\Claude\claude_desktop_config.json` on Windows ( [mcp-remote](https://github.com/geelen/mcp-remote), 2026). ```json { "mcpServers": { "perceptlayer": { "command": "npx", "args": [ "-y", "mcp-remote", "https://perceptlayer.com/mcp", "--header", "Authorization:${AUTH_HEADER}" ], "env": { "AUTH_HEADER": "Bearer sk_live_..." } } } } ``` Note `Authorization:${AUTH_HEADER}` with no space after the colon. The `mcp-remote` README explains that Claude Desktop on Windows and Cursor don't escape spaces inside `args`, so the value with a space goes in `env`, where spaces are fine. Save the file and restart Claude Desktop, then check that the server's three tools are listed in a new chat. We haven't run this config against `https://perceptlayer.com/mcp` ourselves, so if the tools don't appear, check the `mcp-remote` README for your version's options. ## How do you add it to Cursor? Cursor connects to remote servers directly, so it needs no bridge: the URL and the header go straight into `mcp.json`. Use `~/.cursor/mcp.json` to make the server available in every project, or `.cursor/mcp.json` inside one project to scope it there ( [Cursor](https://cursor.com/docs/mcp), 2026). The same file can hold other servers next to this one. ```json { "mcpServers": { "perceptlayer": { "url": "https://perceptlayer.com/mcp", "headers": { "Authorization": "Bearer sk_live_..." } } } } ``` If you use Claude Code as well, one command registers the same server: ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp \ --header "Authorization: Bearer $API_KEY" ``` We haven't tested this Cursor config against the live server for this article; it follows the [AI agents (MCP) docs](https://docs.perceptlayer.com/ai-agents), which also have the VS Code config, which asks for the key once and stores it. ## What does the first tool call look like? Ask a question the model can't answer from training data, and it goes through search, inspect, call. Try: "Use Perceptlayer to search Google for best restaurants in Berlin and give me the top two results." The model calls `search_endpoints` with a query such as `google search` and gets matches with their IDs, credits per call and required parameters. It may call `get_endpoint` on `google-search.search` to read the parameter list. Both lookups are free. Then it runs the search: ```json { "endpoint": "google-search.search", "params": { "query": "best restaurants in Berlin", "hl": "en", "safe": "off" } } ``` The client usually asks you to approve a tool call. Approve `call_endpoint` once per call until you trust the setup, since it's the tool that spends credits. These are the parameters the model will most often set on `GET /v1/google-search/search`. The [Google Search API page](https://perceptlayer.com/apis/google-search) lists the full set. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | The search terms | | `hl` | string | no | Interface language, 2 characters | | `gl` | string | no | Country, 2 characters | | `location` | string | no | Up to 500 characters | | `device` | string | no | `desktop`, `tablet` or `mobile` | | `safe` | string | no | `active` or `off` | | `page` | integer | no | Results page | The result is the endpoint's JSON. This is our recorded response for that request, trimmed: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "source": "Anders & Kaitlin", … }, { "position": 2, "title": "Restaurants - Berlin", "link": "https://guide.michelin.com/us/en/berlin-region/berlin/restaurants", "source": "MICHELIN Guide", … } ], … } ``` After the JSON, the tool result adds a line such as `Credits used: 1. Credits remaining: …` and a request ID. ## How do you check that only successful calls cost credits? Compare the balance across a good call and a bad one. Credits are debited only when a call succeeds, and every response says what it cost, so you can check this yourself in two requests. Inside the chat, each `call_endpoint` result reports `Credits used` and `Credits remaining`. Outside it, run the same search with cURL and print the response headers: ```bash curl -s -D - -o /dev/null \ "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" | grep -i '^x-credits' ``` A successful call returns `X-Credits-Used: 1` and `X-Credits-Remaining` with the balance after the call. Now send a value the endpoint doesn't accept, such as `safe=maybe` (it allows only `active` or `off`). The call fails with `invalid_parameters` (422) and `X-Credits-Used: 0`, and `X-Credits-Remaining` is unchanged. Through MCP, the same failure comes back as `Error invalid_parameters: …`, and the next successful call's remaining balance shows nothing was taken. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and the [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What goes wrong, and how do you fix it? Most setup failures are a missing or malformed header, because searching and inspecting the catalogue work without a key. A client that lists the three tools but fails on `call_endpoint` almost always has a header problem. The error code in the tool result tells you which, and the table covers the common ones. | Symptom | Cause | Fix | | --- | --- | --- | | `call_endpoint` returns `invalid_api_key` and says no key was sent | The header isn't configured | Add `Authorization: Bearer sk_live_...` to the server config | | `invalid_api_key` with a key configured | The value lacks `Bearer ` , or the key was revoked | Re-enter the value with the scheme, or create a new key | | The header arrives cut off on Windows | A space inside `args` | Use `Authorization:${AUTH_HEADER}` and put the value in `env` | | Tools don't appear after editing the config file | The app hasn't reloaded it | Restart Claude Desktop | | `rate_limited` | More than the account's per-second rate | Wait the `Retry-After` seconds; see the [rate limits docs](https://docs.perceptlayer.com/rate-limits) | | `insufficient_credits` (402) | The balance is used up | Buy a pack on [pricing](https://perceptlayer.com/pricing); nothing is debited meanwhile | To go further, [Claude MCP Web Search](https://perceptlayer.com/blog/claude-agent-live-search-mcp) builds a search agent on the same server. [MCP Server Too Many Tools](https://perceptlayer.com/blog/mcp-too-many-tools-context) explains why the server has three tools rather than one per endpoint. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How much does a question cost through Claude Desktop? Each successful `call_endpoint` costs the endpoint's credits, 1 for a Google search, and the lookups are free. A question that needs one search costs 1 credit, so 200 such questions a month is 200 × 1 = 200 credits. The 100 free credits on signup cover the first 100; a year at that rate is 2,400 credits, inside the Starter pack's 10,000, and purchased credits last 12 months. Failed calls cost nothing. The [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Can I use OAuth instead of an API key? Not with Perceptlayer's server today. It authenticates with an API key in the `Authorization: Bearer` or `X-API-Key` header. In Claude Desktop, choose No sign-in and add the key as a request header if your dialog has the Request headers section (a beta), or use the `mcp-remote` bridge. Each person can use their own key, and all of an account's keys share one balance. ### Does the connector work in the Claude web app too? Custom connectors are added to your Claude account under Customize > Connectors, which the web app also shows. The config file route with `mcp-remote` is desktop only, since it starts a local program. Perceptlayer's server doesn't yet support MCP clients that run inside a web browser. ### Is my API key safe in claude\_desktop\_config.json? The file stores it in plain text on your machine, readable by anything running as your user. Don't sync or share the file, and revoke the key from your dashboard if it leaks. The request header route stores the value in your Claude account and doesn't show it again after saving. ### Which other sources can Claude reach through this server? All of them. The same three tools reach the whole catalogue of 480 websites and 2,782 endpoints. Ask for Zillow listings or Indeed jobs and the model finds the right endpoint with `search_endpoints`. Restricted endpoints, with social, personal or SEO data, need the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) accepted first. mcp claude desktop cursor ai agents web search ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 7 Sept 2026 Perceptlayer 8 min read ## [OpenAI Agents SDK with a Remote MCP Server for Web Data](https://perceptlayer.com/blog/openai-agents-sdk-mcp-server) Connect the OpenAI Agents SDK to a Streamable HTTP MCP server with a Bearer header, cap call\_endpoint at 3 calls a question, and count credits per run. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 28 Oct 2026 Perceptlayer 7 min read ## [Web Search API for AI Agents: Four Engines Compared](https://perceptlayer.com/blog/web-search-api-for-ai-agents) Google, Brave, Bing and DuckDuckGo search endpoints compared by their recorded JSON, with one Python normaliser for agents. 1 credit per search. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. --- title: "SpareRoom API: UK Room and Flatshare Listings as JSON" description: "SpareRoom has no public API. GET /v1/spareroom/search returns 100 room listings a page with rent, deposit and availability, at 1 credit per call." url: https://perceptlayer.com/blog/spareroom-api-room-listings --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # SpareRoom API: UK Room and Flatshare Listings as JSON 18 Sept 2026 Perceptlayer 8 min read SpareRoom doesn't publish a developer API for reading its listings. The Perceptlayer SpareRoom API fills that gap with four GET endpoints: search, a single listing, location lookup and city areas. `GET /v1/spareroom/search?where=London` returns 100 room and flatshare listings a page, with rent, deposit, availability, postcode and coordinates, at 1 credit per successful call. ## Key takeaways - SpareRoom has no public developer API; its terms describe a Managed Service for high-volume advertisers, which is about posting rooms, not reading them. - `GET /v1/spareroom/search` needs only `where` and takes 36 optional parameters, including `min_rent`, `max_rent`, `rent_period`, `room_types` and `bills_included`. - The recorded London search returns 100 results a page, reaches 1,000 rows over 10 pages, and reports a pool of 12,891 listings with `truncated: true`. - Each `rent` object carries a `period` of `pcm` or `pw`, so convert weekly rents before you compare them. - One full 10-page sweep costs 10 credits; slicing London into 13 sweeps costs 130 credits a week, about 563 a month. The 100 free credits on signup cover 10 sweeps, and a year of weekly sweeps fits in the Starter pack. ## Does SpareRoom have a public API? No. Searches for a SpareRoom developer portal turn up scraper projects and job ads for its own app platform, not documentation for outside developers. SpareRoom's UK terms describe a Managed Service in which SpareRoom uploads and updates listings for high-volume advertisers such as agents and co-living operators, and they prohibit unauthorised integrations and software that harvests information from the platform ( [SpareRoom terms](https://m.spareroom.co.uk/content/default/terms-uk), 2026). That's the advertiser side. If you're a landlord or agent publishing rooms, talk to SpareRoom about the Managed Service. If you need to read UK room listings as JSON for research, pricing or a search tool, the [SpareRoom API](https://perceptlayer.com/apis/spareroom) covers it with the same key as the rest of the [real estate APIs](https://perceptlayer.com/verticals/real-estate). Read SpareRoom's terms and decide for yourself that your use of the data fits them. Data is collected from publicly available sources and returned as found at the time of the call. ## Which SpareRoom endpoints are there? There are four endpoints, all GET requests, all 1 credit on success and all returning JSON. Search is the one you'll use most. The listing endpoint fetches one advert by `id`, locations resolves a typed place name, and areas lists the areas inside a city. The table gives each one's required parameter. | Endpoint | Returns | Required | Optional | Credits | | --- | --- | --- | --- | --- | | [`/v1/spareroom/search`](https://perceptlayer.com/apis/spareroom/search) | Room and flatshare listings | `where` | 36 parameters | 1 | | [`/v1/spareroom/listing`](https://perceptlayer.com/apis/spareroom/listing) | One listing | `id` | `ad_type` ( `offered`, `wanted`) | 1 | | [`/v1/spareroom/locations`](https://perceptlayer.com/apis/spareroom/locations) | Location matches | `q` (up to 60 characters) | none | 1 | | [`/v1/spareroom/areas`](https://perceptlayer.com/apis/spareroom/areas) | Areas in a city | `city` | none | 1 | Only the search endpoint has a recorded response in this article. For the other three, the endpoint pages and the playground show the real output. ## How do you search SpareRoom listings? Call `GET /v1/spareroom/search` with `where`, a free-text place of up to 100 characters. That's the only required parameter. The request below is the exact one behind the recorded response in the next section. Send your key in the `X-API-Key` header; [the authentication docs](https://docs.perceptlayer.com/authentication) cover keys, which start with `sk_live_`. ```bash curl "https://api.perceptlayer.com/v1/spareroom/search?where=London" \ -H "X-API-Key: $API_KEY" ``` ### Which parameters does the search endpoint take? Search takes `where` plus 36 optional parameters. Eleven are flags that take only `Y`. The types and allowed values below come from the endpoint definition. Nothing else, such as defaults, is documented, so don't rely on any. | Parameter | Type | Allowed values or notes | | --- | --- | --- | | `where` | string, required | Up to 100 characters | | `page` | integer | | | `sort` | string | `relevance`, `newest`, `last_updated`, `price_low_to_high`, `price_high_to_low` | | `min_rent`, `max_rent` | integer | Rent bounds | | `rent_period` | string | `pcm`, `pw` | | `bills_included` | string | `true`, `false`, `1`, `0` | | `available_from` | string | | | `room_types` | string | `double`, `single` | | `ensuite`, `parking`, `pets_req`, `no_deposit`, `verified_users`, `photoadsonly` | string | `Y` | | `furnished`, `smoking` | string | `Y`, `N` | | `rooms_for` | string | `males`, `females`, `couples` | | `genderfilter` | string | `males`, `females`, `mixed` | | `posted_by` | string | `private_landlords`, `flatmates`, `agents`, `co_live` | | `landlord` | string | `live_in`, `live_out` | | `days_of_wk_available` | string | `Mon to Fri only`, `7 days a week` | | `min_term`, `max_term` | integer | Tenancy length bounds | | `min_beds`, `max_beds`, `no_of_rooms` | integer | Property size | The rest ( `types`, `share_type`, `gayshare`, `vegetarians`, `disabled_access`, `living_room`, `short_lets_considered`, `free_to_contact`, `min_age_req`, `max_age_req`) are on the [Search endpoint page](https://perceptlayer.com/apis/spareroom/search). For example, `where=Manchester&room_types=double&max_rent=700&rent_period=pcm&bills_included=true` asks for double rooms in Manchester at up to 700 a month with bills included. We haven't run that filtered request for this article. ### What does a search response look like? The recorded London response has a `data` object with paging fields, a `location` block, `filter_options` counts and a `results` array, plus a `meta` object. Here is an excerpt of the first listing, trimmed with `…` and with the advertiser's name and photo links removed: ```json { "success": true, "data": { "where": "London", "page": 1, "page_size": 100, "page_count": 10, "has_next_page": true, "result_count": 100, "total_pool": 12891, "rows_reachable": 1000, "truncated": true, "total_rooms_available": 16127, "results": [ { "id": 18472716, "url": "https://www.spareroom.co.uk/18472716", "title": "1-Bed penthouse flat near Canary Wharf", "ad_type": "offered", "accommodation_type": "1 bed flat or studio", "property_type": "Flat", "status": "Available", "rooms_in_property": 1, "rooms_for_rent": 1, "rent": { "min": 2500, "period": "pcm", "rent_options": "whole", "currency": "GBP" }, "rooms": [ { "type": "double", "price": 2500, "period": "pcm", "status": "available", "furnishings": "unfurnished" } ], "security_deposit": 2500, "availability": { "from": "2026-11-23", "days_per_week": "7 days a week" }, "couples_allowed": true, "location": { "postcode": "E14", "neighbourhood": "Westferry", "latitude": 51.513191, "longitude": -0.0292769 }, "advertiser": { "type_code": "live_out_landlord", "verified": true, … }, "expires_at": "2026-11-20T20:45:36Z" }, … ] }, "meta": { "endpoint_family": "spareroom.search", "billable": true, "duration_ms": 642 } } ``` The fields most analyses need are `rent.min` with `rent.period`, `rooms[].price`, `security_deposit`, `availability.from`, `location.postcode` and the coordinates. The second listing in the same response is a double room in a three-room flat at 950 a month with `bills_included: "yes"`, so the room-level fields matter: `rent_options` is `whole` for a whole flat and `room` for a single room. ## Why does a London search stop at 1,000 rows? One search reaches 1,000 rows at most. The recorded London response says so in its own fields: `page_size` 100, `page_count` 10, `rows_reachable` 1000 and `truncated: true`, against a `total_pool` of 12,891 listings. Paging past page 10 won't get you the rest; narrower searches will. The response also tells you how to slice. Its `filter_options` array counts listings per filter, and the London price group shows 4,906 listings up to £900 a month and 5,965 from £901 to £1,300. Both are still above 1,000, so a price band alone isn't enough. Combine bands from `min_rent` and `max_rent` with a narrower `where`, such as a neighbourhood, or with `room_types`, until each slice's pool fits in 1,000 rows. The response's `location.areas` list and the [Areas endpoint](https://perceptlayer.com/apis/spareroom/areas) give you area names to work from. Here is a page loop in Python that reads the recorded response's paging fields and warns when a slice is truncated. It follows the recorded response shape; we haven't run it against the live API for this article. ```python import os import requests URL = "https://api.perceptlayer.com/v1/spareroom/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def sweep(params): rows, page = [], 1 while True: r = requests.get(URL, headers=HEADERS, params={**params, "page": page}, timeout=60) r.raise_for_status() data = r.json()["data"] rows.extend(data["results"]) if not data["has_next_page"]: break page += 1 if data.get("truncated"): print(f"{params}: pool {data['total_pool']}, reached {data['rows_reachable']}; slice further") return rows rooms = sweep({"where": "London", "min_rent": 0, "max_rent": 700, "rent_period": "pcm"}) ``` Slices overlap at the edges, so deduplicate on `id` before you count anything. For retries and rate limits around a loop like this, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## How do you compare weekly and monthly rents? Convert everything to one period before comparing. Each listing's `rent` object and each entry in `rooms` carries a `period` of `pcm` or `pw`, and UK flatshare ads use both. A weekly rent is converted to monthly by multiplying by 52 and dividing by 12, so £200 a week is about £867 a month. ```python def monthly(price, period): return round(price * 52 / 12) if period == "pw" else price for room in rooms: for r in room.get("rooms", []): r["price_pcm"] = monthly(r["price"], r["period"]) ``` Keep the original value and period next to the converted one, so you can audit the figure later. Use room-level prices for room rents; the listing-level `rent.min` is labelled a minimum, so treat it as the lowest price in the advert, not an average. For which rental fields to keep and why, read [rental listing data for market analysis](https://perceptlayer.com/blog/rental-listing-data-market-analysis). How do your figures compare with SpareRoom's own? Its quarterly rental index put the UK average room rent at a record £769 a month in Q3 2026 ( [SpareRoom UK quarterly rental index Q3 2026](https://www.spareroom.co.uk/statistics/uk-quarterly-rental-index-q3-2026), 2026). That's a published benchmark to sanity-check a sample against, not a substitute for it: an index is an average over all ads in a period, while a sweep is a snapshot of what's live today. ## What does a weekly sweep of one city cost? Every SpareRoom endpoint costs 1 credit per successful call, and a full search sweep is at most 10 pages, so 10 credits. Failed calls cost nothing and return `X-Credits-Used: 0`. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a script can track spend as it goes. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. Worked example for London: the recorded pool is 12,891 listings and each sweep reaches 1,000, so you need at least 13 slices. 13 slices × 10 pages × 1 credit = 130 credits a week. Over a month, 130 × 52 ÷ 12 ≈ 563 credits. The 100 free credits you get on signup after verifying an email address cover the first 10 sweeps, short of one week's 13, so the rest needs a pack. Slices rarely split perfectly, so budget a few extra sweeps. Fetching full detail with the listing endpoint adds 1 credit per advert. | Job | Calls | Credits | | --- | --- | --- | | One full search sweep | 10 | 10 | | London, 13 slices, once | 130 | 130 | | London, 13 slices, weekly for a year | 6,760 | 6,760 | | 500 listings in full detail | 500 | 500 | A year of weekly London sweeps, 6,760 credits, fits in a Starter pack of 10,000 credits. Purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Free accounts run at 1 request a second, so a 130-call sweep takes a little over two minutes; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the paid rates. ## Can an AI agent call the SpareRoom API? Yes. The Perceptlayer MCP server at `https://perceptlayer.com/mcp` exposes three tools: `search_endpoints` and `get_endpoint` look up the catalogue for free, and `call_endpoint` runs an endpoint with its parameters and spends credits only on success. An agent can find the SpareRoom search endpoint, read its filters and call it with a user's area and budget. That suits a flat-hunting assistant that turns "a double room near Stoke Newington under £1,000 with bills" into `where`, `room_types`, `max_rent` and `bills_included`. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents). Errors come back with an HTTP status and a JSON `code`, listed in the [errors docs](https://docs.perceptlayer.com/errors). To try it now, [get a free API key](https://perceptlayer.com/signup) and run a search for your city in the playground on the [SpareRoom API page](https://perceptlayer.com/apis/spareroom). ## APIs in this post - [SpareRoom **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/spareroom) ## Frequently asked questions ### Is there an official SpareRoom API? No public one for reading listings. SpareRoom's terms describe a Managed Service that posts and updates rooms for large advertisers, and they prohibit unauthorised integrations and harvesting software. The Perceptlayer [SpareRoom API](https://perceptlayer.com/apis/spareroom) returns search results, single listings, locations and areas as JSON, collected from publicly available sources. Check SpareRoom's terms against your own use. ### How much does the SpareRoom API cost? Each of the four SpareRoom endpoints costs 1 credit per successful call, and failed calls cost nothing. A full 10-page search sweep is 10 credits. Every account gets 100 free credits after verifying an email address, and prepaid packs start at 10,000 credits. The [pricing page](https://perceptlayer.com/pricing) has what credits cost. ### How many listings does one SpareRoom search return? Up to 1,000. The recorded London search returns 100 results a page over 10 pages, with `rows_reachable` 1000 and `truncated: true` against a pool of 12,891. To cover a whole city, split it into narrower searches by area, rent band or room type, then deduplicate on the listing `id`. ### Are SpareRoom rents monthly or weekly? Both appear. Each `rent` object and each room carries a `period` of `pcm` (per calendar month) or `pw` (per week), and the search accepts `rent_period` with the same two values. Convert weekly rents to monthly by multiplying by 52 and dividing by 12 before you compare or average them. ### What happens when a SpareRoom call fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`, and no credits are debited. A missing `where` returns `invalid_parameters` (422). Rate-limited (429) and temporarily unavailable (503) responses include a `Retry-After` header. The [errors docs](https://docs.perceptlayer.com/errors) list every code. spareroom uk rentals flatshare room listings real estate ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 9 min read ## [Redfin Scraper or API: What You Get](https://perceptlayer.com/blog/redfin-scraper-vs-api) A Redfin scraper vs 14 Redfin endpoints at 1 credit each: recorded Seattle locations, search, property and valuation calls, and the cost per home tracked. --- title: "Google Places API Alternative: Place Data Priced per Call" description: "Places API Text Search Pro lists at $32 per 1,000 requests. Per-call place data costs 1 credit a call. Costs in credits, fields and when Google fits better." url: https://perceptlayer.com/blog/google-maps-places-api-alternative --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Places API Alternative: Place Data Priced per Call 16 Sept 2026 Updated 24 Oct 2026 Perceptlayer 8 min read If you need place data as JSON (name, address, phone, rating, review count, coordinates) and don't need to draw it on a Google map, per-call place data is an alternative to the Places API with a simpler billing model. Perceptlayer's Google Maps API returns those fields for a flat 1 credit per call, so 1,000 calls cost 1,000 credits, where Google bills per SKU. [Pricing](https://perceptlayer.com/pricing) shows what credits cost, so you can compare against your own volume. If your app shows results on a Google map or must stay inside Google's terms, the official API is the better fit. ## Key takeaways - Google's Places API (New) bills Text Search Pro at $32.00 and Place Details Pro at $17.00 for each block of 1,000 requests, after a free monthly cap per SKU, per [Google's pricing page](https://developers.google.com/maps/billing-and-pricing/pricing) as of October 2026. - Perceptlayer's `GET /v1/google-maps/simple-search` costs 1 credit per successful call, so 1,000 calls cost 1,000 credits on any pack. Failed calls cost nothing. The difference is the billing model, a flat credit per call against per-SKU rates; [pricing](https://perceptlayer.com/pricing) shows what credits cost. - A search item carries `name`, `rating`, `review_count`, `full_address`, `phone_numbers`, `latitude`, `longitude`, `business_id` and `place_id`. - Google requires Places results shown on a map to appear on a Google map. If that's your product, use the official API. - Check prices on Google's page before you decide. The SKU you pay for depends on what you request, and the figures here are the ones listed in October 2026. ## What does the Places API cost, and what is the alternative? Google's [Places API (New) pricing](https://developers.google.com/maps/billing-and-pricing/pricing) charges per SKU, per 1,000 requests, with a monthly free cap on each. As of October 2026, Text Search Pro is $32.00 and Text Search Enterprise is $35.00 per 1,000 for the first tier. Place Details runs $5.00 (Essentials), $17.00 (Pro) and $20.00 (Enterprise). The alternative is a flat cost per call: one credit, whatever fields come back. That difference in billing model matters more than the headline rate. With Google, you choose the data you want and the request lands in a SKU. With per-call data, you call `simple-search` or `business-details` and pay the credits shown on the endpoint, which is 1 for every Google Maps endpoint in our catalogue. Perceptlayer collects its data from publicly available sources and returns it as found at the time of the call. Keep that in mind when you read the table below. ## How do the costs compare per 1,000 lookups? Per 1,000 lookups past the free tier, the official API ranges from $5.00 to $35.00 for the first pricing tier. Per-call place data is 1,000 credits for the same count. The two bill in different units, dollars per SKU against credits per call, so this table sets out each side's own rate and doesn't convert one into the other. [Pricing](https://perceptlayer.com/pricing) lists what credits cost. | Option | Unit | Cost per 1,000 | | --- | --- | --- | | Places API Text Search Pro | request | $32.00 | | Places API Text Search Enterprise | request | $35.00 | | Places API Place Details Essentials | request | $5.00 | | Places API Place Details Pro | request | $17.00 | | Places API Place Details Enterprise | request | $20.00 | | Perceptlayer, any pack | 1 credit per call | 1,000 credits | Free allowances are separate: | Option | Free allowance | | --- | --- | | Places API Text Search Pro | 5,000 events a month | | Places API Text Search Enterprise | 1,000 events a month | | Places API Place Details Essentials | 10,000 events a month | | Places API Place Details Pro | 5,000 events a month | | Places API Place Details Enterprise | 1,000 events a month | | Perceptlayer | 100 free credits, once, after you verify an email address | Google figures are the first pricing tier from [Google's pricing page](https://developers.google.com/maps/billing-and-pricing/pricing), read in October 2026. Credits come in packs of 10,000 (Starter), 50,000 (Build), 200,000 (Growth), 500,000 (Pro), 1,000,000 (Scale) and 5,000,000 (Volume), and every pack uses the same 1 credit per call here. What credits cost is on [the pricing page](https://perceptlayer.com/pricing). Purchased credits last 12 months, with no subscription. Starter through Pro include 5 requests a second, Scale 10 and Volume 20; see [rate limits](https://docs.perceptlayer.com/rate-limits). ### A worked example: 10,000 lookups a month At Google's Text Search Pro rate, 10,000 requests minus the 5,000 free leaves 5,000 billable: 5,000 × $32.00 / 1,000 = $160.00. For Place Details Pro, the same arithmetic gives 5,000 × $17.00 / 1,000 = $85.00. On Perceptlayer, 10,000 calls × 1 credit = 10,000 credits; see [pricing](https://perceptlayer.com/pricing) for what credits cost. That equals the Starter pack's size. The 100 free credits you get on signup cover the first 100 calls, once; they don't renew each month. Bigger jobs use the same 1 credit per call; [pricing](https://perceptlayer.com/pricing) shows what each pack costs. 500,000 calls × 1 credit = 500,000 credits, which is the Pro pack's size. Google's $32.00 rate applies to the first 100,000 events a month, and its page lists lower rates for higher tiers, so price large volumes there directly. ## What does a per-call place record look like? One call to `GET /v1/google-maps/simple-search` returns a list of places with name, rating, address, coordinates and identifiers. Here's the request for restaurants in New York, then an excerpt of the recorded response. ```bash curl "https://api.perceptlayer.com/v1/google-maps/simple-search?query=restaurants+in+new+york" \ -H "X-API-Key: $API_KEY" ``` ```json { "items": [ { "name": "Altair Restaurant NYC", "review_count": 1225, "rating": 4.8, "website": "https://www.altairnyc.com/", "domain": "altairnyc.com", "latitude": 40.7556565, "longitude": -73.9936282, "business_id": "0x89c2591598891521:0x4ebcde18610e64", "subtypes": [ "New American restaurant", "Restaurant" ], "full_address": "351 W 38th St, New York, NY 10018, United States", "timezone": "America/New_York", "phone_numbers": [ "+1 929-561-6131" ], "place_id": "ChIJIRWJmBVZwokRZA5hGN68TgA=", … "city": "New York", "zip_code": "10018", "state": "New York", "country_code": "US", … }, … ], "pagination": { "current_page": 0, "total_results": 173, "has_more": false } } ``` The record also holds `subtypes`, `photos_sample` and an `attributes` object (the sample shows wheelchair accessibility). You can narrow the response with the `fields` parameter and set the language and region with `hl` and `gl`. The endpoint pages list the rest: [Business Details](https://perceptlayer.com/apis/google-maps/business-details), [Photos](https://perceptlayer.com/apis/google-maps/photos) and [Autocomplete](https://perceptlayer.com/apis/google-maps/autocomplete). ### Which Places fields are missing from the simple-search response? The recorded `simple-search` response has no opening hours, price level or business status. If your app reads those from Places, check them before you migrate. The table compares fields people commonly read from Places with the recorded response above; Places field names are Google's. | Places field | In the recorded simple-search response? | | --- | --- | | `displayName` | Yes, as `name` | | `formattedAddress` | Yes, as `full_address` | | `nationalPhoneNumber` | Yes, as `phone_numbers` (a list) | | `rating` | Yes, as `rating` | | `userRatingCount` | Yes, as `review_count` | | `location` | Yes, as `latitude` and `longitude` | | `websiteUri` | Yes, as `website` (and `domain`) | | `id` | Yes, as `place_id` (and `business_id`) | | `types` | Yes, as `subtypes` | | `photos` | Partly: `photos_sample` holds a sample of photos | | `accessibilityOptions` | Yes, under `attributes.accessibility` | | `regularOpeningHours` | Not in the recorded response | | `priceLevel` | Not in the recorded response | | `businessStatus` | Not in the recorded response | | `editorialSummary` | Not in the recorded response | | `reviews` | Not in the recorded response; see the `reviews` endpoint below | "Not in the recorded response" means the fields were absent from that one recording, not that no endpoint carries them. Run `business-details` for a place you know and check, since this post doesn't show its response. The recording also holds fields Places doesn't name the same way, such as `owner_name`, `order_link`, `timezone`, `district` and `google_mid`. ### Which endpoints replace which Places calls? The mapping is by job, not by name, and it's not one-to-one. Use this as a starting point. | Job | Places API | Perceptlayer endpoint | | --- | --- | --- | | Search by text query | Text Search | `GET /v1/google-maps/simple-search` ( `query`) | | Search with map position | Text Search with a location bias | `GET /v1/google-maps/advanced-search` ( `query`, `zoom`, optional `lat`, `lon`) | | Fetch one place | Place Details | `GET /v1/google-maps/business-details` ( `business_id`) | | Suggest as the user types | Autocomplete | `GET /v1/google-maps/autocomplete` ( `query`) | | Reviews | Reviews on Place Details | `GET /v1/google-maps/reviews` ( `business_id`) | | Photos | Place Photos | `GET /v1/google-maps/photos` ( `business_id`) | Note the identifier: the Perceptlayer endpoints that take a place use `business_id`, which the search response returns alongside `place_id`. ## Can I get reviews the same way? Yes. `GET /v1/google-maps/reviews` takes a `business_id` and returns reviews as JSON, one credit per call. Parameters include `sort`, `search`, `limit`, `page` and `pages`. This is a different shape from Google's place details, where reviews arrive as part of the place record. ```bash curl "https://api.perceptlayer.com/v1/google-maps/reviews?business_id=0x60188b88b7d8f7ab%3A0x2133080e9923eaac" \ -H "X-API-Key: $API_KEY" ``` An excerpt of the recorded response, with the reviewer fields left out: ```json { "items": [ { "review_source": "Google", "rating": 5, "timestamp": 1779471094452, "author_review_count": 262, "review_text": [ "A must do! Easy access via Yamanote line > Shibuya > exit Hachiko exit and walk to the 41 or 42 bus (suica card OK) then four stops to Sugekari Elem Sch > once …" ], "review_language": [ "en" ], "is_google_review": true, … }, … ], "nextPage": "CjEIARIpCgoAP7_LADY2____EhBrFsVuDgXaYeq0lg4AAAAAGgn92PQCY8g0lvwYACIA" } ``` Pass the `nextPage` value back as `page` to fetch the next batch. For every parameter and the cost of paging through a large review set, see [Google Maps Reviews API: Parameters, Requests and Cost](https://perceptlayer.com/blog/google-maps-reviews-api-parameters). ## When does the official Places API fit better? Use the official API when your product draws results on a Google map, when your legal team needs Google's terms rather than a third party's, or when you only need a small number of lookups inside the free caps. Google's [Places API policies](https://developers.google.com/maps/documentation/places/web-service/policies) state that results displayed on a map must be shown on a Google Map with proper attribution. The same page restricts pre-fetching, caching and storing Places content beyond its exceptions, and says place IDs can be stored indefinitely. If you need a dataset you keep and process in your own database, read those rules against your plan. Here is a plain verdict per use case: | Use case | Better fit | Why | | --- | --- | --- | | Store locator drawn on a Google map | Places API | Map display and attribution rules apply | | Autocomplete in a checkout address field | Places API | Built for interactive use, covered by Google's terms | | Under 1,000 to 10,000 lookups a month | Places API | The free caps may cover you, depending on the SKU | | Lead lists and market research on thousands of places | Per-call data | Flat 1 credit per call, no per-field SKUs | | Review monitoring across many locations | Per-call data | `reviews` returns review items directly, with `sort` and paging | | Feeding an AI agent place data as tool output | Per-call data | Same key over [MCP](https://docs.perceptlayer.com/ai-agents), nothing to configure per field; see [MCP vs function calling](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) | | Enriching a CRM with phone, website and category | Per-call data | `phone_numbers`, `website` and `subtypes` are in the search record | Data from publicly available sources is returned as found at the time of the call. If you need guaranteed freshness, that points to the official API as well. ## How do I try it? Get a free key on [sign-up](https://perceptlayer.com/signup): 100 free credits after you verify an email address, no credit card. Send the key in the `X-API-Key` header, run the `simple-search` call above, or open the [Google Maps API page](https://perceptlayer.com/apis/google-maps) and run it in the playground. Authentication details are in the [docs](https://docs.perceptlayer.com/authentication). A few operational facts help when you size a job. A successful response carries `X-Credits-Used` and `X-Credits-Remaining`. Failed calls cost nothing and return `X-Credits-Used: 0`. A 429 or 503 carries a `Retry-After` header. There's no idempotency key, so a request whose reply was lost may have succeeded and been billed. The [credits](https://docs.perceptlayer.com/credits) and [errors](https://docs.perceptlayer.com/errors) sections cover each case. For the wider Google Maps picture, see [Google Maps Business Data API: Search Places as JSON](https://perceptlayer.com/blog/google-maps-business-data-api). Next step: run one `simple-search` call for your own city and compare the fields to what your app needs. ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### How much does the Google Places API cost per 1,000 requests? It depends on the SKU. As of October 2026, [Google's pricing page](https://developers.google.com/maps/billing-and-pricing/pricing) lists the first tier at $32.00 for Text Search Pro, $35.00 for Text Search Enterprise, $5.00 for Place Details Essentials, $17.00 for Pro and $20.00 for Enterprise, each with a monthly free cap. ### How much does per-call place data cost? Each successful call to a Google Maps endpoint costs 1 credit. That is 1,000 credits per 1,000 calls, so 20,000 calls × 1 credit = 20,000 credits. Packs run from 10,000 credits (Starter) to 5,000,000 (Volume), and [pricing](https://perceptlayer.com/pricing) lists what each costs. Failed calls cost nothing, and you also get 100 free credits on signup. ### Can I show these results on a Google map? Google's [Places API policies](https://developers.google.com/maps/documentation/places/web-service/policies) require results from the Places API to appear on a Google Map. Per-call data is a separate source with different terms, so don't assume that rule transfers. If your product is a Google map, use the official API. ### Does the per-call API return the same fields as Places? Not field for field. A search record includes `name`, `rating`, `review_count`, `full_address`, `phone_numbers`, `website`, `latitude`, `longitude`, `business_id` and `place_id`. The recorded response has no opening hours, price level or business status; the field table above lists each gap. Compare it with the fields your app reads before you migrate. ### What happens when I run out of credits? The service is prepaid, so calls return `insufficient_credits` (402) and nothing more is debited. There is no automatic top-up. Purchased credits last 12 months, so a bought pack doesn't expire before you can use it. google maps places api pricing place data local business data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Google Maps Scraper or Places Data API: What You Get](https://perceptlayer.com/blog/google-maps-scraper-vs-api) Compare building a Google Maps scraper with the official Places API and place endpoints at 1 credit a call: fields, upkeep, terms and a verdict per use case. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 9 min read ## [Google Reviews Scraper or API: What You Get](https://perceptlayer.com/blog/google-reviews-scraper-vs-api) A Google reviews scraper versus the reviews endpoint: rating, timestamp, review\_text and a nextPage token per call, at 1 credit per business checked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Sept 2026 Updated 31 Oct 2026 Perceptlayer 7 min read ## [Google Maps Directions API Alternative: Routes as JSON](https://perceptlayer.com/blog/google-maps-directions-api-alternative) One GET to /v1/google-maps/directions returns a route as JSON for 1 credit. Parameters, a 15,000-route cost example and Google's per-request rates. --- title: "Save API JSON to Parquet in Python | Perceptlayer" description: "Write API JSON to date-partitioned Parquet with pyarrow and a fixed schema, so a price that arrives as 441 one day and 393.73 the next doesn't break it." url: https://perceptlayer.com/blog/save-api-json-to-parquet-python --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Save API JSON to Parquet in Python 16 Sept 2026 Updated 24 Oct 2026 Perceptlayer 7 min read To save JSON to Parquet in Python, flatten each record into a dict, build a `pyarrow` table with an explicit schema, and write it with `pyarrow.parquet.write_to_dataset`, partitioned by date. The explicit schema is the part most examples skip, and it's the part that breaks first: in the recorded Google Shopping response used here, `extracted_price` is `441` for one product and `393.73` for another, which type inference reads as two different types. ## Key takeaways - Fix the schema in code with `pa.schema(...)` and pass it to `pa.Table.from_pylist`; inferred types change with the data, and `pa.concat_tables` fails when they do. - In the recorded response, `extracted_price` is an integer ( `441`) for one result and a float ( `393.73`) for another; cast it to `float64` every time. - `write_to_dataset(..., partition_cols=["date"])` writes `date=YYYY-MM-DD/` folders, so a reader can load one day without scanning the rest. - Measured on the 3-row recorded sample, Parquet was 4,910 bytes against 896 for gzip JSON, because 3,019 bytes were the file footer; batch a whole day into one file. - Each `/v1/google-shopping/search` call costs 1 credit; 100 queries a day is 3,000 credits a month, and the Parquet step adds nothing. ## What do you need? Python 3.10 or later and `pyarrow`. The code here ran on pyarrow 26.0.0, installed with `pip install pyarrow requests`. You also need API responses to store. This tutorial uses `GET /v1/google-shopping/search`, which returns Google Shopping results with a title, a shop, a price as text and as a number, a rating and a review count. ```bash curl "https://api.perceptlayer.com/v1/google-shopping/search?q=iphone+15&gl=us&hl=en" \ -H "X-API-Key: $API_KEY" ``` That's the exact request behind the recorded response the code was tested on. [Get a free API key](https://perceptlayer.com/signup) for your own calls; keys start with `sk_live_` and go in the `X-API-Key` header, as the [authentication docs](https://docs.perceptlayer.com/authentication) describe. The [Google Shopping API guide](https://perceptlayer.com/blog/google-shopping-api-product-prices) covers the endpoint's other parameters. ## What does the JSON look like before you flatten it? The response is a `search_parameters` object, a `shopping_results` array and `pagination`. Each result is a flat object except `extensions`, a list of strings. Here are two results from the recording, trimmed with `…`: ```json { "search_parameters": { "q": "iphone 15", "gl": "us", "hl": "en", "start": 0, "device": "desktop" }, "shopping_results": [ { "position": 1, "category": "Popular products", "title": "Apple iPhone 15", "source": "Walmart - Wireless Source", "rating": 4.7, "reviews": 45000, "extensions": [" & more"], "product_id": "4263606017411565992", "link": "https://www.google.com/shopping/product/4263606017411565992", "price": "$393.73", "extracted_price": 393.73, … }, { "position": 2, "title": "Apple iPhone 15 128GB", "source": "Best Buy", "price": "$441.00", "extracted_price": 441, … }, … ], "pagination": { "current_page": 1, "start": 0, "next_start": 10 } } ``` Three things in it shape the schema. `extracted_price` is a whole number when the price has no cents. `extensions` starts with a non-breaking space ( ). And `product_id` is digits, but it's an identifier, not a quantity, so keep it a string. ## Step 1: Why do you need an explicit schema? Because pyarrow infers each column's type from the values it sees, and API data doesn't keep its types steady. A day where every product happens to have a whole-dollar price infers `extracted_price` as `int64`; a day with cents infers `double`. Writing those days separately works. Reading them back as one dataset, or concatenating them, fails. We ran exactly that on the recorded results: one table from the whole-dollar result, one from the others, then `pa.concat_tables`: ```python import pyarrow as pa a = pa.Table.from_pylist([{"price": 441}]) b = pa.Table.from_pylist([{"price": 393.73}]) pa.concat_tables([a, b]) # pyarrow.lib.ArrowInvalid: Schema at index 1 was different: # price: int64 # vs # price: double ``` The fix is to decide the types once. An explicit schema also documents the data: anyone reading the code sees every column and its type, and a field the API adds later doesn't silently become a new column. ## Step 2: How do you define the schema and flatten the rows? List every column you keep, with its type, and write a function that turns one response into rows. Cast `extracted_price` to `float`, keep the original price text next to it, strip the whitespace from `extensions`, and add the collection time and the query, which aren't in each result but are what you'll filter on later. ```python """Write Google Shopping responses to a date-partitioned Parquet dataset with a fixed schema.""" import datetime import pyarrow as pa import pyarrow.parquet as pq SCHEMA = pa.schema([ ("date", pa.string()), # partition key, YYYY-MM-DD ("collected_at", pa.timestamp("s", tz="UTC")), ("query", pa.string()), ("gl", pa.string()), ("position", pa.int32()), ("product_id", pa.string()), ("title", pa.string()), ("source", pa.string()), ("price_text", pa.string()), # as shown, e.g. "$441.00" ("price", pa.float64()), # extracted_price, always a float ("rating", pa.float64()), ("reviews", pa.int64()), ("category", pa.string()), ("extensions", pa.list_(pa.string())), ("link", pa.string()), ]) def rows(response, collected_at): params = response.get("search_parameters", {}) for r in response.get("shopping_results", []): price = r.get("extracted_price") yield { "date": collected_at.date().isoformat(), "collected_at": collected_at, "query": params.get("q"), "gl": params.get("gl"), "position": r.get("position"), "product_id": r.get("product_id"), "title": r.get("title"), "source": r.get("source"), "price_text": r.get("price"), "price": float(price) if price is not None else None, "rating": r.get("rating"), "reviews": r.get("reviews"), "category": r.get("category"), "extensions": [e.strip() for e in r.get("extensions", [])], "link": r.get("link"), } ``` Fields the schema doesn't list, such as `thumbnail` and the long `product_token`, are dropped. That's deliberate: the recorded `thumbnail` is a placeholder data URI, and tokens are for follow-up calls, not analysis. If you might want them later, keep the raw JSON too, gzipped, alongside the Parquet. When you do need a new column, add it to the end of `SCHEMA` as a nullable field and start filling it from that day. Older files simply lack it, and a dataset read with the new schema returns nulls for those days. Never change an existing column's type in place; add a new column instead and backfill it if you need to, so old and new files still read as one dataset. ## Step 3: How do you write a date-partitioned dataset? Build one table per day with the schema and hand it to `write_to_dataset` with `partition_cols=["date"]`. pyarrow writes a folder per value, `shopping/date=2026-10-24/`, and moves the `date` column into the folder name, the Hive-style layout that query engines read ( [Apache Arrow, pyarrow.parquet.write\_to\_dataset](https://arrow.apache.org/docs/python/generated/pyarrow.parquet.write_to_dataset.html), 2026). `zstd` compression is a sound default for text-heavy columns. ```python def write_day(responses, root="shopping", collected_at=None): """One call per day: every response collected that day goes into one file.""" collected_at = collected_at or datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0) records = [row for resp in responses for row in rows(resp, collected_at)] table = pa.Table.from_pylist(records, schema=SCHEMA) pq.write_to_dataset(table, root_path=root, partition_cols=["date"], compression="zstd") return table.num_rows ``` Collect a day's responses first, then call `write_day` once. Fetching looks like this, one call per query; it's a sketch we haven't run against the live API: ```python import os import requests URL = "https://api.perceptlayer.com/v1/google-shopping/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} QUERIES = ["iphone 15", "pixel 9", "galaxy s25"] responses = [] for q in QUERIES: r = requests.get(URL, headers=HEADERS, params={"q": q, "gl": "us", "hl": "en"}, timeout=60) if r.ok: responses.append(r.json()) print(write_day(responses), "rows written") ``` Failed calls are skipped and cost nothing; for retries, see [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python). ## Step 4: How do you read it back? Open the folder as a dataset with Hive partitioning and filter on `date`. pyarrow reads only the matching folders, which is the point of partitioning: a query for one day doesn't touch the others. ```python import pyarrow.dataset as ds day = ds.dataset("shopping", format="parquet", partitioning="hive").to_table( filter=ds.field("date") == "2026-10-24" ) print(day.select(["source", "price_text", "price"]).to_pylist()) ``` We wrote the recorded response as two days, 23 and 24 October, and read back the second. It returned three rows with `price` as `double` on every one, including the whole-dollar 441.0: ```python [{'source': 'Walmart - Wireless Source', 'price_text': '$393.73', 'price': 393.73}, {'source': 'Best Buy', 'price_text': '$441.00', 'price': 441.0}, {'source': 'T-Mobile', 'price_text': '$17.50/mo', 'price': 17.5}] ``` The third row shows why `price_text` is worth keeping: the T-Mobile result is a monthly instalment, and `extracted_price` holds only the number. Filter rows whose text ends in `/mo` before you compare prices. The same output in DuckDB or pandas is one line, since both read Hive-partitioned Parquet. For loading the same rows into a database instead, see [loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres). ## Is Parquet smaller than gzipped JSON? Not for small files. On the recorded response, the full JSON was 2,068 bytes and 896 gzipped; the Parquet file for its three rows was 4,910 bytes. The file's metadata footer alone was 3,019 bytes, because Parquet stores the schema and column statistics in every file ( [Apache Parquet file format](https://parquet.apache.org/docs/file-format/), 2026). | Format, 3 recorded rows | Bytes | | --- | --- | | Raw JSON response | 2,068 | | gzip JSON response | 896 | | Parquet (zstd), whole file | 4,910 | | of which, metadata footer | 3,019 | That overhead is per file, not per row, so it shrinks in relative terms as files grow. We measured only the three recorded rows, so we can't give you a ratio for a full day; measure it on your own data. The practical rule follows from the footer: write one file per day, not one per API response, and Parquet's typed, column-by-column storage starts to pay. Its other advantage doesn't depend on size: a reader can load just `price` and `date` without reading titles and links. ## What does the data collection cost? The Parquet steps run locally and cost nothing; only the API calls cost credits. Each `/v1/google-shopping/search` call costs 1 credit on success, and failed calls cost nothing and return `X-Credits-Used: 0`. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Daily queries | Credits a month (30 days) | | --- | --- | | 30 | 900 | | 100 | 3,000 | | 1,000 | 30,000 | Worked example: 100 product queries a day is 100 × 30 = 3,000 credits a month; a Starter pack of 10,000 credits covers three months of it, and purchased credits last 12 months. Thirty queries a day is 900 credits a month; the 100 free credits on signup cover its first 3 days. See [pricing](https://perceptlayer.com/pricing) for what credits cost. To run the job daily, our guide to [scheduling web data pulls](https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue) compares cron, queues and workflow tools. To start collecting, [get a free API key](https://perceptlayer.com/signup) and run a query in the playground on the [Google Shopping API page](https://perceptlayer.com/apis/google-shopping). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Google Shopping **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/google-shopping) ## Frequently asked questions ### How do I convert JSON to Parquet in Python? Flatten each JSON record into a dict, build a table with `pyarrow.Table.from_pylist(records, schema=SCHEMA)` and write it with `pyarrow.parquet.write_table` or, for a partitioned dataset, `write_to_dataset`. Pass an explicit `pa.schema` so types don't change between runs. pandas' `to_parquet` works too and uses pyarrow underneath. ### Why does my Parquet dataset fail with a schema mismatch? Usually because a column's type was inferred differently on different days. In the recorded Google Shopping response, `extracted_price` is `441` for one product and `393.73` for another, so pyarrow infers `int64` for one batch and `double` for another, and concatenating them raises `ArrowInvalid`. Fix the types with an explicit schema. ### Should I partition Parquet files by date? For data collected on a schedule, yes. `write_to_dataset(..., partition_cols=["date"])` writes one folder per day, and readers that filter on `date` skip the rest. Don't partition so finely that each file holds only a few rows: every Parquet file carries a metadata footer, 3,019 bytes in our three-row test. ### Is Parquet smaller than gzipped JSON? For tiny files, no: our three recorded rows took 4,910 bytes as Parquet and 896 as gzipped JSON, mostly because of Parquet's per-file footer. Write a day's responses into one file so that overhead is shared, and measure on your own data. Parquet's typed columns and column pruning help regardless of size. ### How much does collecting the data cost? Each Google Shopping search costs 1 credit per successful call; failed calls cost nothing, and writing Parquet adds no cost. A hundred queries a day is 3,000 credits a month. Every account gets 100 free credits after verifying an email address. The [pricing page](https://perceptlayer.com/pricing) has what credits cost. parquet python pyarrow data engineering json ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 29 Jul 2026 Perceptlayer 6 min read ## [Flatten Nested JSON to CSV in Python: Two Ways Compared](https://perceptlayer.com/blog/web-data-to-csv-python) Flatten a recorded Zillow response to CSV with pandas json\_normalize (60 columns) and plain Python (63), split photo lists into a child table, fix integers. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "Software Review Data Analysis for Competitive Research" description: "What Capterra, Trustpilot and Google Play reviews can and can't tell you about a competitor, which fields to keep, the sampling bias, and a worked rating tally." url: https://perceptlayer.com/blog/software-review-data-competitive-research --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Software Review Data Analysis for Competitive Research 16 Sept 2026 Perceptlayer 7 min read Software review data tells you what a competitor's vocal customers complain about and praise, how that changes over time, and how it differs by segment. It doesn't tell you market share, satisfaction across all customers, or why people stay quiet. For competitive research, keep each review's rating, date, segment fields (role, company size, time used where the site has them) and verification label, and compare competitors on trends and themes rather than on headline scores. ## Key takeaways - Reviewers select themselves: research on online reviews describes acquisition and under-reporting biases that make average ratings a biased measure of quality. Compare like with like, over time. - The recorded Trustpilot profile for amazon.com has 67.5% one-star and 17.9% five-star ratings out of 49,830: a simple mean of 2.0 stars against a TrustScore of 1.5, because TrustScore weights recent reviews. - Only 9,156 of those 49,830 reviews, 18.4%, are from the last 12 months, so a lifetime score mostly reflects older experiences. - Capterra's `products-reviews` filters by `company_size[]` and `time_used[]`. Pull one segment per call and store the filter you used, and you have segment labels without parsing reviewer fields. - Pulling 4 competitors × 3 sources × 5 pages is 60 credits; a monthly refresh of page 1 is 12. ## What can review data tell you about a competitor? Three things, reliably. First, the themes: what customers bring up unprompted, such as onboarding, pricing changes, support response or a specific feature. Second, direction: whether complaints about a theme rise or fall after a release or a price change. Third, segment differences: on Capterra, whether small companies and large ones, or trial users and two-year users, rate a product differently. It can't tell you how many customers a competitor has, how satisfied the silent majority is, or what churned customers would say, because those people mostly don't write reviews. Research on online product reviews names two self-selection effects: people who buy a product are already disposed to like it, and people with extreme opinions are more likely to review than people with moderate ones. Together they make the mean rating a biased measure of quality ( [Hu, Pavlou and Zhang, MIS Quarterly](https://ink.library.smu.edu.sg/sis_research/8012), 2017). So treat reviews as a stream of qualitative evidence with known biases. They are good for "what do Product B's unhappy users say that Product A's don't", and poor for "Product A is better than Product B". ## Which sources cover which kind of software? Each site reflects its own audience and review process, so the choice of source shapes the answer. Capterra is built around business software and records who the reviewer is in business terms. Trustpilot reviews companies, so a software company's profile mixes product, billing and support experiences. Google Play reviews one app on one platform, with very high volumes for consumer apps. | Source | Endpoint | What it's good for | Segment fields | | --- | --- | --- | --- | | Capterra | [`/v1/capterra/products-reviews`](https://perceptlayer.com/apis/capterra/products-reviews) ( `id`) | B2B software, by buyer segment | Filters: `company_size[]` ( `A`– `I`), `time_used[]`, `countries[]`, `overall_rating_ge` | | Trustpilot | [`/v1/trustpilot/company-reviews`](https://perceptlayer.com/apis/trustpilot/company-reviews) ( `company_domain`) | The whole company experience | `rating`, `language`, verification labels; filters `date_posted`, `verified`, `rating` | | [Google Play](https://perceptlayer.com/apis/google-play) | [`/v1/google-play/product-reviews`](https://perceptlayer.com/apis/google-play/product-reviews) ( `product_id`) | One Android app | `rating`, `likes`, `iso_date`; filters `rating`, `sort_by`, `gl` | All three cost 1 credit per successful call. We have recorded responses for Trustpilot and Google Play, so their field names below are real; for Capterra we have a recorded product list, where each product carries a `review_count`, but not a recorded reviews response, which is why the method for it relies on filters rather than parsing reviewer fields. ## Which fields should you keep? Keep what lets you count, segment and date reviews, and drop what identifies people. A competitive analysis never needs a reviewer's name or avatar, and both sources return them. Here is one recorded Trustpilot review with the text cut and personal fields removed: ```json { "id": "6adac54ca4e34a0e087ae2b2", "rating": 1, "title": "Ich war Jahrelang zufriedener Kunde von…", "language": "de", "isVerified": false, "labels": { "verification": { "isVerified": false, "reviewSourceName": "Organic", "verificationSource": "invitation", "verificationLevel": "not-verified", … } }, "dates": { "experiencedDate": "2026-10-23T00:00:00.000Z", "publishedDate": "2026-10-23T04:24:12.000Z" }, "likes": 0, … } ``` | Field | Source | Why keep it | | --- | --- | --- | | `id` | Both | Deduplicate across pulls | | `rating` | Both | The count you tally | | `dates.publishedDate` / `iso_date` | Trustpilot / Google Play | Trends, and before/after a release | | `dates.experiencedDate` | Trustpilot | When the experience happened, which can differ from posting | | `language` | Trustpilot | Compare markets separately | | `labels.verification.*`, `isVerified` | Trustpilot | Separate verified, invited and organic reviews | | `likes` | Both | How many readers found a review useful; the recorded Google Play reviews have 491, 390 and 109 | | Filter values you sent | Capterra | Segment labels: `company_size[]`, `time_used[]` | | Review text | All | Themes; store it, but don't tally it raw | Drop `consumer` details on Trustpilot and the `title` and `avatar` on Google Play reviews, where `title` holds the reviewer's name. For Capterra, check a page in the playground on the [Capterra API page](https://perceptlayer.com/apis/capterra) to see what it returns about each reviewer, and keep role and company size only if they're there. ## What does a worked tally show? A tally of the recorded Trustpilot profile for amazon.com shows the shape that makes headline scores misleading. The response's `filters.reviewStatistics.ratings` gives counts by star, and `businessUnit` gives the TrustScore and recent volume. The shares below are computed from those counts. | Stars | Reviews | Share | | --- | --- | --- | | 1 | 33,636 | 67.5% | | 2 | 3,004 | 6.0% | | 3 | 1,869 | 3.8% | | 4 | 2,423 | 4.9% | | 5 | 8,898 | 17.9% | | **Total** | **49,830** | | Three readings follow. The distribution is U-shaped: 85.4% of ratings are one or five stars, and the middle is nearly empty, which is what under-reporting bias predicts. The simple mean is (1 × 33,636 + 2 × 3,004 + 3 × 1,869 + 4 × 2,423 + 5 × 8,898) ÷ 49,830 = 2.0 stars, yet `trustScore` is 1.5. Trustpilot says TrustScore isn't a simple average: it gives more weight to newer reviews and starts every company with seven 3.5-star reviews as a prior ( [Trustpilot Help Center](https://help.trustpilot.com/s/article/TrustScore-and-star-rating-explained), 2026). And `numberOfReviewsLast12Months` is 9,156, so 18.4% of the reviews are from the past year. The same response lists `similarBusinessUnits`, Trustpilot's own comparison set: Temu at TrustScore 1.8 with 56,735 reviews, Amazon.co.uk at 1.4 with 34,369 and Amazon.de at 1.5 with 25,994. That's a ready-made competitor list, but compare their recent reviews, not these lifetime scores. Note also that the profile's rating counts total 49,830 while its review list reports 46,782; say which count you use. ## How do you tally competitors yourself? Pull the same window for each competitor, tally by month and rating, and keep segment and verification labels. Use Trustpilot's `date_posted` filter ( `last_12_months`, `last_6_months`, `last_3_months`, `last_30_days`) so every company is measured over the same period. This script tallies Trustpilot reviews by month, rating and verification source for a list of domains, using only fields from the recorded response: ```python import collections import os import requests URL = "https://api.perceptlayer.com/v1/trustpilot/company-reviews" HEADERS = {"X-API-Key": os.environ["API_KEY"]} COMPETITORS = ["example-a.com", "example-b.com"] tally = collections.Counter() for domain in COMPETITORS: for page in range(1, 6): r = requests.get(URL, headers=HEADERS, timeout=60, params={ "company_domain": domain, "page": page, "sort": "recency", "date_posted": "last_12_months"}) if r.status_code != 200: print(domain, page, r.json()["error"]["code"]) break reviews = r.json().get("reviews", []) for rv in reviews: month = rv["dates"]["publishedDate"][:7] source = rv["labels"]["verification"].get("verificationSource") tally[(domain, month, rv["rating"], source)] += 1 if not reviews: break for (domain, month, rating, source), n in sorted(tally.items()): print(domain, month, rating, source, n) ``` We haven't run this script live for this article. For Capterra, segment by the filter instead of parsing reviewer fields: call `products-reviews` once per `company_size[]` code or per `time_used[]` value, such as `FreeTrial` against `MoreThan2Years`, and store the value you sent with every review from that call. Comparing trial users' ratings with two-year users' is often the most useful B2B cut: it separates first impressions from what the product is like to live with. ## Which biases should you correct for? Four, beyond self-selection. **Solicitation**: companies that invite reviews can collect a different mix of reviewers from those that don't, so check verification and invitation labels and compare like with like. **Removed reviews**: platforms remove reviews they judge fake; Trustpilot says it removed 4.5 million fake reviews in 2024, 7.4% of all reviews submitted that year ( [Trustpilot Trust Report](https://corporate.trustpilot.com/press/news/trust-report-2025), 2025). What you can read is what survived moderation. **Platform mix**: Trustpilot reviews the company and Google Play the Android app, so a gap between the two may be about billing or support versus the app itself, not one product being better. **Volume**: a competitor with 20 reviews this quarter can swing on a handful, so show counts next to every share. For the mechanics of collecting and deduplicating reviews from all three sources, the guide to [review data for sentiment analysis](https://perceptlayer.com/blog/product-review-data-sentiment-analysis) has the code. ## What does a competitor review pull cost? One credit per successful call on all three sources, so the cost is pages. Four competitors, three sources and five pages each is 4 × 3 × 5 = 60 credits for an initial pull. A monthly refresh of the first page of `recency`\-sorted reviews is 4 × 3 = 12 credits. Capterra segment pulls add one call per segment per product. | Step | Calls | Credits | | --- | --- | --- | | Initial pull: 4 competitors × 3 sources × 5 pages | 60 | 60 | | Capterra segments: 4 products × 5 `time_used[]` values | 20 | 20 | | Monthly refresh: 4 × 3 × page 1 | 12 a month | 12 | The 100 free credits you get once on signup cover the initial pull, the segment pulls and the first refresh, 92 credits in all; later monthly refreshes need a pack. Failed calls cost nothing. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance and [pricing](https://perceptlayer.com/pricing) has what packs cost. To see the fields for a competitor you care about, run `company-reviews` for its domain in the playground on the [Trustpilot API page](https://perceptlayer.com/apis/trustpilot). ## APIs in this post - [Capterra **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/capterra) - [Trustpilot **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/trustpilot) - [Google Play **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/google-play) ## Frequently asked questions ### Can review data show which competitor is better? Not on its own. Reviewers select themselves, platforms moderate what's published, and companies differ in how hard they ask for reviews. Review data is good for themes, trends and segment differences within a product. For "who is better", compare the same segment over the same window, and treat the result as one input among several. ### Why is a TrustScore different from the average rating? Trustpilot says TrustScore isn't a simple average: it weights newer reviews more and starts every company with seven 3.5-star reviews as a prior. In the recorded amazon.com profile, the mean of its star counts is 2.0 while the TrustScore is 1.5, which is what recency weighting does when recent reviews are worse. ### Which review fields matter for B2B competitive research? Rating, date, and the reviewer's segment: role, company size and how long they've used the product, where the site records them. Capterra's review endpoint filters on company size and time used, so you can pull each segment separately. Add the review text for themes and the verification label for how the review was collected. ### Should I keep reviewers' names? No. A competitive analysis needs ratings, dates, segments and text, not identities. Drop names, avatars and profile details at ingestion: Trustpilot returns them under `consumer`, and Google Play puts the reviewer's name in the review `title`. Never use review data to contact reviewers. ### How much does it cost to track competitors' reviews monthly? One credit per successful call. Refreshing the newest page of reviews for 4 competitors on 3 sources is 12 credits a month, and an initial 5-page pull is 60 credits. The 100 free credits you get once on signup cover the initial pull and the first refresh; later refreshes need a pack. The [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. software reviews competitive research review analysis b2b software app reviews ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Nov 2026 Perceptlayer 8 min read ## [Capterra Scraper or API: What You Get](https://perceptlayer.com/blog/capterra-scraper-vs-api) A Capterra scraper vs 1-credit endpoints: a recorded products page with uuid, vendor, category\_ids and review\_count, and the cost of a daily review-count watch. --- title: "Airfare Data Feed: What Flight Price Tracking Can Show" description: "Build an airfare data feed from flight search calls: price, stops, duration and CO2 per flight from a recorded JFK to LAX search, and the daily cost." url: https://perceptlayer.com/blog/flight-price-data-fare-tracking --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Airfare Data Feed: What Flight Price Tracking Can Show 14 Sept 2026 Updated 4 Nov 2026 Perceptlayer 8 min read Flight price data analysis starts with a small set of fields: price, currency, stops, duration, airline and departure times for each itinerary. One API call gives you a snapshot of those fields for a single route and date. It doesn't give you history, so any claim about a price trend needs repeated calls that you store yourself. This article reads one recorded Google Flights response, lists what it contains and what it leaves out, then shows how to turn snapshots into a fare series. ## Key takeaways - A `GET /v1/google-flights/one-way` call returns `price`, `currency`, `stops`, `total_duration_minutes`, `airline_name`, `emissions` and per-leg times for each flight, and costs 1 credit. - In the recorded JFK to LAX sample for 2026-12-15, a $179 JetBlue flight took 384 minutes and a $189 Delta flight took 378. Both were nonstop, so the $10 gap isn't explained by stops or duration. - A snapshot is one quote at one moment. It can't show whether $179 is low, normal or high for that route. - Fare tracking means calling on a schedule and storing the cheapest price per route and date. Tracking 10 routes for 30 days is 300 calls, or 300 credits. - Compare prices only after you check what each source includes, such as bags, and which currency it returns. ## What fields does a flight price response contain? A one-way search returns a `flights` array and a `search_metadata` object. Each flight carries the fare and the shape of the trip: `price`, `currency`, `total_duration_minutes`, `stops`, `airline_name`, an `emissions` block, a `booking_token` and a `legs` list. The metadata echoes the search: origin, destination, date, passengers, cabin class and currency. Here is the request we recorded, and an excerpt of the response: ```bash curl "https://api.perceptlayer.com/v1/google-flights/one-way?origin=JFK&destination=LAX&departure_date=2026-12-15" \ -H "X-API-Key: $API_KEY" ``` ```json { "flights": [ { "price": 179, "currency": "USD", "total_duration_minutes": 384, "stops": 0, "airline_name": "JetBlue", "emissions": { "co2_kilograms": 426, "typical_co2_kilograms": 344, "difference_percent": 24 }, "legs": [ { "airline": "B6", "flight_number": "2223", "departure_airport": "JFK", "arrival_airport": "LAX", "departure_time": "2026-12-15T08:01:00", "arrival_time": "2026-12-15T11:25:00", "duration_minutes": 384 } ] }, … ], "search_metadata": { "origin": "JFK", "destination": "LAX", "departure_date": "2026-12-15", "cabin_class": "Economy", "sort_by": "Top Flights", "currency": "USD", … } } ``` Field reference for the two flights in the sample: | Field | JetBlue | Delta | | --- | --- | --- | | `price` (USD) | 179 | 189 | | `stops` | 0 | 0 | | `total_duration_minutes` | 384 | 378 | | `legs[0].flight_number` | 2223 | 773 | | `legs[0].departure_time` | 2026-12-15T08:01:00 | 2026-12-15T09:00:00 | | `emissions.difference_percent` | 24 | \-29 | Full parameters are on the [Google Flights One Way page](https://perceptlayer.com/apis/google-flights/one-way). ## What does a single snapshot tell you? A snapshot tells you the price of specific itineraries at the moment of the call, and how they differ on stops, duration, airline and timing. In the sample, both flights are nonstop and within six minutes of each other, yet one costs $10 more. The data shows that gap. It doesn't show why. The sample does support a few comparisons: - **Price against time in the air.** Delta's flight is 6 minutes shorter and $10 more expensive. That's a premium for a different departure hour and airline, not a faster product. - **Price against emissions.** The `emissions.difference_percent` field is relative to a typical flight on the route, which is 344 kg in both rows. JetBlue's flight is 24% above that figure and Delta's is 29% below it. The cheaper fare has the higher emissions here, but two rows are an anecdote, not a pattern. - **Spread across the day.** Departures at 08:01 and 09:00 are the two times in this excerpt. You'd need the full list to say anything about the spread. Notice that the `search_metadata` block also records `sort_by` as `Top Flights` for this call. The endpoint also accepts `sort_by=cheapest`, which is what the tracking script below passes. ## What can a snapshot not show? A snapshot can't show a trend, a baseline or a reason. It has no timestamp history, no record of previous prices for the same flight, no seat counts and no explanation for why a fare changed. The only time axis in the response is the departure date you asked for, not when the price was observed. That limits the questions you can answer from one call: | Question | Answerable from one call? | What you'd need | | --- | --- | --- | | What is the cheapest nonstop on this date right now? | Yes | One call with `max_stops=nonstop` | | Is this price high for this route? | No | Repeated calls over weeks for the same route | | Will the fare rise next week? | No | A history, and even then only a guess | | Which airline is cheapest most often? | No | Many dates and many observation days | | Did the price drop since yesterday? | No | A stored copy of yesterday's call | Google states that flight prices are updated roughly once every 24 hours ( [Google Flights help](https://support.google.com/travel/answer/2475306), 2026). That is Google's description of its own update cycle, and it doesn't say how other sources behave. If you take it at face value, though, a daily schedule is a reasonable starting point for a Google source. Check whether repeated calls within a day return different prices before you pay for more. ## What does the price include? The `price` field is a fare for the itinerary, and it isn't a total cost of travel. Google's help page says the price shown covers the air transport itself, including VAT/GST and airport taxes, while additional fees such as baggage may apply and vary by airline or booking option ( [Google Flights help](https://support.google.com/travel/answer/2475306), 2026). The Kiwi.com endpoint makes this visible. In a recorded `GET /v1/kiwi/flights-search` response for London to Barcelona on 2026-12-04, two Ryanair itineraries are priced at 29 EUR and 32 EUR. Both show `checked_bags_included: 0` and a `baggage` block with `checked_bag_tier_prices`: 42.856274 and 85.712548 on the first, 48 and 96 on the second. ```json "price": { "amount": 29, "currency": "EUR", "formatted": "29 €" }, "stops": 0, "baggage": { "hand_bags_included": 0, "checked_bags_included": 0, "personal_item_included": 1, "checked_bag_tier_prices": [42.856274, 85.712548] }, … ``` For a traveller with a checked bag, the 29 EUR headline fare is the smaller part of the cost. If you analyse fares across sources, compare like with like: same cabin, same bags, same currency. On the Google Flights One Way endpoint, `include_baggage` and `bags` are parameters you can set, and the response's `currency` field tells you what you got. Two units to watch in the Kiwi sample: `duration` is 7800 and the Google sample uses `total_duration_minutes`. The Kiwi flight departs 15:35 and arrives 18:45 local time, a 3 hour 10 minute gap that includes the one-hour time difference, so 7800 reads as seconds (130 minutes). Check the unit before you merge two sources into one table. ## How do you turn snapshots into a fare series? You call on a schedule, keep the cheapest fare per route, departure date and observation day, and compare across days. The storage is the part that makes it tracking. The script below does the whole loop in Python and appends one row per route and date to a CSV. ```python import csv import datetime as dt import os import requests API = "https://api.perceptlayer.com/v1/google-flights/one-way" KEY = os.environ["API_KEY"] ROUTES = [("JFK", "LAX"), ("JFK", "SFO")] DEPARTURES = ["2026-12-15", "2026-12-16"] with open("fares.csv", "a", newline="") as f: out = csv.writer(f) for origin, destination in ROUTES: for day in DEPARTURES: r = requests.get( API, headers={"X-API-Key": KEY}, params={ "origin": origin, "destination": destination, "departure_date": day, "sort_by": "cheapest", }, timeout=30, ) if r.status_code != 200: print(origin, destination, day, r.status_code, r.text[:200]) continue flights = r.json().get("flights", []) if not flights: continue best = min(flights, key=lambda x: x["price"]) out.writerow([ dt.date.today().isoformat(), origin, destination, day, best["price"], best["currency"], best["stops"], best["total_duration_minutes"], best["airline_name"], ]) ``` Run it once a day from cron or a queue. The [scheduling comparison](https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue) covers the options, and the [price tracking agent tutorial](https://perceptlayer.com/blog/price-tracking-agent-python) shows the same idea with alerts. For error handling, see [Errors](https://docs.perceptlayer.com/errors): a failed call costs nothing and returns `X-Credits-Used: 0`. The column you add is the observation date. Without it you have prices, but no series. ## Which endpoint fits which question? Pick by the question, not by the source. Only the Google Flights One Way and Kiwi.com Flights Search responses are recorded here. For the date-window and calendar endpoints below, we list the parameters and have no recorded response, so check what they return in the playground before you replace a per-date loop with them. | Question | Endpoint | Notes | | --- | --- | --- | | Fares and details for one date | [Google Flights One Way](https://perceptlayer.com/apis/google-flights/one-way) | Per-flight price, stops, duration, emissions | | A date window | [Google Flights Date Range](https://perceptlayer.com/apis/google-flights/date-range) | Takes `from_date` and `to_date`; response not recorded | | Round trips | [Google Flights Round Trip](https://perceptlayer.com/apis/google-flights/round-trip) | Adds `return_date` | | A month for one route | [Skyscanner Calendar](https://perceptlayer.com/apis/skyscanner/calendar) | Takes `origin`, `destination`, `month`; response not recorded | | Fares with baggage detail | [Kiwi.com Flights Search](https://perceptlayer.com/apis/kiwi/flights-search) | `baggage` block per itinerary | | A date window on Kiwi.com | [Kiwi.com Calendar Cheapest Dates](https://perceptlayer.com/apis/kiwi/calendar-cheapest-dates) | Takes `origin`, `destination`, `start_date`, `end_date`; response not recorded | | One origin, no fixed destination | [Kiwi.com Explore Price Map](https://perceptlayer.com/apis/kiwi/explore-price-map) | Takes `origin`, `start_date`, `end_date`; response not recorded | The [Skyscanner Calendar page](https://perceptlayer.com/apis/skyscanner/calendar) lists its parameters. To find the values for `origin` and `destination`, search places with the [autocomplete endpoint](https://perceptlayer.com/apis/skyscanner/autocomplete). We have no recorded Skyscanner response, so check its field names in the playground before you rely on them. If one source disagrees with another on a price, that's information, not an error. Different sources can quote different fares, bag rules and currencies for the same flight. The [Google Flights API guide](https://perceptlayer.com/blog/google-flights-api) covers the endpoints in more depth, and the [hotel price monitoring article](https://perceptlayer.com/blog/hotel-price-data-rate-monitoring) applies the same snapshot logic to rooms. ## What does fare tracking cost in credits? Every successful call to these endpoints costs 1 credit, and failed calls cost nothing. The arithmetic is the number of routes times departure dates times observation days. Two routes, 15 departure dates and 30 daily observations is 2 × 15 × 30 = 900 calls, or 900 credits. The 100 free credits you get once, after you verify an email, cover the first 3 days at 30 calls a day; the rest needs a pack, and the 10,000-credit Starter pack covers it. Scaling it up is multiplication: | Plan | Calls per day | Days | Credits | | --- | --- | --- | --- | | 10 routes, 1 date each | 10 | 30 | 300 | | 10 routes, 30 dates each | 300 | 30 | 9,000 | | 100 routes, 30 dates each | 3,000 | 30 | 90,000 | The last row is more than the 50,000-credit Build pack and fits in the 200,000-credit Growth pack. [Pricing](https://perceptlayer.com/pricing) shows what credits cost. The Date Range endpoint takes `from_date` and `to_date` and costs 1 credit per call. We haven't recorded its response, so try it in the playground to see what it returns before you size a budget around it. Rate limits are per account: free accounts get 1 request a second. See [Rate limits](https://docs.perceptlayer.com/rate-limits) before you parallelise. To try the first call, [get a free API key](https://perceptlayer.com/signup) and run the One Way request from this article in the playground on the [Google Flights API page](https://perceptlayer.com/apis/google-flights). ## APIs in this post - [Google Flights **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-flights) - [Kiwi.com **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/kiwi) - [Skyscanner **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/skyscanner) ## Frequently asked questions ### Can flight price data predict whether a fare will rise? Not from a snapshot. A single call gives the current quote for a date and nothing about past prices. To estimate direction you need your own stored series for the route. Google's tracking feature sends alerts when prices for a tracked route are likely to go up ( [Google Flights help](https://support.google.com/travel/answer/6235879), 2026). ### How often should an airfare data feed refresh? Once a day is a sensible default. Google says flight prices are updated approximately once every 24 hours ( [Google Flights help](https://support.google.com/travel/answer/2475306), 2026), so more frequent calls to the same search mostly repeat data. Each call is 1 credit, so a daily schedule for one route and date is about 30 credits a month. ### Why do two sources show different prices for the same flight? Sources differ in what they include and which booking option they price. The Kiwi sample lists zero checked bags included, with separate bag prices, while the Google Flights `price` covers the fare itself and notes that baggage and other fees may apply. Compare cabin, bags and currency before you compare totals. ### What happens if a call fails or I run out of credits? A failed call costs nothing and returns `X-Credits-Used: 0`. The body has an `error` object with a `code`, such as `rate_limited` (429) or `insufficient_credits` (402). On 429 and 503, wait the seconds in the `Retry-After` header. The [Errors docs](https://docs.perceptlayer.com/errors) list every code. travel flights fare tracking price data google flights ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 28 Aug 2026 Perceptlayer 8 min read ## [Hotel Price Data for Rate Monitoring: Fields and Costs](https://perceptlayer.com/blog/hotel-price-data-rate-monitoring) The fields a rate-monitoring job needs from Booking, Expedia and Trivago, and what 200 hotels over 30 dates costs, 6,000 credits per source. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 19 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Google Flights API: Fares, Date Ranges and Airports](https://perceptlayer.com/blog/google-flights-api) Get Google Flights fares as JSON: one-way, round-trip and date-range calls, a recorded JFK to LAX response, and the credit cost of a daily fare check. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. --- title: "VS Code MCP Server Setup: Add Live Web Data to Copilot" description: "Add Perceptlayer's MCP server to VS Code in .vscode/mcp.json with a password input for the key, run a first search in agent mode and check credits per call." url: https://perceptlayer.com/blog/vs-code-mcp-server-setup-web-data --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # VS Code MCP Server Setup: Add Live Web Data to Copilot 14 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read To set up an MCP server in VS Code, add it to `.vscode/mcp.json` (or your user profile's `mcp.json`) under `servers`, start it, and use its tools from Copilot Chat in agent mode. For Perceptlayer, the server is an `http` server at `https://perceptlayer.com/mcp`, and the API key goes in an `Authorization` header filled from a `promptString` input with `password: true`, so VS Code asks for the key once and never writes it to the file. ## Key takeaways - The config is a `servers` object plus an `inputs` array; the header reads `Bearer ${input:perceptlayer-key}`, so the key never sits in the file. - `password: true` on a `promptString` input masks what you type, which VS Code's reference recommends for API keys. - The server has three tools. `search_endpoints` and `get_endpoint` are free; `call_endpoint` costs the endpoint's credits, 1 for a Google search, and only on success. - All three tools declare `readOnlyHint`, and VS Code skips its confirmation dialog for read-only tools, so `call_endpoint` can spend credits without asking. Read the `Credits used` line in each result. - The 100 free credits on signup cover 100 one-credit calls from Copilot. ## What do you need before you start? VS Code with GitHub Copilot Chat, which runs MCP tools in agent mode, and a Perceptlayer API key. [Get a free API key](https://perceptlayer.com/signup); keys start with `sk_live_`, and verifying your email gives you 100 free credits on signup, with no card. Nothing else needs installing: the server is remote, over Streamable HTTP, so there's no local process or package. If you've already added the server to Claude Desktop or Cursor, the URL and header are the same; only the file format differs. The guide to [adding an MCP server to Claude Desktop and Cursor](https://perceptlayer.com/blog/add-mcp-web-data-tools-claude-desktop) covers those two clients, so this one sticks to VS Code. ## How do you write .vscode/mcp.json? Create `.vscode/mcp.json` in your workspace with an input for the key and one server that uses it. VS Code's configuration reference describes this format: a top-level `servers` object, an optional `inputs` array for sensitive values, and `${input:id}` references that VS Code fills in when the server starts. HTTP servers take `type`, `url` and `headers` ( [VS Code MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration), 2026). ```json { "inputs": [ { "type": "promptString", "id": "perceptlayer-key", "description": "Perceptlayer API key", "password": true } ], "servers": { "perceptlayer": { "type": "http", "url": "https://perceptlayer.com/mcp", "headers": { "Authorization": "Bearer ${input:perceptlayer-key}" } } } } ``` We haven't run this config in VS Code against the live server for this article; it follows VS Code's configuration reference and the [AI agents (MCP) docs](https://docs.perceptlayer.com/ai-agents). The first time the server starts, VS Code prompts for `perceptlayer-key` with the input masked, and stores the value securely for later sessions. Because the file holds only the reference, you can commit it and every teammate gets their own prompt for their own key. Don't replace the reference with a literal key in a committed file: the reference says not to commit tokens or populated authentication headers. The header value must include the `Bearer ` prefix. The server also accepts the key in an `X-API-Key` header, but `Authorization: Bearer` is what the [AI agents (MCP) docs](https://docs.perceptlayer.com/ai-agents) use, and it's what most clients expect. ## Can you add it for every workspace instead? Yes. Put the same JSON in your user profile's `mcp.json`, which the command **MCP: Open User Configuration** opens. A server there is available in every workspace without a file in each repository, which suits a personal key. The workspace file suits a team, since it travels with the repository. You can also run **MCP: Add Server** from the Command Palette, choose an HTTP server, enter the URL and an ID such as `perceptlayer`, and pick where to save it ( [VS Code: Add MCP servers](https://code.visualstudio.com/docs/agent-customization/mcp-servers), 2026). The guided flow doesn't add the key input for you, so open the file it wrote and add the `inputs` entry and `headers` block from the example above. Recent versions of VS Code offer more destinations in that flow; the server definition is the same wherever it's saved. ## How do you start the server and check its tools? Start the server from the `mcp.json` editor or the MCP server list, confirm that you trust it, and enter your key when prompted. VS Code treats trusting a server to start as a separate step from authenticating to it and from approving tool calls. Once it starts, it discovers the server's tools: you should see `search_endpoints`, `get_endpoint` and `call_endpoint`. Open Copilot Chat, switch to agent mode, and open **Configure Tools** in the chat input to check that the three tools are enabled for the session. If you have many MCP servers, turning off the tools you don't need for a task keeps the model's choices short; the article on [MCP servers with too many tools](https://perceptlayer.com/blog/mcp-too-many-tools-context) explains why Perceptlayer exposes three tools rather than one per endpoint. ## What does the first tool call look like? Ask something that needs live data and name the server, which is also VS Code's suggested way to check a connection. Try: "Use perceptlayer to search Google for best restaurants in Berlin and list the top two results." The model calls `search_endpoints` to find a Google search endpoint and may call `get_endpoint` to read its parameters, both free. Then it calls `call_endpoint`: ```json { "endpoint": "google-search.search", "params": { "query": "best restaurants in Berlin", "hl": "en", "safe": "off" } } ``` Expand the tool call in the chat to see which server answered and what it returned. This is our recorded response for the same request made over the HTTP API, trimmed; through MCP, `call_endpoint` returns the same JSON: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "source": "Anders & Kaitlin", … }, { "position": 2, "title": "Restaurants - Berlin", "link": "https://guide.michelin.com/us/en/berlin-region/berlin/restaurants", "source": "MICHELIN Guide", … } ], … } ``` After the JSON, the tool result carries a second line: `Credits used: 1. Credits remaining: …` and a request ID. The [Google Search API page](https://perceptlayer.com/apis/google-search) lists the endpoint's other parameters, such as `gl` for country and `device`. ## Why don't you see a confirmation before each call? Because every Perceptlayer tool is marked read-only. VS Code's MCP guide says it shows a confirmation dialog before running a tool that lacks the `readOnlyHint` annotation ( [VS Code MCP developer guide](https://code.visualstudio.com/api/extension-guides/ai/mcp), 2026). All three Perceptlayer tools declare `readOnlyHint: true`, which is accurate, since they only read data, so VS Code can run them straight away. Reading data still costs credits. Each successful `call_endpoint` spends the endpoint's credits, and in agent mode the model can make several calls for one question. Keep an eye on the `Credits used` and `Credits remaining` lines while you try it out, and tell the agent your limit in the prompt, such as "make at most 3 call\_endpoint calls". For a cap that holds regardless of the prompt, enforce it in your own code; the guide to [AI agent cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs) shows how. Failed calls cost nothing. A call with a bad parameter comes back as a tool result starting `Error invalid_parameters:` and debits 0 credits, and the next successful call's `Credits remaining` shows the balance unchanged. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance and the [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What goes wrong, and how do you fix it? Most problems are the header. The catalogue tools work without a key, so a server that lists its tools and runs `search_endpoints` but fails on `call_endpoint` has a key problem. The error code in the tool result tells you which. | Symptom | Cause | Fix | | --- | --- | --- | | `invalid_api_key`, "No API key was sent" | The `headers` block is missing | Add `"Authorization": "Bearer ${input:perceptlayer-key}"` | | `invalid_api_key` with a key entered | The value lacks `Bearer ` , or the key was revoked | Fix the header template, or create a new key and re-enter it | | No prompt for the key | The `${input:…}` ID doesn't match the input's `id` | Make both `perceptlayer-key` | | Tools don't appear | The server hasn't started or isn't trusted | Start it from `mcp.json` or the server list, and confirm trust | | `rate_limited` | Over the account's per-second rate | Wait the seconds the error gives; see the [rate limits docs](https://docs.perceptlayer.com/rate-limits) | | `insufficient_credits` (402) | The balance is used up | Buy a pack on [pricing](https://perceptlayer.com/pricing); nothing is debited meanwhile | Once it works, try a question against another website in the catalogue, such as Zillow listings or Indeed jobs, with no change to the config. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How much does a question from Copilot cost? Each successful `call_endpoint` costs the endpoint's credits, 1 for a Google search, and the catalogue lookups are free. A question that needs two searches costs 2 credits, so the 100 free credits on signup cover 50 such questions. 400 questions a month is 800 credits, which a 10,000-credit Starter pack covers for 12 months. Failed calls cost nothing. The [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Is my API key stored in mcp.json? Not with the `inputs` setup. The file holds only `${input:perceptlayer-key}`, and VS Code prompts for the value when the server first starts, masked because of `password: true`, then stores it for later sessions. That makes the workspace file safe to commit, with each person entering their own key. ### Can my whole team share one config? Yes. Commit `.vscode/mcp.json` with the input reference, and each person enters their own key on first start. Keys from the same account share one credit balance and one rate limit, so a team on one account draws from one pool. Separate accounts keep balances separate. ### Which websites can Copilot reach through this server? The whole catalogue of 480 websites and 2,782 endpoints, through the same three tools. Ask for Zillow listings or Google Maps reviews and the model finds the endpoint with `search_endpoints`. Restricted endpoints, with social, personal or SEO data, need the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) accepted in your dashboard first. ### Does this work in VS Code in the browser? Perceptlayer's MCP server doesn't yet support MCP clients that run inside a web browser, so use the VS Code desktop app. The server is remote, so the desktop app connects to it directly over HTTP with no local process. Responses over 100,000 characters are cut short, so ask for a page or a limit on large results. vs code mcp github copilot ai agents web data ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 11 Oct 2026 Perceptlayer 7 min read ## [Remote MCP Server: Streamable HTTP vs Local stdio](https://perceptlayer.com/blog/remote-mcp-server-streamable-http) A remote MCP server runs over Streamable HTTP: one POST endpoint, auth headers, Origin checks, no sessions. Real responses, and when stdio fits better. --- title: "Build a Price Tracking Agent in Python with Live Data" description: "A Python price tracker that checks Google Shopping and eBay once per product per run, stores history in SQLite, flags drops and costs 2 credits a product." url: https://perceptlayer.com/blog/price-tracking-agent-python --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Build a Price Tracking Agent in Python with Live Data 11 Sept 2026 Perceptlayer 8 min read A price tracking agent in Python is a loop that reads a watchlist, asks two live sources for the current lowest price, saves each reading and alerts you when the price falls. This tutorial builds one with the Google Shopping and eBay endpoints, a single Python file and SQLite. Each product costs 2 credits per run, so the monthly bill is a multiplication you can do before you start. ## Key takeaways - The tracker makes two calls per product per run: `GET /v1/google-shopping/search` and `GET /v1/ebay/search`, 1 credit each. - A title filter and a minimum price per product matter more than any other setting, because search results include accessories and unrelated listings. - A drop is a price at least 5% below the average of the last five readings, or at or below your target price. - 25 products checked 4 times a day cost 25 × 2 × 4 × 30 = 6,000 credits a month. - Failed calls cost nothing, but a client timeout can hide a call that succeeded, so the script never retries a timeout automatically. ## What does a price tracking agent have to do? A tracker has four jobs: fetch the current price for each product, store it with a timestamp, compare it with history, and tell you when something changed. Fetching is the only part that needs live web data. Everything else is a small database and a few lines of arithmetic, which is why this build uses no framework and no model call on the hot path. We use two sources because they answer different questions. Google Shopping returns offers from many retailers for a query, so it tells you the going retail price. eBay search returns individual listings, so it shows the marketplace price. | Source | Endpoint | What it gives the tracker | Credits per call | | --- | --- | --- | --- | | [Google Shopping](https://perceptlayer.com/apis/google-shopping) | `GET /v1/google-shopping/search` | Retail offers with a numeric price and the seller in `source` | 1 | | [eBay](https://perceptlayer.com/apis/ebay) | `GET /v1/ebay/search` | Listings with `price.extracted` and `price.currency` | 1 | The result is a script you can run from cron. Because the loop is deterministic, it is cheap, easy to test, and it never invents a price. ## How do you build the tracker? You build it in seven steps: get a key, write a watchlist, add a small API client, write one fetch function per source, store readings, detect drops, then run it on a schedule. The code below is one file, `tracker.py`. Each step adds to it, and the pieces concatenate in order into a complete script. ### Step 1: Get a key and install two packages Create a free account at [/signup](https://perceptlayer.com/signup) to get a key that starts with `sk_live_`. Free accounts get 100 credits after email verification, with no credit card. Put the key in an environment variable, as the [authentication docs](https://docs.perceptlayer.com/authentication) describe. ```bash export API_KEY="sk_live_..." pip install requests ``` SQLite ships with Python, so `requests` is the only dependency. See the [Requests documentation](https://requests.readthedocs.io/en/latest/) if you want to tune sessions or timeouts. ### Step 2: Write the watchlist Search is fuzzy, so each product carries its own matching rules. `must_include` words must all appear in a result title, `exclude` words drop accessories, and `min_price` removes cases, chargers and parts that match the query by accident. `target` is the price at which you want an alert regardless of history. Save this as `watchlist.json`: ```json [ { "name": "iPhone 15 128GB", "google_q": "iphone 15 128gb", "ebay_q": "iphone 15 128gb unlocked", "must_include": ["iphone 15", "128"], "exclude": ["case", "cover", "protector", "charger", "cable", "pro", "plus", "max"], "min_price": 300, "target": 400 }, { "name": "Keurig K-Cafe", "google_q": "keurig k-cafe coffee maker", "ebay_q": "keurig k-cafe coffee maker", "must_include": ["k-cafe"], "exclude": ["pods", "filter", "descaler", "parts"], "min_price": 60, "target": 120 } ] ``` These two products are examples. Replace them with yours, and expect to adjust the filters after the first run. ### Step 3: Add an API client that respects the limits The client sends the key in the `X-API-Key` header, waits when the API says to, and records the credit balance from every response. Rate-limited (429) and temporarily unavailable (503) responses carry a `Retry-After` header with the seconds to wait, and they are failed calls, so retrying them costs nothing extra. See [rate limits](https://docs.perceptlayer.com/rate-limits) for how the per-minute counting works. ```python import json import os import sqlite3 import time from datetime import datetime, timezone import requests BASE = "https://api.perceptlayer.com" DROP = 0.05 # alert when 5% below the recent average HISTORY = 5 # readings that make up the average PAUSE = float(os.environ.get("PAUSE", "1.0")) # seconds between calls CREDIT_FLOOR = int(os.environ.get("CREDIT_FLOOR", "50")) session = requests.Session() session.headers["X-API-Key"] = os.environ["API_KEY"] state = {"remaining": None} def call(path, params, tries=3): for _ in range(tries): r = session.get(BASE + path, params=params, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() state["remaining"] = int(r.headers.get("X-Credits-Remaining", 0)) return r.json() raise RuntimeError(f"{path}: still limited after {tries} tries") ``` The default `PAUSE` of one second keeps a free account, which gets 1 request a second, under its limit. Paying accounts run at least 5 requests a second, so you can lower it. ### Step 4: Fetch the lowest matching price from each source Each fetch function calls one endpoint, filters the results with the watchlist rules and returns the cheapest survivor as `(price, title, link)`. Google Shopping results sit in `shopping_results` with a numeric `extracted_price`. The eBay search response nests listings under `data.results`, each with a `price` object. Here is an excerpt of a recorded response from `GET /v1/ebay/search?q=coffee+maker&page=1&per_page=60`, trimmed with …: ```json { "success": true, "data": { "query": "coffee maker", "page": 1, "per_page": 60, "has_more": true, "results": [ { "product_id": "366702966104", "title": "Mr. Coffee 4-in-1 Single-Serve Latte, Iced, and Hot Coffee", "link": "https://www.ebay.com/itm/366702966104", "price": { "raw": "$60.00", "extracted": 60, "currency": "USD" }, "sponsored": true, … }, … ], … }, … } ``` The tracker reads `title`, `link`, `price.extracted` and `price.currency`. It also passes the optional boolean `buy_it_now` parameter, because a Buy It Now price is easier to compare over time than a bid. Confirm exactly what the filter does on the [eBay search endpoint page](https://perceptlayer.com/apis/ebay/search), which lists every parameter, including `price_min` and `free_shipping`, and spot-check the titles in your first runs. ```python def matches(title, item): t = title.lower() return all(w.lower() in t for w in item["must_include"]) and not any( w.lower() in t for w in item.get("exclude", []) ) def cheapest(rows, item): best = None for title, price, link in rows: if price is None or price < item["min_price"] or not matches(title, item): continue if best is None or price < best[0]: best = (price, title, link) return best def google_lowest(item): data = call( "/v1/google-shopping/search", {"q": item["google_q"], "gl": "us", "hl": "en"}, ) rows = [ (r.get("title", ""), r.get("extracted_price"), r.get("link")) for r in data.get("shopping_results", []) ] return cheapest(rows, item) def ebay_lowest(item): data = call( "/v1/ebay/search", { "q": item["ebay_q"], "buy_it_now": "true", "price_min": item["min_price"], "per_page": 60, }, ) rows = [] for r in data["data"]["results"]: price = r.get("price") or {} if price.get("currency") == "USD": rows.append((r.get("title", ""), price.get("extracted"), r.get("link"))) return cheapest(rows, item) ``` Both functions cost one credit when they succeed. The Google Shopping call passes `gl=us` and `hl=en`, the same values as the recorded example for that endpoint. Both are optional two-character parameters. This tutorial only tests with those values, so if you change them, check the prices you get back before trusting the history. The eBay function keeps only USD listings, so change that check if you track in another currency. ### Step 5: Store readings and detect drops Every reading goes into a `prices` table with a UTC timestamp, so history survives restarts. A drop is a price at least 5% below the mean of the previous five readings for the same product and source, or any price at or below your `target`. Comparing against an average rather than the last reading catches slow slides that a one-step comparison misses, and it ignores a single noisy listing. ```python def open_db(path="prices.db"): db = sqlite3.connect(path) db.execute( "CREATE TABLE IF NOT EXISTS prices (" "item TEXT, source TEXT, ts TEXT, price REAL, title TEXT, link TEXT)" ) return db def record_and_check(db, item, source, hit): price, title, link = hit prev = [ row[0] for row in db.execute( "SELECT price FROM prices WHERE item = ? AND source = ? " "ORDER BY ts DESC LIMIT ?", (item["name"], source, HISTORY), ) ] now = datetime.now(timezone.utc).isoformat(timespec="seconds") db.execute( "INSERT INTO prices VALUES (?, ?, ?, ?, ?, ?)", (item["name"], source, now, price, title, link), ) db.commit() reasons = [] if prev: avg = sum(prev) / len(prev) if price <= avg * (1 - DROP): reasons.append(f"{(1 - price / avg):.0%} below the recent average of {avg:.2f}") if price <= item["target"]: reasons.append(f"at or below your target of {item['target']}") return reasons ``` The [sqlite3 module documentation](https://docs.python.org/3/library/sqlite3.html) covers the `?` placeholders used here. Using them instead of string formatting keeps product names from breaking the query. ### Step 6: Run the loop with a spending guard The main function walks the watchlist, calls both sources per product, and prints an alert for every drop. It stops early in two cases: the balance in `X-Credits-Remaining` falls below `CREDIT_FLOOR`, or the API returns `insufficient_credits` (402). The service is prepaid and there is no automatic top-up, so running out stops the tracker rather than billing you further. ```python def alert(item, source, hit, reasons): price, title, link = hit print(f"DROP {item['name']} [{source}] {price:.2f}: {'; '.join(reasons)}") print(f" {title}\n {link}") # Send to Slack, email or a webhook here. def run(): with open("watchlist.json") as f: items = json.load(f) db = open_db() for item in items: for source, fetch in (("google-shopping", google_lowest), ("ebay", ebay_lowest)): if state["remaining"] is not None and state["remaining"] < CREDIT_FLOOR: print(f"Stopping: {state['remaining']} credits left") return try: hit = fetch(item) except requests.Timeout: # The call may have succeeded and been billed; skip it this run. print(f"timeout: {item['name']} [{source}]") continue except requests.HTTPError as e: body = e.response.json().get("error", {}) print(f"{e.response.status_code} {body.get('code')}: {item['name']} [{source}]") if e.response.status_code == 402: return continue finally: time.sleep(PAUSE) if hit is None: print(f"no match: {item['name']} [{source}]") continue reasons = record_and_check(db, item, source, hit) if reasons: alert(item, source, hit, reasons) print(f"Done. Credits remaining: {state['remaining']}") if __name__ == "__main__": run() ``` Run it once with `python tracker.py`. The first run only records a baseline, so alerts on that run come only from your `target` prices. Drops against history start on the second run. For the error codes the handler prints, see the [errors reference](https://docs.perceptlayer.com/errors). ### Step 7: Schedule it Run the script from cron, a systemd timer or any scheduler. This crontab entry runs it every six hours, which is four checks a day: ```bash 0 */6 * * * cd /opt/tracker && API_KEY=sk_live_... python tracker.py >> tracker.log 2>&1 ``` Keep the working directory fixed, because `watchlist.json` and `prices.db` are read relative to it. A scheduler that overlaps two runs would double the spend, so keep the interval longer than a run takes. ## How many credits will it use a month? Each product costs one Google Shopping call and one eBay call per run, so credits a month equal products × 2 × runs a day × 30. Failed calls cost nothing, so retries after a 429 or 503 do not add to the total. The figures below are credits only; [pricing](https://perceptlayer.com/pricing) shows what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) explain how debits work. | Products | Runs a day | Arithmetic | Credits a month | Fits in | | --- | --- | --- | --- | --- | | 10 | 1 | 10 × 2 × 1 × 30 | 600 | The Starter pack's 10,000; the 100 free credits cover the first 5 days | | 25 | 4 | 25 × 2 × 4 × 30 | 6,000 | The Starter pack's 10,000 | | 100 | 4 | 100 × 2 × 4 × 30 | 24,000 | The Build pack's 50,000, about two months | Purchased credits last 12 months, so a pack that outlives one month of tracking is not wasted. Two levers cut the bill. Check slow-moving products less often, and drop a source for products where one source gives no matches. If you want a hard ceiling, the pattern in [AI agent API cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs) shows how to cap spend per run, and the `CREDIT_FLOOR` guard above is the simplest version of it. ## How do you keep a price tracker reliable? Three problems cause most bad alerts: a wrong match, a duplicate charge and a silent stop. A wrong match is a filter problem, fixed by tightening `must_include`, `exclude` and `min_price` after reading what the first runs matched. A duplicate charge comes from retrying a call whose reply was lost. A silent stop comes from an empty balance or a scheduler that stopped running. Requests have no idempotency key. A request whose reply was lost, such as a client timeout, may have succeeded and been billed. That is why the script skips a timed-out check instead of repeating it; one missed reading costs less than a doubled one. [AI agent API cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs) covers spend limits that work alongside this. For a silent stop, check the last line of `tracker.log` or alert when no new rows land in `prices` for a day. Data is returned as found at the time of the call, so a price you read is a price that was listed then, not a guarantee that the item is in stock now. Treat an alert as a prompt to open the link. ## Where does an LLM fit in a price tracking agent? The scheduled loop does not need a model, and leaving one out keeps each run at exactly 2 credits per product with no token cost. A model earns its place at the edges: turning "watch the cheapest 128GB iPhone 15 under 400" into a watchlist entry, or explaining a drop in plain language when you ask for it. For that, give the model the same data over MCP. The Perceptlayer MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`; the first two only look up the catalogue and cost nothing, while `call_endpoint` spends credits on success only. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup, and [MCP vs Function Calling for Live Web Data in Agents](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) helps you pick between that and a tool you write yourself. For a Python tool wrapper, see the [LangChain custom tool tutorial](https://perceptlayer.com/blog/langchain-custom-tool-web-data). Next step: [get a free API key](https://perceptlayer.com/signup), run one call from each endpoint in the playground on the [Google Shopping](https://perceptlayer.com/apis/google-shopping) and [eBay](https://perceptlayer.com/apis/ebay) pages, then export your key as `API_KEY` and run `tracker.py` on your own watchlist. ## APIs in this post - [Google Shopping **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/google-shopping) - [eBay **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/ebay) ## Frequently asked questions ### How much does it cost to track one product? Each run costs 2 credits per product, one for the Google Shopping search and one for the eBay search. Tracking one product four times a day for 30 days is 1 × 2 × 4 × 30 = 240 credits. Failed calls cost nothing and return `X-Credits-Used: 0`. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Can I track only one of the two sources? Yes. Remove the source you don't need from the tuple in `run()`, and the cost halves to 1 credit per product per run. Google Shopping suits retail prices across sellers. eBay suits marketplace listing prices. Many watchlists need only one, so start with one and add the other if matches are poor. ### What happens when I run out of credits? The service is prepaid, with no automatic top-up. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. The script exits on a 402, and `CREDIT_FLOOR` stops it earlier, at a balance you choose, using the `X-Credits-Remaining` header from each response. ### How fast can the tracker call the API? Limits are per account and counted per minute. Free accounts get 1 request a second (60 a minute), which the default one-second `PAUSE` respects. Paying accounts run at least 5 requests a second (300 a minute). A 429 response carries `Retry-After`, and the client waits that many seconds before retrying. ### Why does the tracker sometimes match the wrong product? Search returns whatever matches the query, including accessories and other models. The title filter, the `exclude` words and `min_price` are what keep those out, so tune them per product after reading the first few runs. Read the `no match` and low-price lines in the log, and tighten the rules until the matched titles are the product you mean. price tracking python ai agents google shopping ebay ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 3 Oct 2026 Perceptlayer 8 min read ## [Trim API Responses for LLM Context: Fewer Tokens per Call](https://perceptlayer.com/blog/trim-api-responses-llm-context) Cut a Google Shopping response from 1,358 to 422 characters by keeping 8 fields. Python code, a measured before and after, and 1 credit per call. --- title: "Google People Also Ask API: Related Questions as JSON" description: "Get Google's People Also Ask questions as JSON from a search or the related-questions endpoint, page with next_page_token, and cost a question tree in credits." url: https://perceptlayer.com/blog/google-people-also-ask-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google People Also Ask API: Related Questions as JSON 11 Sept 2026 Perceptlayer 6 min read Google has no API for People Also Ask. You can get them as JSON two ways: every `GET /v1/google-search/search` response includes a `related_questions` array, and `GET /v1/google-related-questions/related-questions` returns only the questions for a query `q`. Both cost 1 credit per successful call. Each question carries a `next_page_token` you pass back to fetch more. ## Key takeaways - A Google search for `best restaurants in Berlin` returned three People Also Ask questions in `related_questions`, next to the organic results, for the same 1 credit. - The related-questions endpoint takes `q` (up to 2,048 characters), `hl`, `gl` and `next_page_token`, and returns `query` plus `related_questions`. - In both recorded responses, all three questions carry the same `next_page_token`, so the token continues the query's question list. It doesn't open one question. - To go deeper on one question, send it as a new `q`. A two-level tree with three questions per level is 1 + 3 = 4 calls, 4 credits, per seed keyword. - Failed calls cost nothing, and the 100 free credits on signup cover 25 seed keywords at that depth. ## Is there an official People Also Ask API? No. Google doesn't offer an API for the People Also Ask box. Its general web search API is the Custom Search JSON API, and Google's own overview of it now says it is closed to new customers and that existing customers have until January 1, 2027 to move to an alternative ( [Google for Developers](https://developers.google.com/custom-search/v1/overview), 2026). For searching up to 50 domains, Google points to Vertex AI Search; for full web search it asks you to contact it. So People Also Ask data comes from the results page itself. The [Google Related Questions API](https://perceptlayer.com/apis/google-related-questions) returns the questions alone, and the [Google Search API](https://perceptlayer.com/apis/google-search) returns them with the rest of the page. Data is collected from publicly available sources and returned as found at the time of the call, and the questions change by query, language, country and day. ## Where do related questions appear in a search response? In the `related_questions` array of every `GET /v1/google-search/search` response that has a People Also Ask box. It sits next to `organic_results`, `related_searches` and `people_also_search_for`, so if you already run searches for rank tracking, you have the questions at no extra cost. This is the request behind the recorded response: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` And the part of the response that matters here, trimmed with `…`: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": […], "related_searches": [ { "query": "Best restaurants in Berlin for tourists", … }, { "query": "Best affordable restaurants in Berlin", … } ], "related_questions": [ { "question": "What is the coolest restaurant in Berlin?", "next_page_token": "fc=EqEBCmJBSmlUNHRMWjV0cUtnRWF3THBmd2poWERESG9Zd1NDdjV1eVBaTnlyQUpwWHptbXpvWEl3cEcteUc4clBmTmM2RmVqZ3gxeFBSR2Q2YnhWUXRYTV9fbU9TZ25Oa3RSM2JJQRIXZlBEYWFyWDFHc1RtN…" }, { "question": "What is famous to eat in Berlin?", "next_page_token": "fc=EqEBCmJBSmlUNHRMWjV0cUtnRWF3THBmd2poWERESG9Zd1NDdjV1eVBaTnlyQUpwWHptbXpvWEl3cEcteUc4clBmTmM2RmVqZ3gxeFBSR2Q2YnhWUXRYTV9fbU9TZ25Oa3RSM2JJQRIXZlBEYWFyWDFHc1RtN…" }, … ], … } ``` The third question in the recording is "Where is the best place to eat in Berlin?". Note what's absent: the response holds the questions, not the answers Google shows when you expand one. Google's documentation says featured snippets can appear inside a related questions group, also known as People Also Ask ( [Google Search Central](https://developers.google.com/search/docs/appearance/featured-snippets), 2026). If you need answer text and sources for a question, search the question itself and read its results. ## How do you call the related-questions endpoint? Send the query as `q` to `GET /v1/google-related-questions/related-questions`, with `hl` for language and `gl` for country. The response is small: the `query` and its `related_questions`, each with `question` and `next_page_token`. Use it when you want only the questions and not a full results page. This is the request behind the second recording: ```bash curl "https://api.perceptlayer.com/v1/google-related-questions/related-questions?q=how+does+espresso+work&hl=en&gl=us" \ -H "X-API-Key: $API_KEY" ``` ```json { "query": "how does espresso work", "related_questions": [ { "question": "Is espresso stronger than regular coffee?", "next_page_token": "fc=EqEBCmJBSmlUNHRKd1EwVllFZ2xFZ3loS2xCYmtYVEszbTQ2NEVzcDZvbExoOUltSDNaYkhpdEp5T1EyN3J0Z1pnMVA0STF3YUZ0ODV3LVQxRlBERkZTWFlpRVhSTmJLd2x1YWhvZxIXVHNuYmFxN3JIZGZoN…" }, { "question": "Do you sip or chug an espresso?", "next_page_token": "fc=EqEBCmJBSmlUNHRKd1EwVll…" }, { "question": "Is an espresso 1 or 2 shots?", "next_page_token": "fc=EqEBCmJBSmlUNHRKd1EwVll…" } ] } ``` All four parameters are optional in the endpoint definition, but you need either `q` or a `next_page_token` for the call to mean anything. Keys go in the `X-API-Key` header; [get a free API key](https://perceptlayer.com/signup) and see the [authentication docs](https://docs.perceptlayer.com/authentication). | Parameter | Type | Notes | | --- | --- | --- | | `q` | string | The query, up to 2,048 characters | | `next_page_token` | string | From a previous response, up to 8,192 characters | | `hl` | string | Language, 2 characters, such as `en` | | `gl` | string | Country, 2 characters, such as `us` | ## What does next\_page\_token actually do? It continues the question list for the query you asked, not for one question. In both recorded responses, the Berlin search and the espresso call, every question carries an identical `next_page_token`. A token that's the same for all three questions can't point at one of them, so treat it as a page cursor: pass it back to the related-questions endpoint to ask for the next batch of questions for the same query. ```bash curl -G "https://api.perceptlayer.com/v1/google-related-questions/related-questions" \ --data-urlencode "next_page_token=$TOKEN" \ -d hl=en -d gl=us \ -H "X-API-Key: $API_KEY" ``` Tokens run up to 8,192 characters and contain characters such as `=`, so URL-encode them, as `--data-urlencode` does here. We haven't recorded a token follow-up, so check what comes back in the playground on the [related-questions endpoint page](https://perceptlayer.com/apis/google-related-questions/related-questions) before you build a loop that depends on its shape. To go deeper on a particular question, which is what most keyword research needs, send that question as a new `q`. Its own related questions are the next level of the tree. ## How do you build a question tree for a keyword? Start from a seed keyword, collect its questions, then call the endpoint again with each question as `q`, down to a fixed depth. Keep a set of questions you've already seen, because related questions repeat across branches, and a credit cap so the tree can't grow past your budget. This script does a breadth-first walk and stops at either limit: ```python import os import requests URL = "https://api.perceptlayer.com/v1/google-related-questions/related-questions" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def question_tree(seed, max_depth=2, max_calls=20): seen, edges, calls = {seed.lower()}, [], 0 level = [seed] for depth in range(max_depth): next_level = [] for q in level: if calls >= max_calls: return edges, calls r = requests.get(URL, params={"q": q, "hl": "en", "gl": "us"}, headers=HEADERS, timeout=60) if r.status_code != 200: print("skip", q, r.json()["error"]["code"]) continue calls += int(r.headers.get("X-Credits-Used", "0")) for item in r.json().get("related_questions", []): text = item["question"] if text.lower() not in seen: seen.add(text.lower()) edges.append((q, text, depth + 1)) next_level.append(text) level = next_level return edges, calls edges, credits = question_tree("how does espresso work") for parent, child, depth in edges: print(depth, child, "<-", parent) print("credits used:", credits) ``` We haven't run this script live for this article. The counter adds `X-Credits-Used` from each response, so a failed call adds 0 and the total matches what your balance shows. The [credits docs](https://docs.perceptlayer.com/credits) explain that header and `X-Credits-Remaining`. ## What does it cost per keyword? Each successful call to either endpoint is 1 credit, so the cost is the number of calls. If you already search the keyword for rankings, its first level of questions is free. Otherwise it's 1 call. Each question you expand is one more call. With three questions per response, as in both recordings: | Depth | Calls | Credits per seed | 200 seeds | | --- | --- | --- | --- | | Level 1 only | 1 | 1 | 200 | | Level 1, then expand its 3 questions | 1 + 3 = 4 | 4 | 800 | | Three levels, 3 questions each | 1 + 3 + 9 = 13 | 13 | 2,600 | Each level multiplies the calls by the number of questions, so cap the depth or the calls. The 100 free credits on signup cover two levels for 25 seeds (25 × 4 = 100). Two levels for 200 seeds, 800 credits, and three levels at 2,600 credits both fit in a Starter pack of 10,000. Deduplication only lowers these numbers. The [pricing page](https://perceptlayer.com/pricing) has what packs cost. For tracking how a keyword's questions change over time alongside rankings, the guide to [SERP data for SEO monitoring](https://perceptlayer.com/blog/search-result-data-seo-monitoring) stores them per day. To try the endpoint, run your own keyword in the playground on the [Google Related Questions API page](https://perceptlayer.com/apis/google-related-questions). ## APIs in this post - [Google Related Questions **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/google-related-questions) - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How much does a People Also Ask lookup cost? One credit per successful call to either endpoint. A seed keyword plus its three questions expanded one level is 4 credits, and the questions inside a search you already run for rankings cost nothing extra. Failed calls cost nothing. Every verified account gets 100 free credits on signup, and the [pricing page](https://perceptlayer.com/pricing) has what packs cost. ### Does the API return the answers to the questions? No. The recorded responses contain each `question` and a `next_page_token`, not the answer text or its source link that Google shows when you expand a question. To see what Google returns for a question, search it with `/v1/google-search/search` and read the organic results, which is one more credit. ### Can I get People Also Ask for another country or language? Yes. Set `gl` to a 2-character country code and `hl` to a 2-character language code, such as `gl=de` and `hl=de` for Germany in German. Questions differ by market, so store the `gl` and `hl` you used with every row, or you won't be able to compare runs later. ### How many questions come back per call? Both recorded responses have three questions, but nothing in the endpoint definition fixes that number, and it varies with the query. Don't hard-code it; read the length of `related_questions`. Not every query shows a People Also Ask box, so handle an empty or missing array. ### Is it allowed to use People Also Ask data? The questions are what Google shows publicly on a results page, and most teams use them for content planning and keyword research. Whether a particular use is allowed depends on Google's terms and the law where you operate. Perceptlayer returns the data as found at the time of the call and can't give legal advice. people also ask google seo keyword research related questions ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 7 min read ## [Rank Tracking API: Track Google Positions as JSON](https://perceptlayer.com/blog/rank-tracking-api) Build a daily rank check from one Google search call per keyword and location: read organic\_results position and link, store them, 1 credit a check. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 8 min read ## [Scrape Google Search Results with Python](https://perceptlayer.com/blog/scrape-google-search-results-python) Get Google results in Python as JSON: organic\_results, related\_questions and related\_searches from one call to /v1/google-search/search, at 1 credit a page. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Oct 2026 Perceptlayer 7 min read ## [SERP API: What It Returns and What a Query Costs](https://perceptlayer.com/blog/serp-api-explained) A SERP API returns a results page as JSON: organic results, People also ask, related searches, local results. Real responses from 3 engines, 1 credit each. --- title: "Google Play Store API: App Reviews and Details as JSON" description: "Get Google Play app reviews, details and search results as JSON with one GET call. Parameters, a recorded Spotify response and 1 credit per call." url: https://perceptlayer.com/blog/google-play-store-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Play Store API: App Reviews and Details as JSON 11 Sept 2026 Updated 10 Nov 2026 Perceptlayer 6 min read To get Google Play data for any public app as JSON, call `GET /v1/google-play/product-reviews` with the app's package name as `product_id`. The response carries the app's metadata, rating counts and a list of reviews. Search and details have their own endpoints, and every successful call costs 1 credit. ## Key takeaways - Google's own Play Developer API manages apps you publish. It isn't a way to read any app's public listing or reviews. - `GET /v1/google-play/product-reviews?product_id=com.spotify.music&store=apps&num=20` returns app info, rating counts and reviews in one response. - `GET /v1/google-play/search` needs only `q`; `GET /v1/google-play/details` takes the same app identifiers as the reviews endpoint. - Each call costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. - The `pagination.next_page_token` field in the response is what you use to continue a reviews list. ## Does Google have an official Play Store API? Yes, but it is built for publishers. The [Google Play Developer API](https://developers.google.com/android-publisher) covers subscriptions and in-app purchases, plus publishing tasks like uploading apps and managing store listings. Its [Reply to Reviews API](https://developers.google.com/android-publisher/reply-to-reviews) lets you retrieve and reply to reviews of your app, not of apps you don't own. If you're a developer reading and answering your own reviews, use the official API: it's the right tool and it's authorised for your account. If you want reviews, ratings or listing details for apps you don't publish (competitors, a category, a portfolio you track), you need a different route. That is what the [Google Play API](https://perceptlayer.com/apis/google-play) here does: it takes a package name or a search term and returns the public store data as JSON. Data is collected from publicly available sources and returned as found at the time of the call. ## What does the Google Play API give you? The Google Play API has 14 endpoints, all `GET`, all 1 credit. Reviews and app data live behind product endpoints that share one parameter set. Search is separate and only needs a query. The catalogue spans 480 websites and 2,782 endpoints, and this is one of them, listed under [Apps and media](https://perceptlayer.com/verticals/apps). | Endpoint | Returns | Credits | | --- | --- | --- | | `/v1/google-play/product-reviews` | Product Reviews | 1 | | `/v1/google-play/details` | Details | 1 | | `/v1/google-play/product` | Product | 1 | | `/v1/google-play/apps-product` | Apps Product | 1 | | `/v1/google-play/books-product` | Books Product | 1 | | `/v1/google-play/movies-product` | Movies Product | 1 | | `/v1/google-play/tv-product` | Tv Product | 1 | | `/v1/google-play/audiobooks-product` | Audiobooks Product | 1 | | `/v1/google-play/search` | Search | 1 | Each has its own page: [Product Reviews](https://perceptlayer.com/apis/google-play/product-reviews), [Details](https://perceptlayer.com/apis/google-play/details), [Search](https://perceptlayer.com/apis/google-play/search), [Apps Product](https://perceptlayer.com/apis/google-play/apps-product), and the books, movies and audiobooks pages. The `store` parameter takes `apps`, `movies`, `tv`, `books` or `audiobooks` on the product endpoints, so one parameter set covers more than Android apps. ## How do you get the reviews for an app? Send the app's package name as `product_id` to the product-reviews endpoint. The package name is the `id=` value in the app's Play Store URL, such as `com.spotify.music`. Authenticate with your key in the `X-API-Key` header, as described in the [authentication docs](https://docs.perceptlayer.com/authentication). ```bash curl "https://api.perceptlayer.com/v1/google-play/product-reviews?product_id=com.spotify.music&store=apps&num=20" \ -H "X-API-Key: $API_KEY" ``` You don't have a key yet? [Get a free API key](https://perceptlayer.com/signup): every account gets 100 free credits after verifying an email address, with no credit card. ### What does the response look like? The response is one JSON object. The top-level keys we recorded for Spotify include `search_parameters`, `app`, `product_info`, `about_this_app`, `categories`, `data_safety`, `ratings`, `reviews`, `similar_results` and `pagination`. Here is the start of the recorded response, trimmed: ```json { "search_parameters": { "engine": "google_play_product_reviews", "product_id": "com.spotify.music", "store": "apps", "hl": "en", "gl": "US", "num": 20 }, "app": { "app_id": "com.spotify.music", "title": "Spotify: Music and Podcasts", "developer": "Spotify AB", "url": "https://play.google.com/store/apps/details?id=com.spotify.music&hl=en&gl=US" }, "product_info": { "title": "Spotify: Music and Podcasts", "rating": 4.3, "reviews": 36524909, "downloads": "1B+", "product_id": "com.spotify.music" }, … } ``` The `product_info` block holds the headline numbers: `rating`, `reviews` (the review count) and `downloads`. `about_this_app` adds `released_on`, `updated_on` and `in_app_purchases`. ### How are ratings and individual reviews returned? The `ratings` array holds a star level and a `count` per entry, and `reviews` holds one object per review. This is the shape of a review in the recording, trimmed to the fields that matter for analysis: ```json "ratings": [ { "stars": 1, "count": 3717244 }, { "stars": 2, "count": 1064474 } ], "reviews": [ { "id": "6b8cd845-6fcd-4296-b05e-9e1b3feada62", "rating": 1, "snippet": "Spotify has a new, horrendous feature where the ending to the song that you are listening to gets cut off by the middle of the next song. …", "likes": 491, "date": "September 15, 2026", "iso_date": "2026-09-15T22:20:33Z" }, … ] ``` Each review has an `id`, a star `rating`, a `snippet`, a `likes` count and both a display `date` and an `iso_date`. Reviews also carry reviewer profile fields; if you store reviews, think about whether you need them. For sentiment or product research you usually don't. ## Which parameters does the reviews endpoint take? The product-reviews endpoint has no required parameters, but you identify the app with `product_id`, `id` or `url`. The rest narrow the reviews by rating, platform and sort order, and set the language and country. The parameter set is shared with the other product endpoints. | Parameter | Type | Notes | | --- | --- | --- | | `product_id` | string | Up to 255 characters, e.g. `com.spotify.music` | | `id` | string | Up to 255 characters | | `url` | string | Up to 1000 characters | | `store` | string | One of `apps`, `movies`, `tv`, `books`, `audiobooks` | | `hl` | string | Language, up to 10 characters | | `gl` | string | Country, up to 2 characters | | `rating` | string | One of `1`, `2`, `3`, `4`, `5` | | `platform` | string | One of `phone`, `tablet`, `tv`, `chromebook`, `watch`, `car` | | `sort_by` | string | One of `1`, `2`, `3`, `most_relevant`, `newest`, `rating` | | `num` | integer | Number of reviews to ask for | | `all_reviews` | boolean | Optional flag | | `season_id` | string | Up to 255 characters | | `next_page_token` | string | Up to 1000 characters | A request for only the one-star reviews, newest first: ```bash curl "https://api.perceptlayer.com/v1/google-play/product-reviews?product_id=com.spotify.music&store=apps&rating=1&sort_by=newest&num=20" \ -H "X-API-Key: $API_KEY" ``` To read more than one page, take `pagination.next_page_token` from the response and send it back as `next_page_token`. The [pagination guide](https://perceptlayer.com/blog/paginate-web-data-api-python) shows a safe loop that stops when the token is missing. ## How do you search the Play Store and fetch app details? For discovery, use `GET /v1/google-play/search`. It has one required parameter, `q` (up to 200 characters), and optional `store`, `hl`, `gl` and `price`. The `store` values here are `apps`, `movies`, `books` or `games`; `price` takes `1` or `2`. Details uses the same identifiers as the reviews endpoint. ```bash curl "https://api.perceptlayer.com/v1/google-play/search?q=chess&store=apps" \ -H "X-API-Key: $API_KEY" ``` ```bash curl "https://api.perceptlayer.com/v1/google-play/details?product_id=com.spotify.music&store=apps&hl=en&gl=US" \ -H "X-API-Key: $API_KEY" ``` A common flow is search first, then details or reviews for each package name you want to track. You can try both from the playground on the [Google Play API page](https://perceptlayer.com/apis/google-play) without writing code. For the exact fields on search and details, run a call there; we only quote fields from the recorded reviews response above. ## What does each call cost? Every Google Play endpoint costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`; each successful response carries `X-Credits-Used` and `X-Credits-Remaining` so you can track the balance. See [credits](https://docs.perceptlayer.com/credits) for the details. Worked example: tracking 100 apps with one details call and one reviews call each, every day for 30 days, is 100 × 2 × 30 = 6,000 calls = 6,000 credits. That fits inside the Starter pack's 10,000 credits, and the 100 free credits you get once on signup cover the first 100 of them. | Pack | Credits | | --- | --- | | Starter | 10,000 | | Build | 50,000 | | Growth | 200,000 | | Pro | 500,000 | | Scale | 1,000,000 | | Volume | 5,000,000 | Purchased credits last 12 months, with no subscription and no seats. The [pricing page](https://perceptlayer.com/pricing) shows what each pack costs. ## What can go wrong? Errors come back as an HTTP status with a JSON body `{"error": {"code", "message", "request_id"}}`. The ones you'll most likely meet are `invalid_api_key` (401), `insufficient_credits` (402), `invalid_parameters` (422) and `rate_limited` (429). Rate-limited and temporarily unavailable responses include a `Retry-After` header with the seconds to wait. One caveat: requests have no idempotency key. If a client timeout loses the reply, the call may have succeeded and been billed, so don't blindly retry in a tight loop. The [errors docs](https://docs.perceptlayer.com/errors) and [rate limits](https://docs.perceptlayer.com/rate-limits) list every code, and [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers the pattern. If you build a reviews pipeline that runs daily, cache details responses you don't need fresh; [Cache API Responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses) shows how to save credits. Next step: [get a free API key](https://perceptlayer.com/signup), then run the Spotify reviews call above in the playground. For the same pattern on another source, see the [Google Maps reviews API guide](https://perceptlayer.com/blog/google-maps-reviews-api-parameters). ## APIs in this post - [Google Play **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/google-play) ## Frequently asked questions ### Is there an official Google Play Store API for reading app reviews? Google's Play Developer API includes a Reply to Reviews API that lets you retrieve and reply to reviews of your own app. It is for publishers. To read reviews of apps you don't publish, you need a data API such as the Google Play endpoints described here. ### How much does the Google Play API cost per call? Every Google Play endpoint costs 1 credit per successful call, so 1,000 calls × 1 credit = 1,000 credits. Failed calls cost nothing. New accounts get 100 free credits once, after verifying an email address, and the [pricing page](https://perceptlayer.com/pricing) shows what credit packs cost. ### Can I use the app URL instead of the package name? The endpoints accept a `url` parameter (up to 1000 characters) as well as `product_id` and `id`. The package name is the shortest route and is what the recorded response echoes back as `product_id`. Use whichever identifier you already store. ### Can an AI agent call the Google Play endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. Searching and inspecting endpoints costs nothing; `call_endpoint` spends the endpoint's credits on success only. See the [MCP docs](https://docs.perceptlayer.com/ai-agents). google play app reviews app store data android apps ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 29 Oct 2026 Perceptlayer 8 min read ## [Google Play Scraper or API: Reviews and App Data](https://perceptlayer.com/blog/google-play-scraper-vs-api) A Google Play scraper vs one 1-credit call: the recorded Spotify reviews response with rating, likes, iso\_date, a star histogram and a page token. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. --- title: "Handle Web Data API Errors in Python: 4xx, 5xx and Timeouts" description: "Map the API's error codes to retry, fix or stop in Python: 429 and 503 honour Retry-After, 4xx stops, and failed calls cost 0 credits." url: https://perceptlayer.com/blog/handle-web-data-api-errors-python --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Handle Web Data API Errors in Python: 4xx, 5xx and Timeouts 9 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read Sort every failed response into one of three actions. Retry `429`, `503` and `502` with a wait. Fix the request on `401`, `403`, `404` and `422`. Stop the job on `402`. Timeouts are the odd case: they carry no status code, and the call may have succeeded. This guide gives you the mapping and a Python function with the `requests` library that applies it. ## Key takeaways - Every error returns an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. Branch on the code, not the message. - `429` and `503` carry a `Retry-After` header in seconds. Wait that long, then retry. - Failed calls cost nothing and return `X-Credits-Used: 0`. A client-side timeout is the exception to plan for, because the call may have been billed. - `invalid_parameters` (422), `invalid_api_key` (401) and `not_found` (404) never fix themselves. Retrying them wastes time and rate limit. - `insufficient_credits` (402) means the prepaid balance is empty. Nothing tops it up automatically, so stop the job. ## Which API errors should you retry, fix or stop on? Going by the code names, retry the ones about the moment ( `rate_limited`, `temporarily_unavailable`, `source_error`). Fix the ones about your request ( `invalid_api_key`, `restricted_endpoint`, `not_found`, `invalid_parameters`). Stop on the one about your account ( `insufficient_credits`). The table adds the action we recommend to each code, and every row costs 0 credits. For what each code covers, see [Errors](https://docs.perceptlayer.com/errors) in the docs. | Status | `error.code` | Action | | --- | --- | --- | | 401 | `invalid_api_key` | Fix: check `X-API-Key` | | 402 | `insufficient_credits` | Stop: the prepaid balance is empty, so buy credits, then rerun | | 403 | `restricted_endpoint` | Fix: accept the restricted-endpoint terms in the dashboard | | 404 | `not_found` | Fix: check the path | | 422 | `invalid_parameters` | Fix: check the parameters | | 429 | `rate_limited` | Retry after `Retry-After` seconds (limits are counted per minute) | | 502 | `source_error` | Retry with backoff, capped | | 503 | `temporarily_unavailable` | Retry after `Retry-After` seconds | The 502 row has no documented `Retry-After`, so the code below falls back to exponential backoff with jitter. Any other 5xx isn't on the documented list. Treating it as retryable with a hard cap is our policy, not a documented behaviour, and the cap is what keeps that safe. ## How do you call the endpoint and read the response? Send the key in the `X-API-Key` header and the parameters in the query string. The examples use the [Google Search API](https://perceptlayer.com/apis/google-search) `search` endpoint, which costs 1 credit per successful call. The same pattern works for any of the 2,782 endpoints across 480 websites, because every error uses the same body shape. ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` These are the parameters that matter for error handling. `query` is the only required one. Check your values against the documented limits before you send them. The full list is on the [Search endpoint page](https://perceptlayer.com/apis/google-search/search). | Parameter | Type | Required | Documented limit | | --- | --- | --- | --- | | `query` | string | yes | none stated | | `hl` | string | no | up to 2 characters | | `gl` | string | no | up to 2 characters | | `safe` | string | no | `active` or `off` | | `device` | string | no | `desktop`, `tablet` or `mobile` | | `page` | integer | no | none stated | A successful call returns JSON with named fields. This is an excerpt of a recorded response for the request above: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", … } ], … } ``` To see an error on purpose, send a wrong key with `curl -i`. Read the status and the `error.code`, and check the headers: errors carry `X-Credits-Remaining`, and failed calls return `X-Credits-Used: 0`. The `-i` flag prints the headers, which is where `Retry-After` and the `RateLimit-*` values also show up. ## How do you write the retry loop in Python? Write one function that every call goes through. It raises a custom exception for errors you must fix or stop on, retries the rest a fixed number of times, and sleeps for `Retry-After` when the header is there. It sets a timeout on every call, because `requests` waits forever without one ( [Requests documentation](https://requests.readthedocs.io/en/latest/user/advanced/#timeouts)). ```python import logging import os import random import time import requests BASE_URL = "https://api.perceptlayer.com" RETRY_CODES = {"rate_limited", "temporarily_unavailable", "source_error"} log = logging.getLogger("webdata") class ApiError(Exception): """A response you must fix or stop on. Retrying won't help.""" def __init__(self, status, code, message, request_id): super().__init__(f"{status} {code}: {message} (request_id={request_id})") self.status = status self.code = code self.request_id = request_id class RetriesExhausted(Exception): pass def parse_error(resp): try: err = resp.json()["error"] return err["code"], err["message"], err["request_id"] except (ValueError, KeyError, TypeError): return "unknown", "no error body", None def wait_seconds(retry_after, attempt): try: return min(float(retry_after), 60) except (TypeError, ValueError): return min(2 ** attempt, 30) + random.random() def call(path, params, attempts=4, timeout=(5, 30)): headers = {"X-API-Key": os.environ["API_KEY"]} for attempt in range(1, attempts + 1): retry_after = None try: resp = requests.get( BASE_URL + path, params=params, headers=headers, timeout=timeout ) except requests.exceptions.ReadTimeout: # The request was sent. It may have succeeded and been billed. reason = "read timeout" except requests.exceptions.ConnectionError: # Includes connect timeouts: the request never reached the API. reason = "connection failed" else: if resp.ok: if resp.headers.get("RateLimit-Remaining") == "0": time.sleep(float(resp.headers.get("RateLimit-Reset", 1))) return resp.json() code, message, request_id = parse_error(resp) if code not in RETRY_CODES and resp.status_code < 500: raise ApiError(resp.status_code, code, message, request_id) reason = f"{resp.status_code} {code} (request_id={request_id})" retry_after = resp.headers.get("Retry-After") log.warning("attempt %d of %d failed: %s", attempt, attempts, reason) if attempt < attempts: time.sleep(wait_seconds(retry_after, attempt)) raise RetriesExhausted(f"gave up after {attempts} attempts: {reason}") ``` The function never logs a response body, only the status, code and `request_id`. Keep the `request_id`: it's what you quote if you ask for help with a specific failure. Here's how a caller uses it: ```python try: data = call( "/v1/google-search/search", {"query": "best restaurants in Berlin", "hl": "en", "safe": "off"}, ) print(data["search_information"]["organic_results_count"]) except ApiError as err: if err.code == "insufficient_credits": raise SystemExit("Out of credits. Buy a pack, then rerun.") print(f"Fix the request: {err}") except RetriesExhausted as err: print(f"Still failing, try again later: {err}") ``` ### Why not just use urllib3's Retry? You can. `requests` sits on urllib3, and its [`Retry` class](https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html#urllib3.util.Retry) mounts on a session with `status_forcelist` and `respect_retry_after_header`. It can't read `error.code` from the body or log the `request_id`. If you only need retries, use `Retry`. For the mapping above, the explicit loop is a few dozen lines. ## How do you handle timeouts without paying twice? A connect timeout is safe to retry because the request never reached the API. A read timeout isn't: the API may have finished the call and billed it, and your client just never saw the reply. Requests have no idempotency key, so the API can't tell a retry from a new call. Set both timeouts, retry with a cap, and accept that a retry after a read timeout can cost one extra credit. The tuple `timeout=(5, 30)` in the code above means 5 seconds to connect and 30 to read. Pick the read value from what you see in your own traffic, then add headroom. Too tight and you turn slow successes into duplicate charges. Too loose and a stuck call holds a worker. Two habits keep the extra credits small. Cap attempts: four attempts means at most three retries. And log read timeouts separately, because a rising count tells you the timeout is too tight. If you need to reconcile, `X-Credits-Remaining` reports the balance after each call. For a deeper look at deduplicating retries, read [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice). Caching results you've already paid for also removes many repeat calls: see [Cache API Responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses). ## What does a failed call cost? Nothing. A successful call costs the credits shown on its endpoint, which is 1 credit for every Google Search endpoint. A failed call returns `X-Credits-Used: 0`, so a `422` typo or a `503` costs 0 credits however many times it happens. The only way to pay for a failure is the timeout case above, where the call succeeded but you never saw it. The arithmetic for a nightly job of 10,000 searches is simple: 10,000 calls × 1 credit = 10,000 credits, if every call succeeds. Retries that follow a `429` or `503` add nothing, because those attempts were never billed. Only a retry after a billed read timeout adds a credit. The docs cover [Credits](https://docs.perceptlayer.com/credits) in full, and [pricing](https://perceptlayer.com/pricing) shows what credits cost. The free tier gives you 100 credits after you verify an email address, with no credit card. That's enough to run the failure paths on purpose and watch the headers. ## How do you stay under the rate limit in the first place? Limits are per account, counted per minute and shared by all your keys. Free accounts get 1 request a second (60 a minute). Paid packs run at the rate of the credits in use, and at least 5 a second (300 a minute). Every response carries `RateLimit-Remaining` and `RateLimit-Reset`, so you can slow down before a `429` rather than after. The loop above does this in two lines: when `RateLimit-Remaining` reaches `0`, it sleeps for `RateLimit-Reset` seconds. With several workers sharing one account, each worker only pauses after it sees the zero in its own response. A shared token bucket or a semaphore is the cleaner fix at higher volumes. `Retry-After` is the standard HTTP header for this, defined in [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-retry-after). The docs have a page on [rate limits](https://docs.perceptlayer.com/rate-limits) too. If you're looping over result pages, [Paginate a Web Data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python) shows how to stop safely. Next step: [get a free API key](https://perceptlayer.com/signup), put it in `API_KEY`, and run the caller above with a bad key, a bad `hl` value and a good query. You'll see all three paths in under a minute. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Do failed API calls cost credits? No. Failed calls cost nothing and return `X-Credits-Used: 0`, along with `X-Credits-Remaining` so you can see the balance. The one case that can bill is a client timeout: if the reply was lost, the call may have succeeded and been billed, and requests have no idempotency key to prevent a duplicate. ### How long should I wait after a 429 or 503? Wait the number of seconds in the `Retry-After` header. Both `429` ( `rate_limited`) and `503` ( `temporarily_unavailable`) carry it. If the header is missing, fall back to exponential backoff with jitter and a cap, as the `wait_seconds` function does. A `502` has no documented `Retry-After`, so it uses the backoff. ### Should I retry a 422 invalid\_parameters error? No. `invalid_parameters` is about the parameters you sent, so the same request fails again. Compare them with the documented limits, such as `hl` at up to 2 characters or `safe` as `active` or `off`, and fix the value. The endpoint page lists each parameter's type and allowed values. ### What happens when insufficient\_credits (402) appears? The prepaid balance is empty. Calls return `402` and nothing more is debited. There's no automatic top-up, so the job should stop and tell a person. Purchased credits last 12 months, and the free tier adds 100 credits on signup. See [pricing](https://perceptlayer.com/pricing) for what a pack costs. ### Does the same cost rule apply through MCP? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `call_endpoint`, which spends its credits on success only and reports the credits used and remaining. A failed tool call costs nothing, as over HTTP. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover the setup. python error handling retries requests rate limits ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 27 Jul 2026 Perceptlayer 10 min read ## [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) Retry only 429, 502 and 503. Failed responses return X-Credits-Used: 0, but a timeout is the gap. The credit arithmetic, a Python loop and a balance check. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 18 Oct 2026 Perceptlayer 7 min read ## [Web Scraping with Python: Requests, Parsing and When to Stop](https://perceptlayer.com/blog/web-scraping-python-guide) A web scraping Python tutorial: requests and BeautifulSoup for a practice site, robots.txt checks, a 2-second delay, CSV output, and when an API costs less. --- title: "Product Review Data for Sentiment Analysis: What to Collect" description: "Which review fields to keep from Trustpilot, Google Play and the App Store, how to handle rating skew and duplicates, and why to drop reviewer names." url: https://perceptlayer.com/blog/product-review-data-sentiment-analysis --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Product Review Data for Sentiment Analysis: What to Collect 9 Sept 2026 Perceptlayer 11 min read For sentiment analysis, collect four things per review: the text, the star rating, the publish date and a stable review ID. Add a language tag, a verification flag and a helpful-vote count when the source has them. Drop reviewer names, avatars and usernames before anything is stored. This article compares what Trustpilot, Google Play and the Apple App Store return, from recorded responses. ## Key takeaways - Keep `text`, `rating`, a date and the source's review `id` per review; add language where the source returns it. Everything else is optional context. - Reviewer names sit in different fields per source ( `consumer.displayName`, `author`, and the Google Play review `title`). Drop them at ingestion. - Rating skew is real: the recorded Trustpilot sample for one retailer has 33,636 one-star ratings out of 49,830 (67.5%). One retailer's profile cannot be set against an app's score on another platform: the product changes along with the platform. - Deduplicate on `(source, id)` first, then on a hash of normalised text, skipping short texts. Paginated pulls overlap when new reviews arrive mid-run. - Each call costs 1 credit. If a call returned 20 reviews, 10,000 reviews would be 500 calls × 1 credit = 500 credits; check the page size of what you actually get back. ## Which review fields does a sentiment model need? A sentiment model needs the review text, a label or weak label (the star rating), a timestamp so you can chart change, and an ID so you can deduplicate and re-run. Language matters where you have it, because a classifier built for one language will misread reviews written in another, and the Trustpilot sample mixes German and English. Only Trustpilot returns a language per review in the recorded samples, so for the other two you will need a language detector. Everything else, such as images, profile links and reviewer history, adds privacy risk without improving the score. Here is how the three sources line up in the recorded responses. "Not in sample" means the field isn't in the recorded excerpt, not that it can't exist. | Need | Trustpilot ( `company-reviews`) | Google Play ( `product-reviews`) | App Store ( `product-reviews`) | | --- | --- | --- | --- | | Review ID | `reviews[].id` | `reviews[].id` | `reviews[].id` | | Rating | `rating` | `rating` | `rating` | | Text | `text` | `snippet` (unconfirmed whether full body) | `text` | | Headline | `title` | Not in sample ( `title` is the reviewer's name) | `title` | | Date | `dates.publishedDate`, `dates.experiencedDate` | `iso_date`, `date` | `date` | | Language | `language` | Not in sample ( `hl` is a request parameter) | Not in sample | | Helpful votes | `likes` | `likes` | Not in sample | | Verification | `isVerified`, `labels.verification` | Not in sample | Not in sample | | Edited flag | Not in sample | Not in sample | `is_edited` | | Reviewer identity | `consumer.*` | `title`, `avatar` | `author` | | Star histogram | `filters.reviewStatistics.ratings` | `ratings[]` | Not in sample | Two details stand out. Google Play puts the reviewer's name in a field called `title`, so a pipeline that treats `title` as a headline will index names as review text. And neither the Google Play nor the App Store excerpt has a per-review language field, so run a language detector on `text` for those two. ## What does each source return per review? Each source returns a flat list of reviews plus context about the product, and the context is often useful. Trustpilot adds a business profile and rating counts, Google Play adds app metadata and a per-star histogram, and the App Store response in the recorded sample is reviews and pagination only. Request shape differs slightly per source. ### Trustpilot [`GET /v1/trustpilot/company-reviews`](https://perceptlayer.com/apis/trustpilot/company-reviews) takes a required `company_domain` and filters such as `rating`, `verified`, `with_replies`, `date_posted`, `languages` and `sort` ( `relevance` or `recency`). ```bash curl "https://api.perceptlayer.com/v1/trustpilot/company-reviews?company_domain=amazon.com&languages=all" \ -H "X-API-Key: $API_KEY" ``` A review in the recorded response looks like this, trimmed: ```json { "id": "6adaa27868a81eadd98e9c53", "text": "Disgusting company run by disgusting and greedy people ", "rating": 1, "title": "Disgusting company run by disgusting…", "likes": 0, "source": "Organic", "dates": { "experiencedDate": "2026-10-22T00:00:00.000Z", "publishedDate": "2026-10-23T01:55:36.000Z" }, "language": "en", "isVerified": false } ``` The same object also carries a `consumer` block with a display name, image URL and country code. Keep `consumer.countryCode` if you need a coarse region; drop the rest. ### Google Play The [Google Play API](https://perceptlayer.com/apis/google-play) exposes reviews through [`GET /v1/google-play/product-reviews`](https://perceptlayer.com/apis/google-play/product-reviews), which takes an app ID in `product_id` (or `id`, or a `url`) and optional `rating`, `sort_by` ( `most_relevant`, `newest`, `rating`), `platform`, `hl`, `gl`, `num` and `next_page_token`. ```bash curl "https://api.perceptlayer.com/v1/google-play/product-reviews?product_id=com.spotify.music&store=apps&num=20" \ -H "X-API-Key: $API_KEY" ``` ```json "reviews": [ { "id": "6b8cd845-6fcd-4296-b05e-9e1b3feada62", "rating": 1, "snippet": "Spotify has a new, horrendous feature where the ending to the song that you are listening to gets cut off by the middle of the next song. I have had spotify for…", "likes": 491, "date": "September 15, 2026", "iso_date": "2026-09-15T22:20:33Z" } ] ``` I removed the `title` and `avatar` fields from that excerpt on purpose: they identify the reviewer. Check `snippet` before you score it. Both recorded snippets end in `…`, so it is unconfirmed whether `snippet` holds the full review body or a shortened preview. The recorded excerpts are trimmed for display, which makes the ending alone inconclusive. Before scoring, log the character length of each `snippet` and look at the distribution: if many values stop at a similar length or end in `…`, treat the field as truncated, don't score it as the whole review, and say so in your results. The Python script below counts these. The response also includes `product_info.rating` (4.3 in the sample) and a `ratings` array of `stars` and `count` pairs. ### Apple App Store [`GET /v1/apple-app-store/product-reviews`](https://perceptlayer.com/apis/apple-app-store) takes `product_id` and `store`, plus `country`, `num`, `offset` and `next_page_token`. There is no `rating` or sort parameter listed, so filter by rating after you collect. ```bash curl "https://api.perceptlayer.com/v1/apple-app-store/product-reviews?product_id=324684580&store=apps&num=20" \ -H "X-API-Key: $API_KEY" ``` ```json { "id": "9447841001", "title": "Stop changing the queue!!!!!", "rating": 5, "text": "Stop changing the way the queue works every single time I use this app! I swear Im this close to subscribing to apple music …", "date": "2022-12-29T14:48:34Z", "is_edited": false } ``` Note the dates. The two reviews in the recorded excerpt are from 2022 and 2024, while the Google Play sample's are from September 2026. Check the date range of what you pull before you treat a sample as "current" sentiment. For a fuller look at one source, see the [App Store reviews article](https://perceptlayer.com/blog/app-store-reviews-api), the [Google Play article](https://perceptlayer.com/blog/google-play-store-api) and the [Trustpilot article](https://perceptlayer.com/blog/trustpilot-reviews-api). ## How should you handle rating skew? Treat the star distribution as a property of the source, not of the product. In the recorded Trustpilot response for one large retailer, `ratings` shows 33,636 one-star, 3,004 two-star, 1,869 three-star, 2,423 four-star and 8,898 five-star, out of 49,830. That is 67.5% one-star and 17.9% five-star, with little in between, and the profile's `trustScore` is 1.5. The Trustpilot sample is lopsided, and I can't tell from one response why. Its recorded reviews carry a `source` of `Organic`, a `verificationSource` of `invitation`, a `verificationLevel` of `not-verified` and `isVerified` set to `false`. I'm reporting those values as recorded; the response doesn't document what they mean together, so test them against your own data rather than assuming. The Spotify sample on Google Play reads 4.3 overall ( `product_info.rating`). Setting that against the retailer's 1.5 shows nothing about platforms, because the samples differ in both product and platform and the two effects can't be separated from these responses. To compare platforms you would need the same product on both. Practical steps, tied to the fields above: 1. **Store `rating` next to `text`** and report sentiment per star level, not one blended score. 2. **Keep `verified` and `source` where they exist.** Trustpilot's `company-reviews` accepts a `verified` filter, and each review carries `isVerified` and `source`, so you can check whether your result changes when you restrict to verified reviews. 3. **Sample a fixed number of reviews per star, then reweight.** A plain newest-first pull on a skewed profile gives you mostly one-star text and very little else to learn from. The `rating` filter on Trustpilot and Google Play lets you pull each star level separately. ### A fixed-per-star sample The method: pull the same number of reviews for each of the five star levels, score each level, then weight the per-star results by the source's own star histogram so the blended number still reflects the real mix. 1. **Pull N reviews per star.** Call `company-reviews` (Trustpilot) or `product-reviews` (Google Play) once per star with `rating` set, and page until you have N. Google Play's `rating` accepts `1` to `5`. Trustpilot's `rating` is documented only as a string with no listed values, so test `rating=1` first and check that `filters.totalNumberOfFilteredReviews` in the response drops below the unfiltered total before you rely on it. 2. **Read the true mix from the histogram.** Trustpilot returns it in `filters.reviewStatistics.ratings` ( `one` to `five`); Google Play returns `ratings[]` as `stars` and `count` pairs. In the recorded Trustpilot response that is 33,636 of 49,830 for one star, which gives the weights. 3. **Score each star's sample separately**, then compute the weighted average: each star's mean score times that star's share of the histogram. The App Store has no `rating` filter in its parameter list, so for that source collect the pages you need and split by `rating` afterwards. Cost is calls × 1 credit. Assume 20 reviews per call (the recorded Trustpilot response reports `perPage` as 20; the Google Play request asked for `num=20`, and page sizes aren't documented, so measure yours). Then N = 100 reviews per star is 5 calls per star, 25 calls for five stars, so 25 credits per source. Doing it on Trustpilot and Google Play is 50 credits. If a star level has fewer than N reviews, you get fewer and the cost drops. Keep in mind that a 100-review sample per star is small, so treat the per-star scores as rough and raise N if the weighted result changes a decision. ## How do you deduplicate reviews? Deduplicate in two passes: exact on the source's own review ID, then fuzzy on normalised text. The first catches overlapping pages and repeated runs. The second catches the same complaint pasted across accounts or platforms, which an ID can't see because IDs are only unique within one source. Overlap happens for ordinary reasons. If you page through a feed that's receiving new reviews, every new review pushes older ones down a page, so page two repeats the end of page one. Trustpilot's response also returns a `relevantReviews` list beside `reviews`. In the recorded sample the IDs in the two lists don't overlap, but they are separate lists and may overlap in other pulls, so I'd keep `relevantReviews` out of a time series. To check, intersect the `id` sets of the two lists before you merge them. Use a composite key of source plus ID. Then lowercase the text, strip whitespace and punctuation, and hash it to flag identical bodies. Sort by date first so the copy you keep is the earliest one, and only text-hash above a minimum length: short texts such as "Great app" collapse to one hash and would drop real, separate reviews. Record how many duplicates you dropped rather than deleting silently; the script below counts them. The App Store's `is_edited` field is a boolean, `false` on both recorded reviews. Store it with each record so you can see which reviews are marked as edited. ## Why should you drop reviewer names? Drop them because sentiment analysis doesn't need them, and keeping them turns a text dataset into a personal-data dataset. Under the GDPR, [personal data](https://gdpr-info.eu/art-4-gdpr/) (Article 4(1), Regulation (EU) 2016/679, 2016) is any information relating to an identified or identifiable natural person, and the definition lists identifiers such as a name, location data or an online identifier. The UK regulator's [guidance on personal data](https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-resources/personal-information-what-is-it/what-is-personal-data/what-is-personal-data/) (ICO, checked 2026) quotes the same wording for the UK GDPR. So a display name attached to a country code and a profile image can fall within it. Whether a given record does depends on your context. This isn't legal advice; check your own obligations. The identifying fields in the three recorded responses are: | Source | Fields to drop | | --- | --- | | Trustpilot | `consumer.displayName`, `consumer.id`, `consumer.imageUrl`, `consumer.numberOfReviews` | | Google Play | `title` (the name), `avatar` | | App Store | `author` | Drop them in the ingestion function, before the write, so they never reach a table, a log or a model prompt. Reviews can also contain names in the body text, so if your use case allows it, run a pass over `text` to mask obvious personal details. Collected data here comes from publicly available sources and is returned as found at the time of the call, which doesn't remove your responsibility for how you store it. ## How do you collect and normalise all three in Python? Write one small function per source that returns the same flat record, with identity fields left out. Then one loop deduplicates and counts ratings. The script below follows the response shapes recorded above and runs with your key set in `API_KEY`. ```python import hashlib import os import re from collections import Counter import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): r = requests.get(BASE + path, headers=HEADERS, params=params, timeout=30) r.raise_for_status() return r.json() def trustpilot(domain, pages=2): for page in range(1, pages + 1): data = get("/v1/trustpilot/company-reviews", company_domain=domain, languages="all", page=page) for r in data.get("reviews", []): yield {"source": "trustpilot", "id": r["id"], "rating": r["rating"], "text": r.get("text", ""), "date": r["dates"]["publishedDate"], "lang": r.get("language")} def google_play(app_id, pages=2): token = None for _ in range(pages): params = {"product_id": app_id, "store": "apps", "num": 20} if token: params["next_page_token"] = token data = get("/v1/google-play/product-reviews", **params) for r in data.get("reviews", []): yield {"source": "google-play", "id": r["id"], "rating": r["rating"], "text": r.get("snippet", ""), "date": r["iso_date"], "lang": None} token = data.get("pagination", {}).get("next_page_token") if not token: break def app_store(app_id, pages=2): token = None for _ in range(pages): params = {"product_id": app_id, "store": "apps", "num": 20} if token: params["next_page_token"] = token data = get("/v1/apple-app-store/product-reviews", **params) for r in data.get("reviews", []): yield {"source": "app-store", "id": r["id"], "rating": r["rating"], "text": r.get("text", ""), "date": r["date"], "lang": None} page = data.get("reviews_pagination", {}) token = page.get("next_page_token") if page.get("end_of_history") or not token: break def text_hash(text): norm = re.sub(r"\W+", " ", text.lower()).strip() return hashlib.sha1(norm.encode()).hexdigest() MIN_HASH_CHARS = 20 # shorter texts ("Great app") are not text-hashed records = sorted([*trustpilot("amazon.com"), *google_play("com.spotify.music"), *app_store("324684580")], key=lambda rec: rec["date"]) seen_ids, seen_text, rows, dupes = set(), set(), [], Counter() for rec in records: key = (rec["source"], rec["id"]) h = text_hash(rec["text"]) if len(rec["text"]) >= MIN_HASH_CHARS else None if key in seen_ids or (h and h in seen_text): dupes[rec["source"]] += 1 continue seen_ids.add(key) if h: seen_text.add(h) rows.append(rec) by_source = Counter((r["source"], r["rating"]) for r in rows) for (source, stars), n in sorted(by_source.items()): print(source, stars, n) print("duplicates dropped:", dict(dupes)) # Google Play `snippet` may be a preview, not the full body: check before scoring. gp = [r["text"] for r in rows if r["source"] == "google-play"] cut = sum(t.endswith("…") for t in gp) print("google-play texts ending in an ellipsis:", cut, "of", len(gp)) print("google-play text lengths:", sorted(len(t) for t in gp)) # Only Trustpilot returns a language; the rest go to a detector of your choice. langs = Counter(r["lang"] or "unknown" for r in rows) print("languages:", dict(langs)) ``` Sorting by `date` first means the earliest copy is the one kept. The records contain no names, avatars or usernames because the functions never read them. A failed call returns an HTTP status and a JSON error body, and `raise_for_status()` surfaces it; see [the errors reference](https://docs.perceptlayer.com/errors) for the codes. Failed calls aren't billed. ### What does it cost? Each call is one credit, whichever source you use. As a worked example, assume a call returns 20 reviews (page sizes aren't documented, so measure yours). Then 10,000 reviews from one source is 500 calls × 1 credit = 500 credits, and all three sources at that depth is 1,500 credits. The free tier gives 100 credits on signup, which covers 2,000 reviews from one source (100 calls × 20 reviews); the full 1,500 credits need a pack. See [credits](https://docs.perceptlayer.com/credits) for how billing works and [pricing](https://perceptlayer.com/pricing) for what credits cost. ## When is this not the right data? If you only need your own app's reviews, the store owners' own tools are worth checking first, since they are built around your account. Perceptlayer returns what is publicly visible, as found at the time of the call. For a market-wide view across competitors, or for a source without an official API, a single key across sources saves you maintaining three integrations. Also consider volume. Sentiment on a few thousand recent reviews often answers the question; a full historical backfill for a product with millions of reviews is a large number of calls. Decide the date window first, then size the job. For other sources of review data, see the [Reviews APIs](https://perceptlayer.com/verticals/reviews) and [Apps and media APIs](https://perceptlayer.com/verticals/apps) hubs, and the related [hotel price data](https://perceptlayer.com/blog/hotel-price-data-rate-monitoring) article for a similar fields-first approach. To try it, [get a free API key](https://perceptlayer.com/signup), open the playground on the [Trustpilot API page](https://perceptlayer.com/apis/trustpilot), and run the `company-reviews` call for a domain you know. ## APIs in this post - [Trustpilot **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/trustpilot) - [Google Play **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/google-play) - [Apple App Store **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/apple-app-store) ## Frequently asked questions ### Which fields are the minimum for sentiment analysis? The text, the rating, a date and the source's review ID, plus a language tag where the source returns one. The text is what you score, the rating gives a label to check against, the date lets you chart trends, the ID prevents double counting, and the language picks the right model. Everything else is optional context, and identity fields should be dropped. ### Can I compare average ratings between Trustpilot and Google Play? Not from these samples. The recorded Trustpilot response is for one retailer ( `trustScore` 1.5, 67.5% one-star ratings) and the Google Play one is for the Spotify app (4.3), so product and platform differ at once and can't be separated. Compare the same product on both, or compare a source against its own history. ### How many credits does it cost to pull reviews? One credit per successful call on each of these endpoints, and failed calls cost nothing. If a call returns 20 reviews (an assumption; check your own responses), 5,000 reviews is 250 calls × 1 credit = 250 credits. Free accounts get 100 credits after verifying an email. Check [pricing](https://perceptlayer.com/pricing) for what larger packs cost. ### Do I need the restricted-endpoint terms to use review data? The endpoints in this article are standard tier, so no. Restricted endpoints cover social, personal and SEO data and need the terms accepted in the dashboard. Separately, reviews may contain personal data, so decide your lawful basis and drop identity fields at ingestion, as covered above. ### What happens if I hit the rate limit during a big pull? You get a 429 response with a `Retry-After` header giving the seconds to wait. Limits are per account and counted per minute; free accounts get 1 request a second. Sleep for the header value and continue. Because requests have no idempotency key, a timed-out request may have been billed, so dedupe by ID. See [rate limits](https://docs.perceptlayer.com/rate-limits). sentiment analysis product reviews trustpilot google play app store ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 31 Oct 2026 Perceptlayer 9 min read ## [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check. --- title: "AI Travel Planning Agent: Flights and Hotels via MCP" description: "Chain Google Flights and hotel search through MCP tools in one agent. The exact tool calls, a runnable script and the 6 credits one trip plan costs." url: https://perceptlayer.com/blog/ai-travel-planning-agent-mcp --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # AI Travel Planning Agent: Flights and Hotels via MCP 7 Sept 2026 Perceptlayer 8 min read An AI travel planning agent needs two things: live prices and a way to call them. Connect an agent to the Perceptlayer MCP server and it can search flights and hotels with three tools, `search_endpoints`, `get_endpoint` and `call_endpoint`. One trip plan in this tutorial takes six paid calls, so six credits. The agent reads public prices and never books anything. ## Key takeaways - One MCP server, `https://perceptlayer.com/mcp`, exposes the Google Flights, Google Hotels and Booking.com endpoints through three tools. - `search_endpoints` and `get_endpoint` cost nothing; each `call_endpoint` that succeeds costs 1 credit for every endpoint used here. - The plan below uses six paid calls: one date-range search, two one-way flight searches, two hotel searches and one reviews lookup. Total: 6 credits. - The 100 free credits on signup cover 16 whole trip plans (100 ÷ 6 = 16.67). - The agent only reads prices. Booking is left to the traveller, and the prompt says so. ## How does an agent plan a trip with MCP tools? The agent follows a short dependency chain. It finds the flight and hotel endpoints in the catalogue, reads their parameters, then calls them in order: a date search narrows the departure day, flight searches price the legs, and hotel searches price the stay. Each step feeds the next, which is why tool calling suits this job better than one big request. [MCP](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports) is the protocol that lets an agent discover and call tools. This server speaks Streamable HTTP, so any client that supports remote MCP servers can connect. For the wider picture, see [MCP vs function calling for live web data](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) and [how an MCP server for web data works](https://perceptlayer.com/blog/mcp-server-for-web-scraping). If you prefer a framework, [a LangChain custom tool](https://perceptlayer.com/blog/langchain-custom-tool-web-data) can wrap the same endpoints, and [Claude MCP web search](https://perceptlayer.com/blog/claude-agent-live-search-mcp) covers a single-tool agent. Here is the chain this tutorial builds. The credits column counts only successful calls. | Step | Tool | Endpoint | Credits | | --- | --- | --- | --- | | 1 | `search_endpoints` | Catalogue lookup | 0 | | 2 | `get_endpoint` | Catalogue lookup | 0 | | 3 | `call_endpoint` | `/v1/google-flights/date-range` | 1 | | 4 | `call_endpoint` | `/v1/google-flights/one-way` (outbound) | 1 | | 5 | `call_endpoint` | `/v1/google-flights/one-way` (return) | 1 | | 6 | `call_endpoint` | `/v1/google-hotels/search` | 1 | | 7 | `call_endpoint` | `/v1/booking/search` | 1 | | 8 | `call_endpoint` | `/v1/google-hotels/reviews` | 1 | | | | Total | 6 | ## What do you need before you start? You need an API key and an MCP client. The key is free: verify an email address and you get 100 free credits on signup, with no credit card. Keys start with `sk_live_`. Claude Code is the client used here because it adds a remote server in one command, but any MCP client that supports Streamable HTTP works the same way. ### Step 1: get a key [Get a free API key](https://perceptlayer.com/signup), then export it. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the `X-API-Key` header that the plain HTTP calls in step 5 use. ```bash export API_KEY=sk_live_your_key_here ``` ### Step 2: add the MCP server Run this once. It registers the server under the name `perceptlayer` and passes your key as a bearer token, as described in the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp) and the [AI agents section of the docs](https://docs.perceptlayer.com/ai-agents). ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp \ --header "Authorization: Bearer $API_KEY" ``` ## Which endpoints does the agent chain together? The agent draws on five endpoints from three APIs, and a single plan makes six paid calls because the one-way search runs twice. Flights come from the [Google Flights API](https://perceptlayer.com/apis/google-flights), hotel prices and ratings from the [Google Hotels API](https://perceptlayer.com/apis/google-hotels), and a second hotel price list from the [Booking.com API](https://perceptlayer.com/apis/booking). All of them cost 1 credit per successful call. | Job | Endpoint | Required parameters | | --- | --- | --- | | Find a cheap departure day | `GET /v1/google-flights/date-range` | `origin`, `destination`, `from_date`, `to_date` | | Price one leg | `GET /v1/google-flights/one-way` | `origin`, `destination`, `departure_date` | | Search hotels | `GET /v1/google-hotels/search` | `q`, `check_in_date`, `check_out_date` | | Cross-check hotel prices | `GET /v1/booking/search` | `ss` | | Read reviews for one property | `GET /v1/google-hotels/reviews` | `property_token` | Two details make the chain work. The flight response carries a `booking_token` per fare, and the hotel response carries a `property_token` per property. The reviews call needs that `property_token`, so the hotel search has to come first. Every parameter above is documented on its endpoint page, for example [One Way](https://perceptlayer.com/apis/google-flights/one-way) and [Google Hotels Search](https://perceptlayer.com/apis/google-hotels/search). For each API on its own, see the articles on the [Google Flights API](https://perceptlayer.com/blog/google-flights-api) and the [Google Hotels API](https://perceptlayer.com/blog/google-hotels-api). ## How do you prompt the agent so it stays inside budget? Put the limits in the prompt: what to search, how many paid calls it may make, and what it must not do. A prompt is an instruction, not a guarantee, so treat the cap as guidance and the prepaid balance as the hard stop. When the balance reaches zero, calls return `insufficient_credits` (402) and nothing more is debited. ### Step 3: write the prompt Save this as `trip-prompt.txt`. ```text Plan a 3-night trip from JFK to Los Angeles, leaving around 15 December 2026 and returning 18 December 2026. One adult. Use the perceptlayer MCP tools. Look up endpoints with search_endpoints and read their parameters with get_endpoint before you call anything. Make at most 6 call_endpoint calls in total: 1. A date-range flight search to check the departure window. 2. A one-way search for the outbound leg and one for the return leg. 3. A Google Hotels search for Los Angeles for the same dates. 4. A Booking.com search for the same dates, to compare prices. 5. A Google Hotels reviews lookup for the single hotel you recommend. Report the cheapest fares, the three best-value hotels and the credits used and remaining, as call_endpoint reports them after each call. Do not book, pay for or reserve anything, and do not ask for personal details. Prices are a snapshot from the time of each call; say so. ``` ### Step 4: run it Run the agent headless so the whole plan comes back in one reply. The `-p` flag prints the response and exits, as the [CLI reference](https://code.claude.com/docs/en/cli-reference) describes. The `--allowedTools` flag lists tools that run without a permission prompt, and per the [permissions docs](https://code.claude.com/docs/en/permissions) a bare server name such as `mcp__perceptlayer` matches every tool that server provides. ```bash claude -p "$(cat trip-prompt.txt)" --allowedTools "mcp__perceptlayer" ``` Watch the credits used and remaining that `call_endpoint` reports after each call. If the agent exceeds six paid calls, tighten the prompt. For hard spending limits around an agent, see [AI agent API cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs). ## What do the tool calls return? The flight search returns a `flights` list. Each entry has a `price`, `currency`, `airline_name`, `stops`, `total_duration_minutes`, a `booking_token` and a `legs` array with the flight number and times. This is an excerpt of a recorded response for `GET /v1/google-flights/one-way` with `origin=JFK`, `destination=LAX` and `departure_date=2026-12-15`. ```json { "flights": [ { "price": 179, "currency": "USD", "total_duration_minutes": 384, "stops": 0, "airline_name": "JetBlue", … "legs": [ { "airline": "B6", "flight_number": "2223", "departure_airport": "JFK", "arrival_airport": "LAX", "departure_time": "2026-12-15T08:01:00", "arrival_time": "2026-12-15T11:25:00", "duration_minutes": 384 } ] }, … ], … } ``` The hotel search returns a `properties` list. This excerpt is from a separate recorded request, `GET /v1/google-hotels/search` for `Paris, France` with `check_in_date=2026-12-15` and `check_out_date=2026-12-18`. It shows the shape of the data, not the Los Angeles results. ```json { "properties": [ { "type": "hotel", "name": "Novotel Paris Porte de Versailles", … "property_token": "ChkI5rWisq2xuMNRGg0vZy8xMWhfa18xc2w4EAE", … "rate_per_night": { "lowest": "€136", "extracted_lowest": 136, … }, "total_rate": { "lowest": "€408", "extracted_lowest": 408, … }, … "overall_rating": 4.6, "reviews": 4337, … "hotel_class": "4-star hotel", "extracted_hotel_class": 4 }, … ], … } ``` The [Booking.com API](https://perceptlayer.com/apis/booking) search takes `ss` (the place), plus `checkin`, `checkout`, `group_adults`, `dest_id` and `dest_type`. It returns property results for those dates. We have no recorded response for it, so check its fields in the playground on the API page rather than assuming them. ## How can you run the same plan without an LLM? You can run the flight and hotel legs as plain HTTP calls. This is useful for testing, for checking what the agent should have found, and for a scheduled job that doesn't need reasoning. The script below makes three paid calls (3 credits): two one-way flight searches and one hotel search. It reads only fields shown in the recorded responses above. ### Step 5: run the script Save this as `plan_trip.py` and install `requests` first. The script retries 429 and 503 responses after the `Retry-After` delay, and stops with the error code on any other failure. ```python import os import sys import time from datetime import date import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} spent = 0 remaining = None def call(path, **params): global spent, remaining for _ in range(3): r = requests.get(f"{BASE}{path}", headers=HEADERS, params=params, timeout=60) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", 5))) continue break if not r.ok: err = r.json()["error"] sys.exit(f"{err['code']} ({r.status_code}): {err['message']} [{err['request_id']}]") spent += int(r.headers["X-Credits-Used"]) remaining = r.headers["X-Credits-Remaining"] return r.json() def cheapest_flight(origin, destination, day): data = call( "/v1/google-flights/one-way", origin=origin, destination=destination, departure_date=day, adults=1, sort_by="cheapest", ) flights = data["flights"] if not flights: sys.exit(f"No flights {origin}-{destination} on {day}") best = min(flights, key=lambda f: f["price"]) leg = best["legs"][0] print( f"{origin}->{destination} {day}: {best['airline_name']} " f"{leg['airline']}{leg['flight_number']} dep {leg['departure_time']} " f"{best['stops']} stops, {best['price']} {best['currency']}" ) def top_hotels(query, check_in, check_out): data = call( "/v1/google-hotels/search", q=query, check_in_date=check_in, check_out_date=check_out, adults=1, currency="USD", gl="us", ) props = [ p for p in data["properties"] if p.get("overall_rating") and p.get("total_rate") ] props = [p for p in props if p["overall_rating"] >= 4.0] props.sort(key=lambda p: p["total_rate"]["extracted_lowest"]) for p in props[:3]: print( f"{p['name']}: {p['overall_rating']} stars from {p['reviews']} reviews, " f"{p['total_rate']['lowest']} total" ) origin, destination, hotel_query, check_in, check_out = sys.argv[1:6] nights = (date.fromisoformat(check_out) - date.fromisoformat(check_in)).days print(f"{nights} nights") cheapest_flight(origin, destination, check_in) cheapest_flight(destination, origin, check_out) top_hotels(hotel_query, check_in, check_out) print(f"Credits used: {spent}, remaining: {remaining}") ``` ```bash pip install requests python plan_trip.py JFK LAX "Los Angeles, California" 2026-12-15 2026-12-18 ``` The output is a list of the cheapest outbound and return fares, the three lowest-priced hotels rated 4.0 or higher, and a credits line. Three calls cost 3 credits. If a request times out on your side, don't assume it failed: requests have no idempotency key, so it may have succeeded and been billed. [Retrying web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers that case. ## What does one trip plan cost? One trip plan costs 6 credits, because six `call_endpoint` calls each cost 1 credit and the catalogue lookups are free. Failed calls cost nothing and return `X-Credits-Used: 0`. From the [credits docs](https://docs.perceptlayer.com/credits), a successful call costs the credits shown on its endpoint, so the plan's cost in credits is the same on every pack. | Credit source | Credits | Trip plans (6 credits each) | | --- | --- | --- | | Free credits, once | 100 | 16 | | Starter pack | 10,000 | 1,666 | | Build pack | 50,000 | 8,333 | | Growth pack | 200,000 | 33,333 | | Pro pack | 500,000 | 83,333 | | Scale pack | 1,000,000 | 166,666 | | Volume pack | 5,000,000 | 833,333 | The arithmetic: 10,000 credits ÷ 6 = 1,666 plans on the Starter pack, and 500,000 credits ÷ 6 = 83,333 plans on the Pro pack. One plan is 6 calls × 1 credit = 6 credits, and the 100 free credits ÷ 6 = 16 plans. Plans are rounded down to whole trips. Purchased credits last 12 months, and there is no subscription. For what a pack of credits costs, see [pricing](https://perceptlayer.com/pricing). Each pack includes a request rate, and a faster rate can be chosen at checkout. See [pricing](https://perceptlayer.com/pricing) for the packs and the rate options, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) for how limits are counted. An agent that fires several searches at once can hit the limit on a free account, which gets 1 request a second. If the agent re-plans a trip with a different date, each new search is another paid call. Caching identical searches avoids paying twice; [caching API responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses) shows how. ## Why does the agent read prices but never book? The agent reads public prices and stops there. Booking means taking payment, holding personal details and acting for the traveller, and a language model that misreads one parameter can spend someone's money. Keeping the agent read-only means the worst outcome is a wrong summary, which a person can check before acting. There is a second reason. Data is collected from publicly available sources and returned as found at the time of the call. A fare or room rate can change between your call and the traveller's click, so the agent should present results as a snapshot and send the traveller to the airline or hotel to confirm the price. That belongs in the prompt, as step 3 shows. The Google Flights API does include a [Booking Details](https://perceptlayer.com/apis/google-flights/booking-details) endpoint, which takes a `booking_token` and the flight's details. This tutorial leaves it out on purpose: it adds a paid call per fare and moves the agent a step closer to checkout. Add it only if your product shows fare details and a person makes the decision. ## What can go wrong, and how does the agent recover? Most failures are parameter mistakes or rate limits, and each one has a code the agent can act on. Errors return an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. Because failed calls aren't billed, a wrong guess costs time, not credits. | Code | Status | What it means for the agent | | --- | --- | --- | | `invalid_parameters` | 422 | A parameter is missing or malformed. Re-read the endpoint with `get_endpoint` and fix the call. | | `rate_limited` | 429 | Wait for the `Retry-After` seconds, then retry. | | `temporarily_unavailable` | 503 | Wait for the `Retry-After` seconds, then retry. | | `source_error` | 502 | The source failed. Try again later or report that this search is unavailable. | | `insufficient_credits` | 402 | The balance is empty. Stop and tell the user. | The full list is in the [errors docs](https://docs.perceptlayer.com/errors), and the limits are in the [rate limits docs](https://docs.perceptlayer.com/rate-limits). The next step is to run the prompt: [add the MCP server](https://docs.perceptlayer.com/ai-agents) and plan your first trip with the free credits. ## APIs in this post - [Google Flights **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-flights) - [Booking.com **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/booking) - [Google Hotels **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-hotels) ## Frequently asked questions ### Does the agent book flights or hotels? No. It reads public prices through search endpoints and returns a summary. Nothing in the tools reserves or pays for anything, and the prompt tells the agent not to try. A person confirms the price on the airline or hotel site before booking. ### How many credits does one trip plan use? Six in this tutorial: one date-range search, two one-way flight searches, two hotel searches and one reviews lookup, each 1 credit. The catalogue lookups, `search_endpoints` and `get_endpoint`, cost nothing, and failed calls aren't billed. ### Can I use an MCP client other than Claude Code? Yes. The server is at `https://perceptlayer.com/mcp` and uses Streamable HTTP, so any client that supports remote MCP servers can connect. Authenticate with your key as a bearer token, as in the Claude Code command in step 2. ### What happens when I run out of credits mid-plan? The next call returns `insufficient_credits` (402) and nothing more is debited. The service is prepaid with no automatic top-up, so the agent can't overspend your balance. The prompt should tell it to stop and report what it already found. ### Are the prices live? They are returned as found at the time of each call, from publicly available sources. A fare or room rate can change afterwards, so present the results as a snapshot with the time of the call, and have the traveller confirm before booking. travel mcp ai agents flights hotels ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 11 Oct 2026 Perceptlayer 7 min read ## [Remote MCP Server: Streamable HTTP vs Local stdio](https://perceptlayer.com/blog/remote-mcp-server-streamable-http) A remote MCP server runs over Streamable HTTP: one POST endpoint, auth headers, Origin checks, no sessions. Real responses, and when stdio fits better. --- title: "OpenAI Agents SDK with a Remote MCP Server for Web Data" description: "Connect the OpenAI Agents SDK to a Streamable HTTP MCP server with a Bearer header, cap call_endpoint at 3 calls a question, and count credits per run." url: https://perceptlayer.com/blog/openai-agents-sdk-mcp-server --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # OpenAI Agents SDK with a Remote MCP Server for Web Data 7 Sept 2026 Perceptlayer 8 min read To use a remote MCP server with the OpenAI Agents SDK, create an `MCPServerStreamableHttp` with the server URL and an `Authorization` header, open it with `async with`, and pass it to `Agent(mcp_servers=[...])`. This tutorial connects the SDK to Perceptlayer's server at `https://perceptlayer.com/mcp`, answers one question with a live Google search, and caps paid `call_endpoint` calls at three per question, so no question costs more than 3 credits. ## Key takeaways - `MCPServerStreamableHttp(params={"url": ..., "headers": {"Authorization": "Bearer sk_live_..."}})` connects the SDK to a remote server; the agent sees its tools as ordinary function tools. - The SDK's MCP session timeout defaults to 5 seconds in version 0.24.0; set `client_session_timeout_seconds=60` so a slow data call doesn't fail on the client side. - Subclassing the server and overriding `call_tool` gives a hard per-run cap: past three `call_endpoint` calls, the agent gets an error result instead of a paid call. - `search_endpoints` and `get_endpoint` are free; each `call_endpoint` to `/v1/google-search/search` costs 1 credit, so a capped question costs 0 to 3 credits. - The cap and credit counter were tested against a local stub server with a scripted model, not against the live API. ## What do you need before you start? Python 3.10 or later, an OpenAI API key, and a Perceptlayer API key. Install the SDK with `pip install openai-agents` ( [PyPI](https://pypi.org/project/openai-agents/), 2026); the code here was checked against version 0.24.0, which also installs the `mcp` package it uses for the `CallToolResult` type. Model calls are billed by OpenAI to your OpenAI account; data calls are billed in Perceptlayer credits. [Get a free API key](https://perceptlayer.com/signup): keys start with `sk_live_`, and every account gets 100 free credits after verifying an email address. Export both keys: ```bash pip install openai-agents export OPENAI_API_KEY=sk-... export PERCEPTLAYER_API_KEY=sk_live_... ``` The MCP server needs no install. It speaks Streamable HTTP and exposes three tools: `search_endpoints` and `get_endpoint` look up the catalogue for free, and `call_endpoint` runs an endpoint and spends its credits only on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) list the tools and the setups for other clients. ## Why connect from your code and not as a hosted tool? The SDK has two ways to reach a remote MCP server, both described in its [MCP documentation](https://openai.github.io/openai-agents-python/mcp/) (OpenAI, 2026). `HostedMCPTool` hands the server URL to OpenAI, and the model calls the server from OpenAI's side without a round trip to your code. `MCPServerStreamableHttp` runs the MCP client in your process: your code lists the tools, and every tool call passes through it. For this tutorial the second route is the one that matters, because a budget needs a place to stand. When calls pass through your process, you can count them, refuse them and log the credits each one spent. With the hosted tool, the calls happen where you can't intercept them, and any key the server needs goes in the tool configuration you send to OpenAI. If you don't need a hard cap, the hosted tool is less code. | | `MCPServerStreamableHttp` | `HostedMCPTool` | | --- | --- | --- | | Who calls the MCP server | Your process | OpenAI's side | | Can your code cap or log each call | Yes, in `call_tool` | No | | Where the API key goes | Your process only | The tool config sent to OpenAI | | Best for | Budgets, logging, private networks | Least code | ## How do you connect the SDK to the server? Create the server object with the URL and the header, then open it with `async with`, which connects on entry and closes the session on exit. Perceptlayer's server reads the key from `Authorization: Bearer` (or `X-API-Key`), so a missing header doesn't stop the agent from searching the catalogue; it only makes `call_endpoint` fail with `invalid_api_key`. 1. Put the URL and header in `params`. `timeout` is the HTTP timeout for each request, in seconds. 2. Set `cache_tools_list=True`. The tool list only changes when the server is deployed, so there's no need to fetch it on every run. 3. Raise `client_session_timeout_seconds`. In version 0.24.0 it defaults to 5 seconds, which is shorter than many data calls take. The API allows a data source up to 60 seconds before it returns `timeout`, so 60 matches. ```python from agents.mcp import MCPServerStreamableHttp server = MCPServerStreamableHttp( name="perceptlayer", params={ "url": "https://perceptlayer.com/mcp", "headers": {"Authorization": f"Bearer {os.environ['PERCEPTLAYER_API_KEY']}"}, "timeout": 30, }, cache_tools_list=True, client_session_timeout_seconds=60, ) ``` Don't put the key in `params` of a tool call or in the URL. The server drops an `api_key` sent as a tool parameter, so the key never passes through the model's context. For more on header auth versus OAuth for MCP, see [MCP server authentication](https://perceptlayer.com/blog/mcp-server-api-key-vs-oauth). ## How do you cap call\_endpoint calls per run? Subclass `MCPServerStreamableHttp` and override `call_tool`. Every tool call the agent makes on this server goes through that method, so it's the one place to count paid calls and refuse the ones past your limit. A refused call returns an MCP error result, which the SDK hands back to the model as the tool's output, so the agent knows to stop searching and answer. The override also reads the credits. Each successful `call_endpoint` result ends with a text block such as `Credits used: 1. Credits remaining: 999.`, so a regular expression over the result totals what the run spent. ```python import re from mcp.types import CallToolResult, TextContent class BudgetedServer(MCPServerStreamableHttp): """Counts call_endpoint calls and credits, and refuses calls past the cap.""" def __init__(self, *args, max_calls=3, **kwargs): super().__init__(*args, **kwargs) self.max_calls = max_calls self.calls = 0 self.credits = 0 async def call_tool(self, tool_name, arguments, meta=None): if tool_name == "call_endpoint": if self.calls >= self.max_calls: text = f"Call budget reached: {self.max_calls} call_endpoint calls this run. Answer with what you have." return CallToolResult(content=[TextContent(type="text", text=text)], isError=True) self.calls += 1 result = await super().call_tool(tool_name, arguments, meta) for block in result.content: used = re.search(r"Credits used: (\d+)", getattr(block, "text", "")) if used: self.credits += int(used.group(1)) return result ``` The count goes up before the call, so a call that fails still uses one of the three slots, even though a failed call costs no credits. That's deliberate: a cap on attempts also stops an agent that keeps retrying a bad parameter. `Runner.run(..., max_turns=10)` is a second, coarser limit on the whole run. For budgeting across many scheduled runs, see [budgeting credits per agent run](https://perceptlayer.com/blog/scheduled-agent-credit-budget). ## What does the complete agent look like? Here's the whole script. It builds the budgeted server, creates an agent with short instructions that name the three tools, runs one question and prints the answer with the calls and credits it used. With no `model` argument, the agent uses the SDK's default model; pass `model=` to choose one. ```python """Answer one question with live web data through Perceptlayer's MCP server.""" import asyncio import os import re import sys from agents import Agent, Runner from agents.mcp import MCPServerStreamableHttp from mcp.types import CallToolResult, TextContent MCP_URL = os.environ.get("PERCEPTLAYER_MCP_URL", "https://perceptlayer.com/mcp") MAX_CALLS = 3 # paid call_endpoint calls allowed per question INSTRUCTIONS = """You answer questions with live web data. Use search_endpoints to find an endpoint, get_endpoint to read its parameters, then call_endpoint to run it. Lookups are free; each call_endpoint costs credits. Make at most 3 call_endpoint calls. Cite the URLs you used.""" class BudgetedServer(MCPServerStreamableHttp): """Counts call_endpoint calls and credits, and refuses calls past the cap.""" def __init__(self, *args, max_calls=MAX_CALLS, **kwargs): super().__init__(*args, **kwargs) self.max_calls = max_calls self.calls = 0 self.credits = 0 async def call_tool(self, tool_name, arguments, meta=None): if tool_name == "call_endpoint": if self.calls >= self.max_calls: text = f"Call budget reached: {self.max_calls} call_endpoint calls this run. Answer with what you have." return CallToolResult(content=[TextContent(type="text", text=text)], isError=True) self.calls += 1 result = await super().call_tool(tool_name, arguments, meta) for block in result.content: used = re.search(r"Credits used: (\d+)", getattr(block, "text", "")) if used: self.credits += int(used.group(1)) return result def perceptlayer_server(): return BudgetedServer( name="perceptlayer", params={ "url": MCP_URL, "headers": {"Authorization": f"Bearer {os.environ['PERCEPTLAYER_API_KEY']}"}, "timeout": 30, }, cache_tools_list=True, client_session_timeout_seconds=60, ) async def ask(question, model=None): async with perceptlayer_server() as server: agent = Agent( name="Web researcher", instructions=INSTRUCTIONS, mcp_servers=[server], **({"model": model} if model else {}), ) result = await Runner.run(agent, question, max_turns=10) return result.final_output, server.calls, server.credits if __name__ == "__main__": question = " ".join(sys.argv[1:]) or "What are the top Google results for 'mcp authorization spec'?" answer, calls, credits = asyncio.run(ask(question)) print(answer) print(f"\ncall_endpoint calls: {calls}, credits used: {credits}") ``` Run it with a question: ```bash python agent.py "What are the best-reviewed restaurants in Berlin right now?" ``` We haven't run this script against the live API or a real OpenAI model for this article. We ran it against a local stub MCP server with the same three tool names and canned results, driven by a scripted model that asked for five `call_endpoint` calls. The run made three paid calls, refused the fourth and fifth with the budget message, and reported `call_endpoint calls: 3, credits used: 3`. ## What does the agent get back from a search? The agent's `call_endpoint` result holds the endpoint's JSON, then the credits line. For `google-search.search`, that's Google results with organic links, local results, related questions and related searches. Here's an excerpt of a recorded response for `query=best restaurants in Berlin&hl=en&safe=off`, trimmed with `…`: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 2, "title": "Restaurants - Berlin", "link": "https://guide.michelin.com/us/en/berlin-region/berlin/restaurants", "displayed_link": "https://guide.michelin.com › berlin-region › restaurants", "snippet": "Berlin and surroundings: 1-48 of 79 restaurants · POTS · Rutz · GOLVET · Bandol sur mer · Nobelhart & Schmutzig · Oukan · 136 · FACIL.", "source": "MICHELIN Guide", … } ], "related_questions": [ { "question": "What is the coolest restaurant in Berlin?", … } ], "local_results": { "places": [ { "title": "BLESS Restaurant", "rating": 4.8, "reviews": 2400, "price": "€20–70", … } ] }, … } ``` That's a lot of text for the model to read, and you pay OpenAI for every token of it. The server cuts any result over 100,000 characters and says so, but well before that point, trimming helps. Our guide to [trimming API responses for LLM context](https://perceptlayer.com/blog/trim-api-responses-llm-context) shows how to keep only the fields an answer needs, and the [Search endpoint page](https://perceptlayer.com/apis/google-search/search) lists the parameters, such as `hl` and `gl`, that keep results on topic. ## What does one question cost? Lookups are free and each `call_endpoint` to the Google Search endpoint costs 1 credit on success, so a question costs between 0 and 3 credits with this cap. Failed calls cost nothing. Most questions need one search; the cap is there for the ones where the model keeps refining its query. | Questions | Worst case (3 calls each) | One search each | | --- | --- | --- | | 1 | 3 credits | 1 credit | | 100 | 300 credits | 100 credits | | 1,000 | 3,000 credits | 1,000 credits | Worked example: 1,000 questions a month at the cap is 1,000 × 3 × 1 credit = 3,000 credits, which fits three times in a Starter pack of 10,000 credits. If most questions use one search, the 100 free credits on signup cover about 100 of them. Purchased credits last 12 months; see [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how billing works. Rate limits are per account, shared by all its keys: 1 request a second on the free tier and 5 or more on paid packs. A rate-limited call comes back to the agent as a `rate_limited` tool error with the seconds to wait, and it costs nothing. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the numbers, and [MCP server rate limiting](https://perceptlayer.com/blog/mcp-server-rate-limiting-agents) covers how agents should handle them. ## What can go wrong, and how do you fix it? Most failures show up as tool errors the agent can read, and none of them spends credits. The table covers the ones you're most likely to see on a first run. Every error message names a code, and the [errors docs](https://docs.perceptlayer.com/errors) list them all. | Symptom | Cause | Fix | | --- | --- | --- | | `Error invalid_api_key` with "No API key was sent" | The header is missing | Check `PERCEPTLAYER_API_KEY` and the `headers` dict | | A timeout on the client before the server answers | `client_session_timeout_seconds` left at 5 | Set it to 60 | | `Error invalid_parameters` | The model guessed a parameter | Tell it to call `get_endpoint` first | | "Call budget reached" in the agent's reasoning | The cap worked | Raise `max_calls` if the questions need it | | `MaxTurnsExceeded` raised | The run hit `max_turns` | Raise it, or tighten the instructions | To go further, our [MCP vs function calling](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) guide compares this setup with defining the search as a plain function tool, as in [adding live web search to an OpenAI agent](https://perceptlayer.com/blog/openai-agent-web-search-tool-call). To run this agent now, [get a free API key](https://perceptlayer.com/signup) and try the search in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search) first, so you know what the agent will see. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Does the OpenAI Agents SDK support remote MCP servers? Yes. `MCPServerStreamableHttp` connects to a server over Streamable HTTP with a URL and optional headers, and `HostedMCPTool` lets OpenAI call a server for you. Pass the first to `Agent(mcp_servers=[...])` inside `async with`. The agent then sees the server's tools as function tools. ### How do I pass an API key to an MCP server in the Agents SDK? Put it in the `headers` of the server's `params`, for example `{"Authorization": f"Bearer {key}"}`. Perceptlayer's server reads `Authorization: Bearer` or `X-API-Key`. Keep the key in an environment variable, and never in the instructions or a tool parameter, where it would pass through the model. ### How do I stop an agent making too many paid tool calls? Override `call_tool` on a subclass of the MCP server class and return an error result once a counter passes your limit, as in this tutorial. The model reads the error and answers with what it has. `max_turns` on `Runner.run` is a second, coarser limit on the whole run. ### How much does a question cost with this setup? Between 0 and 3 credits with the cap of three `call_endpoint` calls, since `search_endpoints` and `get_endpoint` are free and the Google Search endpoint costs 1 credit per successful call. Failed calls cost nothing. OpenAI bills the model's tokens separately to your OpenAI account. ### Why does my first call time out? In version 0.24.0 of the SDK, `client_session_timeout_seconds` defaults to 5 seconds, and many data calls take longer. Set it to 60 when you create the server. The API itself returns a `timeout` error, at no cost, if a data source doesn't answer within 60 seconds. openai agents sdk mcp python ai agents web search ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 18 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [How to Add an MCP Server to Claude Desktop and Cursor](https://perceptlayer.com/blog/add-mcp-web-data-tools-claude-desktop) Add the Perceptlayer MCP server to Claude Desktop or Cursor with an API key header, run a first Google search, and check only successful calls cost credits. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 31 Jul 2026 Perceptlayer 9 min read ## [Add Web Search to an OpenAI Agent: Python Tool Calls](https://perceptlayer.com/blog/openai-agent-web-search-tool-call) Add web search to an OpenAI agent in Python: one web\_search tool over live Google results, a tool-call loop and a cap of 1 credit per search. --- title: "Vacation Rental Pricing Data: Fields That Matter" description: "Which Airbnb and Vrbo fields drive nightly-rate analysis, why advertised rates aren't booked rates, and what tracking 200 listings weekly costs in credits." url: https://perceptlayer.com/blog/vacation-rental-data-pricing-analysis --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Vacation Rental Pricing Data: Fields That Matter 7 Sept 2026 Perceptlayer 7 min read Vacation rental pricing data is the advertised price of a stay, for specific dates and guests, as a listing site shows it. For nightly-rate analysis, the fields that matter are the stay total and its breakdown, the dates and party it was quoted for, the listing's size and location, and its availability and reviews over time. What the data can't give you is the booked rate: an advertised price shows what a host asks, not what a guest paid. ## Key takeaways - A price only means something with its stay attached: the recorded Airbnb search gives `price.amount` 714 EUR `for 4 nights`, with `price_breakdown` "4 nights x €178.34". - Keep the request as part of the row: `checkin`, `checkout`, guests and `currency` change the price, so a rate without them can't be compared. - `bedrooms`, `beds`, `bathrooms`, `latitude`, `longitude`, `rating` and `review_count` explain most of the price spread between listings. - Advertised rates aren't booked rates. Availability calendars and review counts are the evidence you have for demand, and both need assumptions. - Tracking 200 listings weekly, 100 on each site, is about 200 credits a week, 800 a month. The 100 free credits on signup cover a first test of 100 listings; ongoing tracking needs a pack. ## What does a vacation rental price actually measure? The price a listing site quotes for one stay: these dates, this many guests, this currency, at the moment you asked. Change any of them and the price can change, because hosts price by night, by season and by length of stay. That makes vacation rental prices different from hotel rack rates or rents: there's no single "price of the listing", only prices of stays. Since April 2025, Airbnb shows guests the total price of a stay, including all fees before taxes, from the start of their search; in some countries taxes are included too ( [Airbnb Newsroom](https://news.airbnb.com/total-price-display-is-now-standard-globally), 2025). So a total from search is close to what a guest sees before checkout, but whether taxes are in it depends on the market. Store the market with the price. ## Which fields matter for nightly-rate analysis? Five groups: the price and its basis, the stay you asked about, the listing's size, its location, and its demand signals. Our recorded Airbnb search for Paris, 10 to 14 November 2026, 2 adults, in EUR, shows most of them on each result. Here is the first result, trimmed with `…`: ```json { "id": "1669612146929039736", "title": "Apartment in Paris", "rating": 5, "review_count": 17, "price": { "amount": 714, "currency": "EUR", "nights": 4, "qualifier": "for 4 nights" }, "price_breakdown": [{ "description": "4 nights x €178.34", "amount": 713.37 }], "bedrooms": 1, "beds": 1, "bathrooms": 1, "latitude": 48.84223, "longitude": 2.29241, "badges": ["Guest favorite"], … } ``` | Field | Why it matters | Watch out for | | --- | --- | --- | | `price.amount`, `price.nights`, `price.currency` | The stay total and its basis | It's a total; divide by `nights` for a nightly figure | | `price_breakdown` | Shows the nightly rate behind the total | Text such as "4 nights x €178.34"; 713.37 against a 714 total shows rounding | | `checkin`, `checkout`, guests (your request) | The price is for this stay only | Not in the result; store it with every row | | `bedrooms`, `beds`, `bathrooms` | The main drivers of price within an area | Compare like with like: 1-bedroom against 1-bedroom | | `latitude`, `longitude` | Location, the other main driver | Use for distance bands, not exact addresses | | `rating`, `review_count` | Quality signal, and a proxy for past bookings | Missing on the second recorded result, which has no rating yet | | `badges` | Site labels such as "Guest favorite" | A label, not a measured quality | Divide `price.amount` by `price.nights` for the nightly rate: 714 ÷ 4 = 178.50 EUR, against 178.34 in the breakdown. Use the total for "what would this stay cost" and the breakdown's nightly rate when you compare across stay lengths. The other two results in the recording are 765 EUR and 435 EUR for the same 4 nights, so three Paris apartments for the same stay span 108.75 to 191.25 EUR a night. The third has no `bedrooms` field at all, so expect gaps. Vrbo adds what Airbnb's three endpoints don't: an availability calendar per property. `/v1/vrbo/listing-availability` takes a `property_id` with optional `start_date` and `end_date`, and `/v1/vrbo/search` requires `check_in` and `check_out` and takes `price_type` ( `nightly` or `total`). Our recorded Vrbo search, for Lake Tahoe, 10 to 13 December 2026, 2 adults, maps onto the same table with different names. One property's price block, trimmed: ```json { "property_id": "33933784", "property_type": "House", "bedrooms": 2, "beds": 4, "rating": 9.8, "rating_scale": 10, "review_count": 161, "price": { "currency": "USD", "nightly": 280, "nightly_original": 289, "stay_total": 839, "stay_total_text": "$839 for 3 nights", "nights": 3, "fees_note": "All fees included" }, … } ``` Vrbo gives the nightly rate and the stay total as separate numbers, flags a discount with `nightly_original`, and says fees are included. Its ratings are out of 10, not 5, so rescale before you put the two sites in one column. We haven't recorded a Vrbo availability calendar, so check `listing-availability` in the playground on the [Vrbo API page](https://perceptlayer.com/apis/vrbo) before you design its table. ## Why aren't advertised rates booked rates? Because nothing in public listing data says a stay was booked, or at what price. A host can ask 178 EUR a night and accept a discount, or leave dates unsold. Analysts infer demand from two indirect signals, and both carry assumptions you should state when you publish a number. The first is the availability calendar. A date that turns from open to blocked may be a booking, or the host blocking it for their own use. A calendar can't tell you which, so treat blocked nights as an upper bound on bookings. The second is review counts. Inside Airbnb, which publishes short-term rental data for many cities, estimates occupancy from reviews by assuming 50% of stays leave a review, applying an average stay of 3 nights where no published figure exists, and capping the estimate at 70% ( [Inside Airbnb](https://insideairbnb.com/data-assumptions/), 2026). Its own page explains why it picked 50% and calls the alternative figure probably not conservative enough. So report what you measured. "Median advertised nightly rate for 1-bedroom apartments in the 15th arrondissement, for stays booked 30 days ahead" is a fact you can stand behind. "Average daily rate" implies booked stays and needs those assumptions spelled out. ## How do you build a weekly price panel? Fix the stays you quote and the listings you track, then repeat the same requests every week. A panel answers "how did prices for the same stay change", which a fresh search each week can't, because the search returns different listings. Pick a small set of reference stays, such as Friday to Sunday four weeks ahead and Monday to Friday six weeks ahead, and quote each tracked listing for each one. For Airbnb, `/v1/airbnb/listing` takes the `listing_id` with `checkin`, `checkout` and `adults`, so one call prices one listing for one stay. For Vrbo, `/v1/vrbo/listing` takes the `property_id` with `check_in`, `check_out` and `adults`, and `listing-availability` returns the calendar. This script prices a list of Airbnb listings for one reference stay and appends rows to a CSV, keeping the request with each price: ```python import csv import datetime as dt import os import requests URL = "https://api.perceptlayer.com/v1/airbnb/listing" HEADERS = {"X-API-Key": os.environ["API_KEY"]} LISTINGS = ["1669612146929039736"] # your tracked listing IDs today = dt.date.today() checkin = today + dt.timedelta(days=(4 - today.weekday()) % 7 + 28) # a Friday ~4 weeks out checkout = checkin + dt.timedelta(days=2) with open("airbnb_panel.csv", "a", newline="") as f: out = csv.writer(f) for lid in LISTINGS: r = requests.get(URL, headers=HEADERS, timeout=60, params={ "listing_id": lid, "checkin": checkin.isoformat(), "checkout": checkout.isoformat(), "adults": 2}) status = r.status_code body = r.text if status == 200 else r.json()["error"]["code"] out.writerow([today.isoformat(), lid, checkin, checkout, 2, status, body]) ``` We haven't run this script live for this article. The script stores the whole listing response, because we haven't recorded `/v1/airbnb/listing` and you should check where its price sits before you parse it. A failed call stores its error code and costs nothing. To discover listings for the panel in the first place, run `/v1/airbnb/search` with `place`, dates and `room_type` ( `entire_home`, `private_room` or `hotel_room`), and page with the returned `next_cursor` passed back as `cursor`. ## What does tracking 200 listings weekly cost? Each successful call is 1 credit, so the cost is calls per week. Split 200 listings evenly: 100 Airbnb listings priced for one reference stay, and 100 Vrbo properties checked with `listing-availability`. That's 100 + 100 = 200 calls a week. Add reviews monthly, one call per listing, and a monthly search sweep to replace delisted properties. | Step | Calls | Credits a month | | --- | --- | --- | | Airbnb `listing`, 100 listings × 1 stay, weekly | 100 a week | 400 | | Vrbo `listing-availability`, 100 properties, weekly | 100 a week | 400 | | Reviews for all 200, monthly | 200 a month | 200 | | **Total** | | **1,000** | Without the monthly reviews, it's 800 credits a month; with them it's exactly 1,000, so the Starter pack's 10,000 covers 10 months. The 100 free credits every verified account gets once cover half of one week's calls, enough to test both endpoints. A second reference stay doubles the pricing rows to 1,600 credits a month, within the Starter pack's 10,000. Failed calls cost nothing. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what packs cost. ## What are the limits of this data? Three to keep in front of anyone who reads your analysis. Prices are advertised prices as found at the time of the call, not booked rates, and they move with demand, so a weekly panel shows asking-price trends. Coverage is the listings you chose: a panel of 200 is a sample of a market, and new or removed listings change it. And fees and taxes vary by market, so compare totals only within one market and currency. For the endpoint details behind the Airbnb half, the [Airbnb listings data guide](https://perceptlayer.com/blog/airbnb-listings-data-api) covers search, listing and reviews; the [Vrbo API guide](https://perceptlayer.com/blog/vrbo-api-vacation-rental-listings) covers search, availability and reviews. For hotels rather than private rentals, see [hotel price data for rate monitoring](https://perceptlayer.com/blog/hotel-price-data-rate-monitoring). To start, run a Paris search for your own dates in the playground on the [Airbnb API page](https://perceptlayer.com/apis/airbnb). ## APIs in this post - [Airbnb **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/airbnb) - [Vrbo **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/vrbo) ## Frequently asked questions ### Can I get booked rates or occupancy from Airbnb or Vrbo data? Not directly. Listing data shows advertised prices, availability calendars and reviews. Blocked calendar nights may be bookings or owner blocks, and review-based occupancy estimates depend on assumptions such as the share of stays that leave a review. State those assumptions, or report advertised rates and calendar availability as what they are. ### Why does the same listing show different prices? Prices are for a stay, so dates, length of stay, number of guests and currency all change them. Hosts can price weekends, holidays and short stays differently. Always store the `checkin`, `checkout`, guests and `currency` you requested with each price, and compare only prices quoted for the same kind of stay. ### Does the Airbnb price include fees? Airbnb says it has shown guests the total price including all fees before taxes since April 2025, with taxes included in some countries. The recorded search returns `price.amount` as a total `for 4 nights` with a nightly breakdown. Whether taxes are included depends on the market you searched. ### How much does a weekly price panel cost? One credit per successful call. Pricing 100 Airbnb listings and checking availability for 100 Vrbo properties weekly is 200 credits a week, about 800 a month. The 100 free credits you get once on signup cover a first test; ongoing tracking needs a pack. Failed calls cost nothing. The [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Should I store host names or guest reviews? Keep what you need for pricing analysis: ratings, review counts and review dates. Host names and reviewer names identify people and rarely help a pricing model, so drop them unless you have a reason and a lawful basis to keep them, and never use them to contact anyone. vacation rentals short-term rentals pricing airbnb vrbo ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Oct 2026 Perceptlayer 7 min read ## [Vrbo API: Vacation Rental Listings and Availability](https://perceptlayer.com/blog/vrbo-api-vacation-rental-listings) Search Vrbo with required check\_in and check\_out, then pull a listing's availability and reviews by property\_id. Parameters, cURL and the cost of 50 listings. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 9 min read ## [Vrbo Scraper or API: What You Get](https://perceptlayer.com/blog/vrbo-scraper-vs-api) A Vrbo scraper vs 6 endpoints at 1 credit a call: a recorded Lake Tahoe search with stay\_total, nightly\_original and rating, and the cost per listing. --- title: "Classifieds Data for Price Benchmarking: A Practical Guide" description: "Benchmark prices with eBay, Craigslist and Kleinanzeigen data: which fields to keep, why asking prices run high, and a median script at 1 credit per call." url: https://perceptlayer.com/blog/classifieds-data-price-benchmarking --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Classifieds Data for Price Benchmarking: A Practical Guide 5 Sept 2026 Perceptlayer 8 min read Classifieds data gives you asking prices, not transaction prices, so a benchmark built from it needs three corrections: drop duplicates, drop stale listings, and treat the median as likely above value, by an amount you haven't measured. Each listing's `price`, a timestamp or location, and a stable ID are the fields that matter. Three endpoints cover eBay, Craigslist and Kleinanzeigen at 1 credit per call. ## Key takeaways - A listing's price is what the seller hopes for. Treat the median of asking prices as likely above market value, by an unmeasured amount, and benchmark against it consistently rather than as a market value. - Keep four fields per listing: a stable ID ( `posting_id`, `product_id`, `id`), the numeric price, a location, and a freshness signal such as Craigslist's `bumped_at`. - Deduplicate on the ID first, then on title and price. Reposted and bumped listings otherwise count several times. - Use medians and trimmed ranges, not means. One `$428.98` outlier among `$60.00` listings moves an average a long way. - Every call below costs 1 credit, and failed calls cost nothing. A 50-call weekly sweep is 50 credits. ## Do asking prices overstate value? Asking prices probably overstate value because sellers set them before any buyer has responded, and many listings are open to offers. Platforms build this in: eBay's Best Offer lets a buyer propose a price, and the seller can "accept, decline, or make a counteroffer" ( [eBay](https://export.ebay.com/en/services-tools/best-offer/), 2026). We have no sold-price data for these sources, so the size of the gap is unmeasured. Housing is a useful contrast, not support. In the four weeks ending June 8, 2025, the average US home sold at 99.1% of its list price, and 28.5% sold above it ( [Redfin](https://www.redfin.com/news/housing-market-update-fewer-homes-selling-above-asking-price/), 2025). There, sale prices sat close to list prices and often above them, possibly because agents price against recent sales and buyers compete; Redfin's figures don't test that explanation. Asking prices don't always overstate value, so don't assume the same for second-hand goods. Our working hypothesis, not a measured result, is that the gap is wider for second-hand goods, where a seller picks a number with little evidence. A second hypothesis is survivorship: listings that sit unsold may stay in the data because their price is too high, while a fairly priced listing may sell and vanish quickly and so be seen for less time. If both hold, a snapshot skews upward. Test them yourself by keeping a record of listings that disappear and comparing. ## Which fields does a price benchmark need? A price benchmark needs a price you can compare, an ID you can deduplicate on, a place, and a sign the listing is alive. The search endpoints for all three sources return these in the list response, so you rarely need a second call per listing. The table maps each source's recorded field names. | Need | eBay `/v1/ebay/search` | Craigslist `/v1/craigslist/search` | Kleinanzeigen `/v1/kleinanzeigen/search` | | --- | --- | --- | --- | | Stable ID | `product_id` | `posting_id` (and `id`) | `id` | | Numeric price | `price.extracted` | `price` | `price_numeric` | | Currency | `price.currency` | `currency` | in `price` text ( `399 €`) | | Location | `location` (country only) | `location.name`, `location.site` | `location` | | Freshness | none in the list | `bumped_at` | none in the list | | Other flags | `sponsored`, `subtitle` | `images` | `description` | Four details matter in practice. eBay's `location` was only `United States` in the recorded response, so it can't place a listing in a region. To compare a region, set the `preferred_location` or `location_postal` parameter on the search instead. Currency differs by source: eBay and Craigslist returned USD and Kleinanzeigen returned EUR, so compute medians per currency and market and never pool them. eBay marks paid placements with `sponsored`, which you should keep so you can exclude them if promoted listings skew your sample. eBay's `subtitle` carried the condition ( `Brand New`) in the recorded response. Kleinanzeigen's `description` is truncated, so condition and VAT hints may need the [details endpoint](https://perceptlayer.com/apis/kleinanzeigen/details). ## How do you pull comparable prices from each source? You pull comparable prices by fixing the product, the region and a price band in the query, then reading the numeric price field. Each source filters differently, so the parameters below are the ones to use. All three are `GET` requests with the `X-API-Key` header ( [authentication](https://docs.perceptlayer.com/authentication)). ### eBay The [eBay search endpoint](https://perceptlayer.com/apis/ebay/search) takes `q`, plus `condition[]`, `buy_it_now`, `auction`, `price_min` and `price_max`. Filtering to `buy_it_now` removes auction prices that are still mid-bid. ```bash curl "https://api.perceptlayer.com/v1/ebay/search?q=coffee+maker&page=1&per_page=60" \ -H "X-API-Key: $API_KEY" ``` An excerpt of the recorded response shows the shape: ```json "results": [ { "product_id": "366702966104", "title": "Mr. Coffee 4-in-1 Single-Serve Latte, Iced, and Hot Coffee", "price": { "raw": "$60.00", "extracted": 60, "currency": "USD" }, "sponsored": true, "subtitle": "Brand New", … }, { "product_id": "167322718667", "price": { "raw": "$428.98", "extracted": 428.98, "currency": "USD" }, "sponsored": true, "subtitle": "Brand New", … } ], "total_results": 110000 ``` Both results come from one query and are both `Brand New`, yet one is `$60.00` and the other a commercial machine at `$428.98`. A query as broad as "coffee maker" mixes products, which is why you need narrower queries or a trimmed statistic. ### Craigslist The [Craigslist search endpoint](https://perceptlayer.com/apis/craigslist/search) takes `site`, `subarea`, `category`, `query`, `min_price`, `max_price`, `sort` and `page`. Find valid values with the [sites](https://perceptlayer.com/apis/craigslist/sites) and [categories](https://perceptlayer.com/apis/craigslist/categories) endpoints. ```bash curl "https://api.perceptlayer.com/v1/craigslist/search?site=portland&category=bia&query=bike&min_price=50&max_price=300" \ -H "X-API-Key: $API_KEY" ``` ```json "total": 821, "results": [ { "posting_id": 7988730852, "title": "21\" Specialized Sirrus A1 commuter", "price": 250, "currency": "USD", "location": { "name": "multnomah county", "site": "portland", … }, "bumped_at": "2026-10-23T20:30:33Z" }, … ] ``` `bumped_at` is a freshness hint, not proof a listing is live. A seller can bump or repost an item to refresh it, so a recent timestamp can sit on a stale offer, and an old one may still be available. Pair it with your own first-seen date for each `posting_id`. The [Craigslist posting guide](https://perceptlayer.com/blog/craigslist-api-postings-json) covers the fields in detail. ### Kleinanzeigen The [Kleinanzeigen search endpoint](https://perceptlayer.com/apis/kleinanzeigen/search) requires `query` and takes `page`, `location`, `category`, `price_min` and `price_max`. ```bash curl "https://api.perceptlayer.com/v1/kleinanzeigen/search?query=iphone&page=1&location=Berlin&category=elektronik&price_min=50&price_max=500" \ -H "X-API-Key: $API_KEY" ``` ```json "data": [ { "id": "3547273212", "title": "Apple iPhone 13 Pro Max 256GB Silber/Weiß Zustand Sehr gut OVP", "price": "399 €", "price_numeric": 399, "location": "13187 Pankow", … }, { "id": "3528146741", "title": "iPhone 13 mini 128GB |91–100 % Akku | inkl. 19% MwSt. Top Zustand", "price_numeric": 379, … } ] ``` The second title says `inkl. 19% MwSt.` (VAT included), which may hint at a business seller, though a private seller could write the same words. If dealer and private prices are different populations in your category, the title alone won't separate them. Compare like with like, and read [the Kleinanzeigen guide](https://perceptlayer.com/blog/kleinanzeigen-api-search-json) for more on search parameters. ## How do you handle duplicates and stale listings? Handle duplicates by keying on the source ID, then on a normalised title and price; handle stale listings by dropping anything not refreshed recently. The same item reaches your data twice through pagination overlap, repeated sweeps and reposts under new IDs. Each repeat pulls the median toward that item's price. Run the rules in this order: 1. **Exact ID.** Keep one row per `posting_id`, `product_id` or `id` within a source. 2. **Same seller content.** Within one site, treat identical lowercase title plus identical price as one listing. This catches reposts with a new ID. 3. **Freshness.** On Craigslist, discard postings whose `bumped_at` is older than your cutoff, but remember a seller bump can refresh it, so also record your own first-seen date and treat long-running postings with suspicion. eBay and Kleinanzeigen list responses carry no timestamp, so track first-seen dates in your own store and drop listings you haven't seen refreshed. 4. **Price floor and ceiling.** Use `min_price` and `max_price` to cut placeholder prices such as 1 or 99999 before they reach you. Matching across sources is a harder problem; [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers it. Pagination also needs care, since a sort order that changes between calls can skip or repeat items: see [safe page loops](https://perceptlayer.com/blog/paginate-web-data-api-python). ## What does a worked benchmark look like? A worked benchmark takes one search, removes duplicates and stale rows, and reports the median and a trimmed range. This script reads the Craigslist search above, keeps postings bumped within seven days, and prints the median asking price. Set `API_KEY` in your environment. ```python import os import statistics from datetime import datetime, timedelta, timezone import requests URL = "https://api.perceptlayer.com/v1/craigslist/search" params = { "site": "portland", "category": "bia", "query": "bike", "min_price": 50, "max_price": 300, } r = requests.get(URL, params=params, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30) r.raise_for_status() cutoff = datetime.now(timezone.utc) - timedelta(days=7) seen, prices = set(), [] for row in r.json()["data"]["results"]: # a repost gets a new posting_id, so also key on the title and price key = (row["title"].strip().lower(), row.get("price")) if row["posting_id"] in seen or key in seen: continue seen.update({row["posting_id"], key}) bumped = datetime.fromisoformat(row["bumped_at"].replace("Z", "+00:00")) if bumped >= cutoff and row.get("price"): prices.append(row["price"]) prices.sort() trim = len(prices) // 10 core = prices[trim:len(prices) - trim] or prices print(f"n={len(prices)} median={statistics.median(prices)} " f"trimmed range={core[0]}-{core[-1]}") ``` The recorded response reported `total: 821` matches with `has_more: true`, so one call is a page, not the whole market. Loop over `page` to collect more, and check `has_more` to know when to stop. The `min_price` and `max_price` filters (50 to 300) mean the median describes that price band, not the whole market; widen them and rely on the trimmed range for a market view. Treat the printed median as the asking-price benchmark, then record it weekly so you track movement rather than level. For cost, take 10 Craigslist sites, 5 pages each, once a week: 50 calls × 1 credit = 50 credits a sweep, or 200 credits over four weeks. Add Kleinanzeigen and eBay for the same product at 5 pages each and the total is 50 + 5 + 5 = 60 calls × 1 credit = 60 credits a week. The free tier gives 100 credits once, after you verify an email, which covers the first 60-credit sweep; a weekly benchmark after that needs a pack, and the 10,000-credit Starter pack covers a year of it (52 × 60 = 3,120 credits). [Pricing](https://perceptlayer.com/pricing) shows what packs cost. See [credits](https://docs.perceptlayer.com/credits) for how billing works. ## Where does this approach fall short? This approach falls short whenever you need what things actually sold for. The documented parameters on all three search endpoints have no sold-items filter, and the recorded responses carry no sale price or sold status. Your benchmark is a market of offers. If you need transaction prices, use a source that publishes them. For used cars, the [used car listing data guide](https://perceptlayer.com/blog/used-car-listing-data-price-analysis) covers the same asking-price problem for vehicles. You can still estimate the discount indirectly. Log first-seen and last-seen dates for each ID, treat a listing that disappears after a price drop as a probable sale at the last price, and compare. That is an inference, not a measurement, so label it that way in your reports. Calls that return errors don't debit credits, and [errors](https://docs.perceptlayer.com/errors) lists the codes to handle in a scheduled job. Get a free key at [/signup](https://perceptlayer.com/signup) and run the Craigslist search above in the playground on [the Craigslist API page](https://perceptlayer.com/apis/craigslist) before you write any code. ## APIs in this post - [eBay **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/ebay) - [Craigslist **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/craigslist) - [Kleinanzeigen **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/kleinanzeigen) ## Frequently asked questions ### Is classifieds data good enough for price benchmarking? It's good for tracking the direction and relative level of asking prices in a segment, and weak for stating what an item is worth. Asking prices probably sit above sale prices for second-hand goods, but we haven't measured it, and housing shows it isn't universal: the Redfin figures above put the average sale at 99.1% of list, with 28.5% of homes selling above it. Use classifieds data for trends and comparisons, and use sold data to validate levels. ### Why use the median instead of the average? Classifieds contain broken or placeholder prices and mixed product tiers, such as the `$60.00` and `$428.98` coffee makers in one eBay result page. A mean follows those outliers, while a median and a trimmed range stay near the typical listing. Report the sample size next to every median. ### How much does a benchmark sweep cost? Each search call costs 1 credit, and failed calls cost nothing. Ten Craigslist sites at 5 pages each is 50 calls × 1 credit = 50 credits per sweep. The free tier includes 100 credits once, on signup, and packs start at 10,000 credits. [Pricing](https://perceptlayer.com/pricing) lists what credits cost. ### How often should I refresh the data? Refresh at the pace the market moves, and match it to the decision. We haven't measured how often these listings change, so a weekly sweep is a starting point for a benchmark and a daily one for a repricing job; adjust once your own first-seen and last-seen logs show how fast listings turn over. Keep your calls inside the rate limit, which is 1 request a second on the free tier; see [rate limits](https://docs.perceptlayer.com/rate-limits). ### Can I run this from an AI agent? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`, so an agent can run the same searches and spend 1 credit per successful call. See [AI agents (MCP)](https://docs.perceptlayer.com/ai-agents) for setup, or build a [price tracking agent in Python](https://perceptlayer.com/blog/price-tracking-agent-python). classifieds price benchmarking ebay craigslist kleinanzeigen listing data ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 31 Oct 2026 Perceptlayer 9 min read ## [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check. --- title: "RAG with Live Web Data: When to Skip the Vector Store" description: "Which RAG questions need a stored index and which need a fresh call. A per-query Google Search lookup costs 1 credit, with the latency trade-off." url: https://perceptlayer.com/blog/rag-with-live-web-data --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # RAG with Live Web Data: When to Skip the Vector Store 5 Sept 2026 Perceptlayer 7 min read You can skip the vector store for any question whose answer changes faster than you can re-index it: prices, rankings, news, availability. Instead of retrieving from an index, the agent makes one API call per question and passes the results to the model as context. A Google Search lookup through Perceptlayer costs 1 credit per successful call. Keep the vector store for stable, private or high-volume material. ## Key takeaways - Route by how fast the answer goes stale: stable documents belong in an index, volatile facts need a call at question time. - A live lookup replaces the whole ingest, chunk, embed and refresh pipeline with one `GET /v1/google-search/search` request that costs 1 credit. - 10,000 live lookups × 1 credit = 10,000 credits, exactly the size of the Starter pack. See [pricing](https://perceptlayer.com/pricing) for what credits cost. - A live call adds a network round trip to every question. Measure it against your own latency budget before you commit. - Failed calls cost nothing and return `X-Credits-Used: 0`, so error handling doesn't need a refund path. ## What does RAG with live web data actually change? Retrieval-augmented generation, as described in [the original 2020 paper from Lewis et al.](https://arxiv.org/abs/2005.11401), pairs a language model with a retriever that fetches relevant passages at question time. The retriever is usually a vector index you built earlier. With live web data, the retriever is an API call made at the moment of the question, so the "index" is the web itself. The generation step doesn't change. You still put retrieved text into the prompt and ask the model to answer from it. What changes is where the text comes from and when it was collected. A vector store holds what you ingested last week. A live call returns what the source showed at the time of the call, which is the only freshness promise the data carries. That difference moves cost and failure modes, not just freshness. An index costs you storage, an embedding job and a refresh schedule. A live call costs credits per question and depends on the network at answer time. ## Which questions belong in the index, and which need a fresh call? Sort questions by how long the answer stays true and who owns the source. If the answer is stable, private or yours, index it. If it lives on a public website and changes daily, fetch it per query. Most agents need both, and the router between them is a few lines of logic, not a framework. | Question type | Example | Where it belongs | Why | | --- | --- | --- | --- | | Your own documents | "What does our refund policy say?" | Vector store | Private, stable, and not on the public web | | Slow-changing reference | "How does OAuth device flow work?" | Vector store or model memory | Answer rarely changes, so the ingest cost pays off | | Rankings and search results | "Who ranks for this query today?" | Live call | The answer is the current result page | | Prices and availability | "Is this product in stock?" | Live call | Stale within hours, sometimes minutes | | News and events | "What happened to this company this week?" | Live call | An index is out of date by the time it's built | | Long-tail public questions | "Best restaurants in Berlin right now" | Live call | Too many possible questions to pre-index | The last row matters most for cost. You can't embed the whole web in advance, so open-ended public questions either hit a live source or get a stale guess. ## How does a per-query live lookup work? A per-query lookup is one authenticated HTTP request whose response goes straight into the prompt. For general web questions, `GET /v1/google-search/search` takes a required `query` and returns organic results, related questions and local results as JSON. It costs 1 credit on success, and the key goes in the `X-API-Key` header. Here is the request, run against a recorded example: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` A trimmed excerpt of the recorded response: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 2, "title": "Restaurants - Berlin", "link": "https://guide.michelin.com/us/en/berlin-region/berlin/restaurants", "snippet": "Berlin and surroundings: 1-48 of 79 restaurants · POTS · Rutz · GOLVET · …", "source": "MICHELIN Guide" } ], … } ``` Each organic result has a `title`, a `link`, a `snippet` and a `source`. That's enough for a model to answer and cite where the claim came from. The `search` endpoint also takes `hl` and `gl` for language and country, `location` for a place, and `page` for further results. The [Google Search API page](https://perceptlayer.com/apis/google-search) lists all seven endpoints, and the [Google Search API JSON guide](https://perceptlayer.com/blog/google-search-api-json) walks through the response fields. ### The retriever in Python The retriever is a function that takes the user's question and returns a context block with sources. Keep it small, read the credit headers, and let HTTP errors raise. ```python import os import requests SEARCH_URL = "https://api.perceptlayer.com/v1/google-search/search" def live_context(question: str, max_results: int = 5) -> str: resp = requests.get( SEARCH_URL, params={"query": question, "hl": "en"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) resp.raise_for_status() used = resp.headers.get("X-Credits-Used") remaining = resp.headers.get("X-Credits-Remaining") print(f"credits used: {used}, remaining: {remaining}") lines = [] for item in resp.json().get("organic_results", [])[:max_results]: lines.append(f"- {item['title']} ({item['link']}): {item['snippet']}") return "\n".join(lines) prompt = ( "Answer using only the search results below. " "Cite the link for each claim.\n\n" + live_context("best restaurants in Berlin") + "\n\nQuestion: Which restaurants in Berlin are worth booking?" ) ``` Send `prompt` to your model of choice. The model sees titles, links and snippets, so it can name its sources. The snippets are short, so for questions that need a full page's text you'd add a second step that reads the linked pages. ## What does a live lookup cost per question? Each successful call costs 1 credit, so cost scales linearly with questions that reach the live path, and only those. 10,000 live lookups use 10,000 credits. A router that sends only the volatile questions to the API cuts that figure without touching answer quality. | Live lookups per month | Credits | Smallest pack that covers it | | --- | --- | --- | | 1,000 | 1,000 | Starter (10,000 credits), for 10 months | | 10,000 | 10,000 | Starter (10,000 credits) | | 100,000 | 100,000 | Growth (200,000 credits) | The arithmetic is 10,000 calls × 1 credit = 10,000 credits, which is exactly the Starter pack's 10,000. Every account gets 100 free credits once, after verifying an email, no card needed, so the first 100 lookups cost nothing. The [pricing page](https://perceptlayer.com/pricing) shows what each pack costs. Purchased credits last 12 months, and the service is prepaid: when the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. Compare that with the index path, where the costs are different in kind: an embedding job per refresh, storage for the vectors, and the engineering time to keep the pipeline running. Neither side is free. The live path is a variable cost that tracks usage, which suits an agent whose traffic is hard to predict. For capping that spend, see [AI agent API cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs). ## What is the honest downside of skipping the index? Latency is the main one. A live lookup adds a network round trip to a source on the public web before the model can start generating, while a vector query against a nearby index is typically a local operation. We don't publish a latency figure for these endpoints, so measure the p50 and p95 in your own environment, from where your agent runs, before deciding. Other limits are worth knowing before you build: - **Rate limits.** Rate-limited (429) and temporarily unavailable (503) responses carry a `Retry-After` header with the seconds to wait. Back off by that amount. - **Timeouts can still bill.** Requests have no idempotency key, so a request whose reply was lost may have succeeded and been charged. [Retry web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers the pattern. - **No ranking over your own data.** A search call can't rank your internal documents. That's the index's job. - **Repeated questions.** If many users ask the same thing within minutes, a short-lived cache removes the repeat charges. The [response caching guide](https://perceptlayer.com/blog/cache-web-data-api-responses) shows TTLs and the credit savings. Data is returned as found at the time of the call. It's collected from publicly available sources, so treat it as evidence for the model to cite, not as ground truth. ## Where does a vector store still win? A vector store wins whenever the corpus is yours, stable and queried often. Internal docs, support history, contracts and code don't exist on the public web, so no search call can find them. Semantic search over a fixed corpus is also cheap per query once the index exists, and the latency is predictable. It also wins on volume with repetition. If you answer the same 500 questions a million times, paying per call is the wrong shape and an index, or a cache in front of the live call, is the right one. And it wins when you need control over exactly which passages the model may see, such as for compliance review. The practical pattern is hybrid. Index what you own, call live for what the web owns, and let a small router pick per question. If your agent uses [the Model Context Protocol](https://modelcontextprotocol.io), the [Perceptlayer MCP server](https://docs.perceptlayer.com/ai-agents) exposes `search_endpoints`, `get_endpoint` and `call_endpoint` as tools, so the model can decide when to make the live call itself. The [MCP vs function calling comparison](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) explains when each wiring fits. To try the live path, [get a free API key](https://perceptlayer.com/signup) and run the search call above in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search) before you write any retriever code. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Can I use live web data and a vector store together? Yes, and most production agents should. Route each question: private or stable material goes to the index, volatile public facts go to a live call. Both results land in the same prompt as labelled context blocks. The router can be a rule or a model decision, such as an MCP tool the model chooses to call. ### How many credits does one live lookup use? One successful call to the Google Search endpoints costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. Every successful response also carries `X-Credits-Used` and `X-Credits-Remaining`, so you can log the balance after each call. See [credits in the docs](https://docs.perceptlayer.com/credits) for the full rules. ### What happens when a live call fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. Codes include `rate_limited` (429), `source_error` (502) and `temporarily_unavailable` (503). Failures aren't billed. Wait for the `Retry-After` seconds on 429 and 503 before retrying. The [errors section](https://docs.perceptlayer.com/errors) lists every code. ### Is live retrieval slower than a vector store? Usually, yes. A live call crosses the network to a public source, while a vector query against a nearby index is typically faster. There's no published latency figure for these endpoints, so time it from where your agent runs. If the extra delay is too much, cache repeated questions or reserve live calls for queries that need them. ### Does this replace a scraper I maintain? For public search results, it can, because the endpoint returns JSON fields instead of HTML you have to parse and keep in step with page changes. See [what maintaining a scraper involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost) for the trade-offs, including cases where owning the scraper still makes sense. rag live web data vector store ai agents google search ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 24 Jul 2026 Perceptlayer 7 min read ## [Scheduled AI Agent Runs: Budgeting Credits per Run](https://perceptlayer.com/blog/scheduled-agent-credit-budget) Cap an agent at N calls per run with a Python ledger that reads X-Credits-Used, plus the math for hourly and daily runs on 100 credits on signup. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 18 Jul 2026 Updated 10 Nov 2026 Perceptlayer 11 min read ## [LangChain Custom Tool for Live Web Data: Python Tutorial](https://perceptlayer.com/blog/langchain-custom-tool-web-data) Build a LangChain tool in Python for Google Search and News: typed arguments, retries on 429, 502 and 503 only, and a per-run credit cap. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 10 min read ## [Claude MCP Web Search: Live Results for an Agent](https://perceptlayer.com/blog/claude-agent-live-search-mcp) Add the Perceptlayer MCP server to Claude, let the agent call the Google Search endpoint, and count its cost: 1 credit per search call. --- title: "Google Maps Directions API Alternative: Routes as JSON" description: "One GET to /v1/google-maps/directions returns a route as JSON for 1 credit. Parameters, a 15,000-route cost example and Google's per-request rates." url: https://perceptlayer.com/blog/google-maps-directions-api-alternative --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Maps Directions API Alternative: Routes as JSON 3 Sept 2026 Updated 31 Oct 2026 Perceptlayer 7 min read If you need Google Maps routes as JSON without a Google Cloud billing setup, call `GET /v1/google-maps/directions` with an `origin` and a `destination`. Every successful call costs 1 credit, whatever the mode, and failed calls cost nothing. A recorded New York to Boston call returns two routes with distance, duration and a `duration_in_traffic` figure. This guide shows that response trimmed, the parameters, a delivery-batch cost example and the gaps that make Google's own API the better choice. ## Key takeaways - `GET /v1/google-maps/directions` needs two parameters, `origin` and `destination`, each up to 500 characters. `mode` accepts driving, walking, bicycling or transit. - A successful call costs 1 credit. A failed call costs 0 and returns `X-Credits-Used: 0`. - A batch of 500 routes a day for 30 days is 15,000 calls × 1 credit = 15,000 credits. - Google bills its Directions SKUs per 1,000 requests, at $5.00 or $10.00 for the first tier, after a monthly free cap. - The recorded New York to Boston call returns a `directions` array with `via`, `distance`, `duration`, `formatted_distance`, `formatted_duration`, `duration_in_traffic` and `typical_duration_range`, plus `routes_count`. ## How do you request a route and what comes back? Send a GET request with your key in the `X-API-Key` header, and pass `origin` and `destination` as strings of up to 500 characters each. The endpoint returns the route as JSON, using Google Maps data collected from publicly available sources and returned as found at the time of the call. This is the recorded request, New York to Boston: ```bash curl "https://api.perceptlayer.com/v1/google-maps/directions?origin=New+York%2C+NY&destination=Boston%2C+MA" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. If a header isn't possible, the `api_key` query parameter works too. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both, and [Get a free API key](https://perceptlayer.com/signup) takes an email address and no credit card. Here is the recorded response, trimmed with `…`. It has two entries in `directions`: ```json { "search_parameters": { "start_addr": "New York, NY", "end_addr": "Boston, MA", "travel_mode": "driving" }, "places_info": [ { "address": "New York, NY", "data_id": "", "gps_coordinates": { "latitude": 0, "longitude": 0 } }, … ], "directions": [ { "travel_mode": "Driving", "via": "I-90 E", "distance": 346882, "duration": 13584, "formatted_distance": "216 miles", "formatted_duration": "3 hr 46 min", "extensions": ["This route has tolls."], "trips": [ { "distance": 346882, "duration": 13584, "formatted_distance": "346.9 km", "formatted_duration": "3 hr 46 min", "details": ["…", "…"] } ], "duration_in_traffic": 12969, "formatted_duration_in_traffic": "3 hr 36 min", "typical_duration_range": "3 hr 24 min to 4 hr 13 min" }, { "travel_mode": "Driving", "via": "I-95 N", "distance": 377053, "duration": 15084, "formatted_distance": "234 miles", "formatted_duration": "4 hr 11 min", "duration_in_traffic": 14025, "typical_duration_range": "3 hr 39 min to 4 hr 30 min", … } ], "status": "OK", "routes_count": 3 } ``` Each entry in `directions` is one route option. `via` names the road, `duration` is the base time and `duration_in_traffic` is the figure with traffic, so the first route shows 13584 against 12969. `typical_duration_range` gives the usual spread as a string. Three things to check before you build on it: - **Units.** `distance` is a number (346882) and `duration` is a number (13584). The docs don't state units, but the formatted strings beside them (346.9 km, 3 hr 46 min) are consistent with metres and seconds. - **Formatted distance varies.** In the recording, `formatted_distance` on the route says "216 miles" while the same route's `trips` entry says "346.9 km". Parse the numeric `distance` and format it yourself. - **Coordinates and IDs.** In `places_info`, the recorded `latitude` and `longitude` are 0 and `data_id` is empty. Don't rely on them for geocoding or joins. Also, `routes_count` was 3 in this recording while `directions` held two entries, so don't assume the two match. ### Which parameters does the Directions endpoint take? Two are required and three are optional. Nothing else is documented for this endpoint, so there are no waypoint, departure-time or avoid options to rely on. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `origin` | string | yes | Up to 500 characters, for example `New York, NY` | | `destination` | string | yes | Up to 500 characters, for example `Boston, MA` | | `mode` | string | no | One of `driving`, `walking`, `bicycling`, `transit` | | `hl` | string | no | string, optional | | `gl` | string | no | string, optional | One call is one origin and one destination. A route with stops in between is a series of calls, one per leg, which is how the cost example below counts it. ## What does a delivery batch cost? A dispatch tool that plans 500 routes a day for 30 days makes 15,000 calls. At 1 credit each, that's 15,000 calls × 1 credit = 15,000 credits a month. The 100 free credits you get once, after verifying an email, cover the first 100 routes; the rest comes from a prepaid pack. Packs start at 10,000 credits (Starter) and 50,000 (Build). Purchased credits last 12 months, and there's no subscription. [Pricing](https://perceptlayer.com/pricing) has what each pack costs. We state costs in credits only because prices change. Rate matters for a batch too. Free accounts get 1 request a second, so the 100 free routes take about 100 seconds if you send them one after another. Paying accounts run at least 5 requests a second (300 a minute), so a day's 500 routes take about 100 seconds. Limits are per account and shared by all its keys; see the [rate limits docs](https://docs.perceptlayer.com/rate-limits). ## How does that compare with Google's per-request pricing? Google bills Directions per 1,000 requests, with a monthly free cap per SKU. [Google's pricing page](https://developers.google.com/maps/billing-and-pricing/pricing) (checked October 2026) lists the legacy Directions SKU (Essentials) at $5.00 per 1,000 requests with 10,000 free events a month, and Directions Advanced (Pro) at $10.00 with 5,000 free. The current Routes API is the same: Compute Routes Essentials is $5.00 with 10,000 free, Pro $10.00 with 5,000 free, and Enterprise $15.00 with 1,000 free. Which SKU you hit depends on the request. Per [Google's Directions usage and billing page](https://developers.google.com/maps/documentation/directions/usage-and-billing), Essentials covers 1 to 10 waypoints, and Pro covers 11 to 25 waypoints, traffic data or waypoint optimization. Here's the same 15,000-route month, worked through with Google's published first-tier rates: | Option | Calls | Free cap | Billable | Cost at first-tier rate | | --- | --- | --- | --- | --- | | Google Directions Essentials | 15,000 | 10,000 | 5,000 | 5 × $5.00 = $25.00 | | Google Directions Advanced (Pro) | 15,000 | 5,000 | 10,000 | 10 × $10.00 = $100.00 | | `/v1/google-maps/directions` | 15,000 | 100 credits (once, at signup) | 14,900 credits | 14,900 credits, priced on [pricing](https://perceptlayer.com/pricing) | Verdict: at 15,000 calls a month, Google's Essentials row is cheap once its free cap is used, and we won't claim credits beat it on price. The dollar figures in that table are Google's; our side is 15,000 credits a month, or 14,900 in the first month after the 100 free credits, and [pricing](https://perceptlayer.com/pricing) shows what those cost. The credit side has no per-SKU tiers: 1 credit a call, whatever the mode, and the recorded response already includes `duration_in_traffic` and a second route. It also suits you if you'd rather skip a Google Cloud billing setup. Check what credits cost on [pricing](https://perceptlayer.com/pricing) and compare it with your own call count and SKU. The same logic applies to place data, which we covered in the [Places API alternative](https://perceptlayer.com/blog/google-maps-places-api-alternative). ## When should you use Google's API instead? Use Google's official API when your product draws routes on a Google map, when you need stops along the way, a departure time or route restrictions, or when your legal team requires Google's own terms of service. This endpoint documents none of waypoints, departure time or avoid options, so you can't ask for them. Google publishes its own rules in the [Google Maps Platform terms of service](https://cloud.google.com/maps-platform/terms), so read them before you display Google's results. Perceptlayer's data is collected from publicly available sources, and restricted endpoints need the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) accepted in the dashboard. There's also a timing point. As of October 2026, the Directions API (Legacy) can't be enabled on new Google Cloud projects, and existing projects stay supported ( [Google, Directions API usage and billing](https://developers.google.com/maps/documentation/directions/usage-and-billing)). For new projects, Google's [Routes API documentation](https://developers.google.com/maps/documentation/routes) is the place to start, and its migration section covers moving over from Directions. The per-call endpoint fits when you want route data as JSON in a back-end job, an analytics pipeline or an agent tool, with one key and one cost per route. ## How do you run a batch from Python? Loop over your origin and destination pairs, pause on rate-limit responses and save the raw JSON. This script runs as written once `API_KEY` is set. It writes each body to a file and prints the `via` and `duration_in_traffic` of each returned route. ```python import json import os import time import requests BASE = "https://api.perceptlayer.com/v1/google-maps/directions" HEADERS = {"X-API-Key": os.environ["API_KEY"]} pairs = [ ("New York, NY", "Boston, MA"), ("Boston, MA", "New York, NY"), ] results = [] for origin, destination in pairs: for attempt in range(3): r = requests.get( BASE, headers=HEADERS, params={"origin": origin, "destination": destination, "mode": "driving"}, timeout=30, ) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "1"))) continue break print(r.status_code, r.headers.get("X-Credits-Used"), r.headers.get("X-Credits-Remaining")) if r.ok: body = r.json() for route in body.get("directions", []): print(route.get("via"), route.get("duration_in_traffic")) results.append({"origin": origin, "destination": destination, "route": body}) with open("routes.json", "w") as f: json.dump(results, f, indent=2) ``` Rate-limited (429) and temporarily unavailable (503) replies carry a `Retry-After` header with the seconds to wait, and the script honours it. Retries on a rate limit are safe because the rejected call wasn't billed. A client timeout is different: the request may have succeeded and been billed, because requests have no idempotency key. For error codes and bodies, read the [errors docs](https://docs.perceptlayer.com/errors). Check `X-Credits-Remaining` on each response. The service is prepaid, so when the balance runs out calls return `insufficient_credits` (402) and nothing more is debited. ## Can an AI agent call it as a tool? Yes. The same key works through the MCP server at `https://perceptlayer.com/mcp`. Its `search_endpoints` and `get_endpoint` tools only look up the catalogue and cost nothing, and `call_endpoint` takes the endpoint ID plus `origin` and `destination` and spends 1 credit on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup, and [MCP vs function calling](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) explains which to pick. A routing question in an agent is then one tool call. Cap the number of calls per run, because each route is a credit. ## Next step Run the cURL call above with your own key, or try your own pair in the playground on the [Directions endpoint page](https://perceptlayer.com/apis/google-maps/directions), and check `X-Credits-Used` for the 1-credit cost. For the other Google Maps endpoints, see the [business data guide](https://perceptlayer.com/blog/google-maps-business-data-api) and the [credits docs](https://docs.perceptlayer.com/credits). ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### Does the Directions endpoint support waypoints? Not as a documented parameter. The endpoint takes `origin`, `destination`, `mode`, `hl` and `gl`, and nothing else is documented. For a route with stops, call it once per leg, which costs 1 credit per leg. The same goes for departure time and avoid options, which aren't documented. If you depend on waypoint optimization, Google's official API supports up to 25 waypoints per request. ### How much does one route cost? One successful call costs 1 credit, shown on the endpoint page. A failed call costs 0 credits and returns `X-Credits-Used: 0`. So 15,000 routes cost 15,000 credits. The [pricing page](https://perceptlayer.com/pricing) lists what credits cost, and the free tier gives 100 credits after email verification. ### Which travel modes can I request? Set `mode` to `driving`, `walking`, `bicycling` or `transit`. Those are the four documented values. Each call returns one mode, so comparing driving with transit for the same trip takes two calls, or 2 credits. The recorded call omitted `mode` and returned `driving` in `travel_mode`, but the default isn't documented, so set it explicitly. ### What happens when I hit the rate limit? You get a 429 with a `Retry-After` header holding the seconds to wait. Free accounts get 1 request a second; paying accounts run at least 5 a second. Rate-limited calls aren't billed. Wait the stated time, then retry, as the Python script above does. Details are in the [rate limits docs](https://docs.perceptlayer.com/rate-limits). ### Is Google's Directions API being retired? Google says the Directions API (Legacy) can no longer be enabled for new Cloud projects as of October 2026, while existing projects remain fully supported ( [Google, Directions API usage and billing](https://developers.google.com/maps/documentation/directions/usage-and-billing), 2026). New projects use the Routes API instead. google maps directions routes logistics api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Jul 2026 Updated 7 Nov 2026 Perceptlayer 8 min read ## [Google Maps Reviews API: Parameters, Requests and Cost](https://perceptlayer.com/blog/google-maps-reviews-api-parameters) Call GET /v1/google-maps/reviews with a business\_id from Simple Search. Every parameter, the sort values 1 to 4, and the cost: 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 9 min read ## [Google Reviews Scraper or API: What You Get](https://perceptlayer.com/blog/google-reviews-scraper-vs-api) A Google reviews scraper versus the reviews endpoint: rating, timestamp, review\_text and a nextPage token per call, at 1 credit per business checked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Google Maps Scraper or Places Data API: What You Get](https://perceptlayer.com/blog/google-maps-scraper-vs-api) Compare building a Google Maps scraper with the official Places API and place endpoints at 1 credit a call: fields, upkeep, terms and a verdict per use case. --- title: "MCP Tool Call Error Handling: When an Agent Should Retry" description: "Each call_endpoint error code mapped to one agent action (fix, wait, stop or ask the user), with the exact error text the model sees and a system prompt." url: https://perceptlayer.com/blog/mcp-tool-call-errors-agent-retries --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # MCP Tool Call Error Handling: When an Agent Should Retry 3 Sept 2026 Perceptlayer 7 min read Good MCP tool call error handling gives the model an error it can act on, then tells it which action fits which error: fix the call, wait and retry, stop, or ask the user. Perceptlayer's `call_endpoint` returns every failure as a tool result marked `isError`, with text that starts `Error :`, so the model reads the code directly. Only two codes are worth retrying unchanged, and no failed call costs credits. ## Key takeaways - Every failed `call_endpoint` returns a tool result with `isError: true` and text of the form `Error : (request_id: req_…)`. The model sees the code, not a stack trace. - Fix and retry once: `invalid_parameters` and `unknown_endpoint`. Wait and retry: `rate_limited` and `temporarily_unavailable`, whose text ends `Retry after N seconds.` - Don't retry: `not_found` (no data for those parameters), and `insufficient_credits`, `restricted_endpoint` and `invalid_api_key`, which only a person can fix. - Failed calls cost 0 credits, so retries are free in credits. What a retry loop costs is turns, time and context, which is why the agent needs a cap. - Put the mapping in the system prompt and enforce a retry limit in code. The prompt shapes behaviour; the code guarantees it. ## Why should tool errors reach the model at all? Because a model can only correct what it can see. The MCP schema says errors that originate from a tool should be reported inside the tool result with `isError` set to true, since otherwise the model wouldn't know an error occurred and couldn't self-correct ( [Model Context Protocol schema](https://modelcontextprotocol.io/specification/2025-06-18/schema), 2025). The tools specification draws the line the same way: unknown tools, invalid arguments and server errors are JSON-RPC protocol errors, while API failures and business-logic errors are tool execution errors reported with `isError: true` ( [MCP tools specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools), 2025). Perceptlayer's MCP server follows that split. An endpoint's own parameters travel inside `call_endpoint`'s `params` object, so a bad value there is a failure of the endpoint call, not of the tool's arguments. A bad endpoint ID, bad parameters, an empty result or a busy source all come back as normal tool results with `isError: true`, so the model reads them like any other output and decides what to do next. That puts the decision with the model, which is useful for `invalid_parameters`, where it can repair the call itself, and risky for codes it can't fix, where an unguided model may try again anyway. The rest of this article is about guiding that decision. ## What does the model actually see when a call fails? One line of text: `Error`, the code, a colon, a message, and the request ID in brackets. When the source asks you to wait, the line also ends with `Retry after N seconds.`, taken from the `Retry-After` header. These are the messages the server sends today, from its source code, with the request ID shortened: | Code | HTTP status behind it | What the model reads | | --- | --- | --- | | `invalid_parameters` | 422 | `Error invalid_parameters: Invalid parameters: 'safe' must be one of: active, off. (request_id: req_…)` | | `unknown_endpoint` | none (MCP-level) | `Error unknown_endpoint: No endpoint 'google.search'. Use search_endpoints to find endpoint IDs.` | | `not_found` | 404 | `Error not_found: No data was found for these parameters. You were not charged. (request_id: req_…)` | | `rate_limited` | 429 | `Error rate_limited: Too many requests. Retry after the number of seconds in the Retry-After header. Retry after N seconds. (request_id: req_…)` | | `temporarily_unavailable` | 503 | `Error temporarily_unavailable: The data source is busy. … You were not charged. Retry after N seconds. (request_id: req_…)` | | `insufficient_credits` | 402 | `Error insufficient_credits: Your credit balance is used up. Buy more credits to continue. (request_id: req_…)` | | `restricted_endpoint` | 403 | `Error restricted_endpoint: This endpoint requires accepting the restricted-endpoint terms in your dashboard. (request_id: req_…)` | | `invalid_api_key` | 401 | `Error invalid_api_key: Missing, unknown or revoked API key. (request_id: req_…)` | Two more codes can appear: `source_error` (502, "The data source returned an error") and `timeout` (504, "did not answer within 60 seconds"), both ending "You were not charged." When the source itself rejects parameters that passed validation, `invalid_parameters` carries "The data source rejected these parameters. Check them against the API reference." The [errors docs](https://docs.perceptlayer.com/errors) list every code with its HTTP status. ## Which action fits each error code? Sort the codes by who can fix the problem. If the model can fix it, let it fix the call and try once more. If time fixes it, wait the stated seconds and retry. If nothing in this conversation will change the answer, stop. If only the user can fix it, say so and end the task. Every one of these failures costs 0 credits, so credit cost never decides the action; wasted turns do. | Code | Who fixes it | Agent action | Retry? | | --- | --- | --- | --- | | `invalid_parameters` | The model | Read the message, call `get_endpoint` if needed, correct the parameter | Once, with the fix | | `unknown_endpoint` | The model | Call `search_endpoints`, use a listed ID | Once, with the new ID | | `rate_limited` | Time | Wait the `Retry after N seconds`, then repeat the same call | Yes, after the wait | | `temporarily_unavailable` | Time | Same as `rate_limited` | Yes, after the wait, at most twice | | `source_error`, `timeout` | Maybe time | Retry once later; if it fails again, report it | Once | | `not_found` | Nobody | Accept that there's no data for these parameters; change the question or report it | No, not unchanged | | `insufficient_credits` | The user | Stop and tell the user the balance is used up | No | | `restricted_endpoint` | The user | Stop and tell the user to accept the restricted-endpoint terms | No | | `invalid_api_key` | The user | Stop and tell the user to fix the server's API key | No | `not_found` deserves care. It means the source had nothing for those exact parameters, which is an answer, not a fault. Retrying the same call wastes a turn. A different query, a broader location or another source may succeed, and that's a new call, not a retry. ## What does a recovered call look like? Here's the most common recovery: a parameter outside its allowed values, fixed on the next turn. The model asks for a Google search with `safe` set to a value the endpoint doesn't accept: ```json { "endpoint": "google-search.search", "params": { "query": "best restaurants in Berlin", "safe": "maybe" } } ``` The tool result comes back with `isError: true` and this text: ```text Error invalid_parameters: Invalid parameters: 'safe' must be one of: active, off. (request_id: req_…) ``` The message names the parameter and its allowed values, so the model needs no extra lookup. It sends the call again with `"safe": "off"`, and this time the result is the search JSON followed by a second text block, `Credits used: 1. Credits remaining: …` and the request ID. The failed attempt cost nothing; the whole recovery cost 1 credit. The [Google Search API page](https://perceptlayer.com/apis/google-search) lists that endpoint's other parameters. A rate limit plays out differently. With the free account's 1 request a second, an agent that fires several calls at once gets `rate_limited` on the extras, each ending `Retry after N seconds.` The right move is to wait that long and repeat the same calls, not to change them. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain the per-account limits, and the article on [MCP server rate limiting](https://perceptlayer.com/blog/mcp-server-rate-limiting-agents) covers pacing calls so the limit rarely trips. ## What should the system prompt say? State the mapping in a few plain rules, keyed on the code at the start of the error text, rather than general advice to "handle errors gracefully" that leaves the model to guess what each code means. This block fits any agent that uses the server: ```text When a call_endpoint result starts with "Error :", act on the code: - invalid_parameters or unknown_endpoint: fix the call using the message (call get_endpoint or search_endpoints if you need to), then try once more. - rate_limited or temporarily_unavailable: wait the seconds given after "Retry after", then repeat the same call. Give up after two waits. - source_error or timeout: try once more; if it fails again, say the source is not answering right now. - not_found: there is no data for those parameters. Don't repeat the call. Change the query if that still answers the user's question; otherwise say so. - insufficient_credits, restricted_endpoint, invalid_api_key: stop. Tell the user exactly what the message says they need to do. Don't call other tools to work around it. Never repeat an identical failed call more than once. ``` The last line matters most. It stops the loop where a model answers each failure by resending the same request, which costs no credits but burns turns and fills the context with error lines. ## How do you enforce the rules in code? Count failures per call in the client and refuse to forward a repeat past the limit. A prompt shapes what the model tries; your code decides what actually reaches the server. If you run the agent loop yourself, wrap the tool call: parse the code from the result text, track identical calls, and sleep for `Retry after` before passing a repeat through. The parsing is two regular expressions: ```python import json import re import time ERROR = re.compile(r"^Error (\w+):") RETRY = re.compile(r"Retry after (\d+) seconds") failures = {} def guarded_call(call_tool, endpoint, params, max_repeats=1): key = endpoint + json.dumps(params, sort_keys=True) if failures.get(key, 0) > max_repeats: return "Error retry_limit: this exact call already failed. Change it or stop." text = call_tool("call_endpoint", {"endpoint": endpoint, "params": params}) m = ERROR.match(text) if not m: failures.pop(key, None) return text failures[key] = failures.get(key, 0) + 1 wait = RETRY.search(text) if m.group(1) in ("rate_limited", "temporarily_unavailable") and wait: time.sleep(int(wait.group(1))) return text ``` The error texts above come from the server's source code; we haven't run this guard against a live agent for this article. `call_tool` is whatever function your MCP client uses to call a tool and return its text. The guard sleeps through rate limits so the model's next attempt lands after the window, and it turns a third identical failure into a message the model can't misread. For a hard cap on credits per run as well, the guide to [AI agent cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs) adds a budget check to the same wrapper. To see the error texts for yourself, add the server to your client using the [AI agents (MCP) docs](https://docs.perceptlayer.com/ai-agents) and send a call with a deliberately wrong parameter. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Do failed MCP tool calls cost credits? No. Every error response from the API carries `X-Credits-Used: 0`, and nothing is debited from the balance. Only a successful `call_endpoint` spends the endpoint's credits, 1 for most endpoints. Retries after an error are free in credits, though each one still costs a model turn and context. ### Should an agent retry not\_found? Not with the same parameters. `not_found` means the source had no data for exactly what was asked, so the identical call will return the same answer. The agent should change the query, such as a broader location or different wording, if that still serves the user, or report that nothing was found. ### How long should the agent wait after rate\_limited? The number of seconds in the error text after "Retry after", which comes from the response's `Retry-After` header. Waiting less just produces another `rate_limited`. Free accounts get 1 request a second and paying accounts at least 5, counted per minute across all of an account's keys. ### Why do some errors have no request ID? `unknown_endpoint` and bad `params` shapes are caught by the MCP server before any request reaches the API, so there's no request to identify. Errors from the API itself, such as `invalid_parameters` from validation or `rate_limited`, include a `request_id` you can quote to support. ### Can the agent fix insufficient\_credits itself? No, and it shouldn't try. The balance is prepaid and there's no automatic top-up, so the call fails until someone buys credits. The agent should stop and tell the user. Calling other endpoints won't help, because every paid call fails the same way until the balance is topped up on the [pricing page](https://perceptlayer.com/pricing). mcp error handling ai agents retries tool calling ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Sept 2026 Perceptlayer 7 min read ## [MCP Server Too Many Tools: Keeping Agent Context Small](https://perceptlayer.com/blog/mcp-too-many-tools-context) One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small. --- title: "Search Result Data for SEO Monitoring: Fields to Track" description: "Which search result fields to store per keyword per day, from position to snippet, and what 200 keywords tracked daily cost in credits." url: https://perceptlayer.com/blog/search-result-data-seo-monitoring --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Search Result Data for SEO Monitoring: Fields to Track 3 Sept 2026 Perceptlayer 8 min read For SEO monitoring with SERP data, store one row per keyword, per day, per market and device: the organic `position`, the `rank_absolute`, the `title`, the `link` and the `snippet`. Add the related questions and related searches as a second table. At 1 credit per call, 200 keywords checked daily cost 6,000 credits a month, and the fields below tell you why rankings moved. ## Key takeaways - Store `position` and `rank_absolute` separately. In the recorded response, the first organic result has `position` 1 but `rank_absolute` 4, with local results at `rank_absolute` 1 and 2 above it. - Keep `title` and `snippet` every day. A rank change with no title change points at the page's competition; a title change points at a rewrite, while a snippet can change without any page edit. - Key every row by date, keyword, `gl`, `hl` and `device`, or day-to-day comparisons mix different result pages. - 200 keywords × 1 credit × 30 days = 6,000 credits a month. The 100 free credits on signup cover the first 100 checks, half of one day's run. - The same search response carries `related_questions` and `related_searches`, so tracking them adds no calls. ## Which SERP data fields matter for SEO monitoring? Five fields carry most of the signal: `position`, `rank_absolute`, `title`, `link` and `snippet`. Position tells you where a page ranks among organic results, the link tells you who holds it, and the title and snippet show how that page presents itself. Everything else either explains movement or is noise for rank tracking. Here is what the [Search endpoint](https://perceptlayer.com/apis/google-search/search) returns for each organic result, taken from the recorded response for `best restaurants in Berlin`. | Field | What it holds | Why you store it | | --- | --- | --- | | `position` | Rank among organic results | The number you report | | `rank_group` | A second rank number; it equals `position` in the recorded organic results | Store it if you want to compare with other result types | | `rank_absolute` | A page-wide rank that also numbers other modules | Shows how far down the page a result sits | | `title` | The result's title | Detects rewrites and competitor changes | | `link` | The ranking URL | Tells you which of your pages ranks, and which rival | | `displayed_link` | The breadcrumb-style URL shown | Useful for spotting site structure changes | | `snippet` | The text shown under the title | Detects snippet changes and date stamps | | `source` | The site name | Quick grouping by publisher | Two things about this table. `redirect_link` also comes back, but it is a Google redirect URL, so use `link` as the key. And `snippet_highlighted_words` shows which words matched the query, which is handy for content audits but optional for monitoring. ## Why store both position and absolute rank? In the recorded response, `position` numbers the organic results 1, 2 and so on, while `rank_absolute` is a page-wide number that the local results share. A result can hold position 1 and still sit well down the page, and only the second number shows it. The recorded response makes this concrete. The local results carry `rank_absolute` 1 and 2, and the first organic result carries 4. This excerpt is trimmed with `…`: ```json { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. …", "rank_group": 1, "rank_absolute": 4 } ``` Position 1, absolute 4. If you only stored `position`, you could see a flat line while clicks fell because modules sit above the result. Storing both gives you a way to tell a ranking loss from a layout change. The same response lists `local_results` and `serp_results` entries with their own `rank_absolute` values. Counting how many modules sit above your result each day gives you a layout trend with no extra calls. ## What should you store per keyword per day? Store one row per keyword per day per market, with the organic results as child rows. The key is the date, the keyword and the parameters that change the page: `gl` (country), `hl` (language) and `device`. Leave any of them out and you'll compare a desktop page in one country with a mobile page in another. A workable layout has three tables. | Table | Key | Columns | | --- | --- | --- | | `checks` | date, keyword, `gl`, `hl`, `device` (unique) | `organic_results_count`, fetched time | | `results` | check, `position` | `rank_absolute`, `title`, `link`, domain, `snippet` | | `questions` | check, kind, text | kind ( `related_questions` or `related_searches`) and the question or search text | Keep every organic result, not just your own. Competitor rows are what turn a drop from "we lost position 3" into "a new domain took position 3 with a rewritten title". Store the domain as its own column, parsed from `link`, so a group-by is cheap. Don't store `redirect_link` or the pagination links; they're long, change per call and add nothing to analysis. Keep the raw JSON in cold storage only if you want to re-parse later. For loading JSON into a warehouse, see [loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres). ## How do related questions fit into rank monitoring? Related questions show which follow-up queries Google attaches to a keyword, and they change over time. The Search response already includes `related_questions` and `related_searches`, so you can log them in the same call that returns your rankings. Each question is a content idea, and a new one appearing is a signal worth reading. From the recorded response: ```json "related_questions": [ { "question": "What is the coolest restaurant in Berlin?", "next_page_token": "fc=EqEBCmJBSmlUNHRMWjV0…" }, … ] ``` Store the `question` text and diff it against yesterday's set. The `next_page_token` is only useful if you want to expand a question with the [Related Questions endpoint](https://perceptlayer.com/apis/google-related-questions/related-questions), which takes `q`, `next_page_token`, `hl` and `gl` and costs 1 credit per call. Expanding every question for every keyword multiplies your cost, so do it for a short list of keywords that matter most. For a view of how interest in a topic moves over longer periods, pair this with [search trend data](https://perceptlayer.com/blog/search-trend-data-demand-forecasting). For the endpoint itself, the [Google Search API guide](https://perceptlayer.com/blog/google-search-api-json) covers the parameters. ## How do you pull the data for 200 keywords? Loop over your keyword list, call `GET /v1/google-search/search` once per keyword with `query`, `gl`, `hl` and `device`, and write the fields above into SQLite or your warehouse. The script below does that for a list in `keywords.txt`, one keyword per line, retries a 429 or 503 up to three times, and logs and skips any keyword that still fails. ```python import os import sqlite3 import time from datetime import date, datetime, timezone from urllib.parse import urlparse import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} MARKET = {"gl": "us", "hl": "en", "device": "desktop"} MAX_ATTEMPTS = 3 db = sqlite3.connect("serp.db") db.executescript(""" CREATE TABLE IF NOT EXISTS checks ( id INTEGER PRIMARY KEY, day TEXT, keyword TEXT, gl TEXT, hl TEXT, device TEXT, organic_results_count INTEGER, fetched_at TEXT, UNIQUE (day, keyword, gl, hl, device)); CREATE TABLE IF NOT EXISTS results ( check_id INTEGER REFERENCES checks(id), position INTEGER, rank_absolute INTEGER, title TEXT, link TEXT, domain TEXT, snippet TEXT, PRIMARY KEY (check_id, position)); CREATE TABLE IF NOT EXISTS questions ( check_id INTEGER REFERENCES checks(id), kind TEXT, text TEXT, PRIMARY KEY (check_id, kind, text)); """) def search(keyword): """Return the parsed response, or None after logging a failure.""" for attempt in range(1, MAX_ATTEMPTS + 1): try: r = requests.get( f"{BASE}/v1/google-search/search", params={"query": keyword, **MARKET}, headers=HEADERS, timeout=60, ) except requests.RequestException as e: print(f"{keyword!r}: attempt {attempt} failed: {type(e).__name__}") time.sleep(5) continue if r.status_code in (429, 503): print(f"{keyword!r}: HTTP {r.status_code}, attempt {attempt}") time.sleep(int(r.headers.get("Retry-After", "5"))) continue if not r.ok: # 403 restricted_endpoint, 402 insufficient_credits and so on: # retrying won't help, so log it and move to the next keyword. print(f"{keyword!r}: HTTP {r.status_code}, skipping") return None return r.json() print(f"{keyword!r}: gave up after {MAX_ATTEMPTS} attempts") return None today = date.today().isoformat() with open("keywords.txt") as f: keywords = [line.strip() for line in f if line.strip()] failed = [] for kw in keywords: data = search(kw) if data is None: failed.append(kw) continue key = (today, kw, MARKET["gl"], MARKET["hl"], MARKET["device"]) organic = data.get("organic_results", []) with db: # one transaction per keyword # A rerun replaces today's rows for this key instead of doubling them. old = db.execute( "SELECT id FROM checks WHERE day=? AND keyword=? AND gl=? " "AND hl=? AND device=?", key).fetchone() if old: db.execute("DELETE FROM results WHERE check_id=?", old) db.execute("DELETE FROM questions WHERE check_id=?", old) db.execute("DELETE FROM checks WHERE id=?", old) check_id = db.execute( "INSERT INTO checks (day, keyword, gl, hl, device, " "organic_results_count, fetched_at) VALUES (?,?,?,?,?,?,?)", (*key, len(organic), datetime.now(timezone.utc).isoformat()), ).lastrowid for item in organic: link = item.get("link", "") db.execute( "INSERT OR REPLACE INTO results VALUES (?,?,?,?,?,?,?)", (check_id, item.get("position"), item.get("rank_absolute"), item.get("title"), link, urlparse(link).netloc, item.get("snippet")), ) for q in data.get("related_questions", []): db.execute("INSERT OR IGNORE INTO questions VALUES (?,?,?)", (check_id, "related_questions", q.get("question"))) for s in data.get("related_searches", []): db.execute("INSERT OR IGNORE INTO questions VALUES (?,?,?)", (check_id, "related_searches", s.get("query"))) print(f"done: {len(keywords) - len(failed)} stored, {len(failed)} failed") for kw in failed: print("retry later:", kw) ``` Rate limits are per account, counted per minute. A free account gets 1 request a second, so 200 sequential keywords take at least 200 seconds there; paying accounts run at least 5 a second. The [rate limits page](https://docs.perceptlayer.com/rate-limits) has the details, and [concurrent requests under a rate limit](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) shows how to parallelise. Run it daily with cron or a queue; [scheduling web data pulls](https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue) compares the options. A request whose reply was lost might have succeeded and been billed, because requests have no idempotency key. For a daily snapshot that's a small risk, but the script deletes and rewrites a key's rows, so a rerun on the same day replaces them rather than doubling them. A `403` with `restricted_endpoint` is not retried: if a call returns it, accept the restricted-endpoint terms in the dashboard and rerun. The script logs the failed keywords at the end, so you can rerun the list once the cause is fixed. ## What does tracking 200 keywords daily cost? At 1 credit per successful call, 200 keywords checked once a day cost 200 credits a day: 200 × 30 = 6,000 credits for a 30-day month, or 200 × 365 = 73,000 credits for a year. Failed calls cost nothing and return `X-Credits-Used: 0`, so retries on errors don't add to the total. | Setup | Calls a day | Credits a month (30 days) | | --- | --- | --- | | 200 keywords, one market and device | 200 | 6,000 | | 200 keywords, desktop and mobile | 400 | 12,000 | | 200 keywords, plus Related Questions on 20 of them | 220 | 6,600 | | 200 keywords, checked weekly | about 29 | about 800 | The weekly row is 200 × 4 = 800 credits for four checks in a month. The free tier gives 100 credits once, after email verification: half of one 200-keyword check (100 ÷ 200), so either setup needs a pack after a first test. The weekly setup's 800 credits a month fit the Starter pack for 12 months. The Starter pack is 10,000 credits. The first row (6,000 a month) fits inside it, but the second row, at 12,000, does not. Purchased credits last 12 months, and there's no subscription, so a pack is not a monthly commitment. [Pricing](https://perceptlayer.com/pricing) shows what credits cost, and the [credits page](https://docs.perceptlayer.com/credits) explains how they're debited. Every response carries `X-Credits-Remaining`, so log it and alert before the balance runs out; an empty balance returns `insufficient_credits` (402) and nothing more is debited. Be honest about the trade-offs. Daily checks on every keyword are rarely needed. Daily for your top 50 and weekly for the long tail gets most of the value at a fraction of the credits. And rank data from a single call is a snapshot of the page as returned at that moment. Compare trends over weeks, not a single day's move, and run the [data quality checks](https://perceptlayer.com/blog/web-data-quality-monitoring-checklist) before you alert on a drop. For what Google says about how titles and snippets are chosen, read its guidance on [snippets in search results](https://developers.google.com/search/docs/appearance/snippet), which explains why your stored snippets will change without you touching the page. For first-party click and impression data, [Search Console's performance report](https://support.google.com/webmasters/answer/7042828) is the primary source and complements this: it tells you your own traffic, while the monitoring above tells you who else is on the page. To try it, [get a free API key](https://perceptlayer.com/signup), then run one keyword in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search) before you loop over all 200. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Google Related Questions **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/google-related-questions) ## Frequently asked questions ### What is the minimum I should store for rank tracking? Store the date, keyword, `gl`, `hl`, `device`, and for each organic result the `position`, `rank_absolute`, `link`, `title` and `snippet`. That is enough to plot rank, spot a competitor taking over, and see rewrites. Add related questions if you also want to track which follow-up questions appear for a keyword. ### How many credits does tracking 200 keywords every day use? 200 keywords × 1 credit × 30 days = 6,000 credits a month, or 73,000 a year at 200 × 365. Desktop and mobile together double it to 12,000 a month. Failed calls are not billed, and the free tier's 100 credits, granted once on signup, cover the first 100 checks. ### Do I need a separate call for related questions? Not to read them. The Search response includes `related_questions` and `related_searches`, as the recorded response shows. A separate call to the Related Questions endpoint, at 1 credit, is only needed to expand a question using its `next_page_token`, or to look up questions for a query directly with `q`. ### Why does my position differ from what I see in the browser? Results vary with country, language, device and the time of the call. Pass `gl`, `hl` and `device` explicitly so every day's check uses the same settings, and treat the data as returned at the time of the call. Compare your series with a browser check in the same market, not a personalised session. ### What happens if a daily run hits the rate limit? A 429 response carries a `Retry-After` header with the seconds to wait; the script above sleeps for that long and retries, up to three attempts, then logs the keyword and moves on. Limits are per account and counted per minute. Retried 429s are errors, so they aren't billed. See the [errors page](https://docs.perceptlayer.com/errors) for every code. seo serp rank tracking google search monitoring ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 7 min read ## [Rank Tracking API: Track Google Positions as JSON](https://perceptlayer.com/blog/rank-tracking-api) Build a daily rank check from one Google search call per keyword and location: read organic\_results position and link, store them, 1 credit a check. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 8 Aug 2026 Updated 2 Nov 2026 Perceptlayer 7 min read ## [News Data for Event Detection: Signals and Noise](https://perceptlayer.com/blog/news-data-event-detection) Turn news search results into event signals: drop duplicate URLs, cluster syndicated titles, count distinct sources in a window, and compare with a baseline. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Jul 2026 Perceptlayer 7 min read ## [Google AI Overview API: Get AI Overviews as JSON](https://perceptlayer.com/blog/google-ai-overview-api) Google has no AI Overview API. GET /v1/google-search/search-ai-overview takes a query, hl and gl, costs 1 credit, and suits daily keyword tracking. --- title: "Google Scholar API: Search Papers and Citations as JSON" description: "Search Google Scholar as JSON: the search endpoint's parameters, a recorded response with citation counts, and a flat 1 credit per call." url: https://perceptlayer.com/blog/google-scholar-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Scholar API: Search Papers and Citations as JSON 1 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read Google's Scholar pages don't point to a developer API, so a third-party one is the practical route. The Perceptlayer Google Scholar API gives you five `GET` endpoints that return JSON: search, author, author-citation, author-co-authors and cite. Each successful call costs 1 credit, and failed calls cost nothing. Send your key in the `X-API-Key` header and you can have a result list in one request. Only search has a recorded response, so the other four sections list parameters and leave the details to their endpoint pages. ## Key takeaways - `GET /v1/google-scholar/search` takes an optional `q` (up to 500 characters) plus `as_ylo`, `as_yhi`, `start`, `num`, `cites` and `cluster`. - Each organic result carries `title`, `result_id`, `link`, `snippet` and `publication_info.summary`. Cited results add `inline_links.cited_by.total`. - The `cites` parameter takes a string. In the recording, `cited_by.link` carries the same value as `cited_by.cites_id`. - All five endpoints cost 1 credit per successful call. The free tier's 100 credits on signup cover 100 calls. - The author endpoints take a required `user` parameter, `author-citation` also needs a `citation_id`, and `cite` requires `q`. Only search has a recorded response here; those four are covered by parameters alone. ## Is there an official Google Scholar API? Google doesn't point to one on its Scholar pages. [Google's Scholar about page](https://scholar.google.com/intl/en/scholar/about.html) describes a search product and doesn't mention a developer API. That isn't proof that none exists, so check Google's own documentation before you rely on this. If you need paper search, author profiles or citation counts as structured data, you either build a parser yourself or call a service that returns the fields as JSON. That second route is what this guide covers. The Perceptlayer endpoints return named fields, so a script can read `title` and `inline_links.cited_by.total` without touching HTML. Data is collected from publicly available sources and returned as found at the time of the call. You get no guarantee of completeness, so treat counts as a snapshot. If you only need open metadata, other services fit better. [OpenAlex](https://docs.openalex.org/), [Crossref](https://www.crossref.org/documentation/retrieve-metadata/rest-api/) and [Semantic Scholar](https://www.semanticscholar.org/product/api) publish documented APIs for scholarly metadata. Use Scholar-specific endpoints when you need what Google Scholar shows: its ranking, its "cited by" counts and its author profiles. ## What does a Google Scholar search request look like? One `GET` to `/v1/google-scholar/search` with a query returns a page of papers. This request asks for ten results for "machine learning", in English, published since 2020: ```bash curl "https://api.perceptlayer.com/v1/google-scholar/search?q=machine+learning&hl=en&num=10&as_ylo=2020" \ -H "X-API-Key: $API_KEY" ``` If you don't have a key yet, [get a free API key](https://perceptlayer.com/signup) first. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the header and the `api_key` query-parameter fallback for clients that can't set headers. Keys start with `sk_live_`. You can also run the call without writing code. The [Google Scholar API page](https://perceptlayer.com/apis/google-scholar) has a playground: pick the endpoint, fill in the parameters and run a real call with your key. ## Which parameters does the search endpoint take? The search endpoint has no required parameters. Everything is optional, though a request without `q` or `cites` gives you little to look at. The table gives each parameter's type and allowed values, which is all the catalogue documents. Defaults and page sizes aren't specified. | Parameter | Type | Notes | | --- | --- | --- | | `q` | string | The search query, up to 500 characters | | `hl` | string | Optional; the example request uses `en` | | `start` | integer | Optional | | `num` | integer | Optional | | `as_ylo` | integer | Optional; the example request uses `2020` | | `as_yhi` | integer | Optional | | `scisbd` | integer | One of `0`, `1`, `2` | | `cites` | string | Optional; see the `cites_id` note below | | `cluster` | string | Optional | The recorded request combines `hl`, `num` and `as_ylo`. For a loop that stops safely and doesn't double-bill, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). The [search endpoint page](https://perceptlayer.com/apis/google-scholar/search) lists the same parameters. ## What does the search response contain? The response wraps everything in `success` and `data`. Inside `data`, `search_parameters` echoes your inputs, `search_information` reports the totals, and `organic_results` holds the papers. Here's an excerpt of a recorded response for the request above: ```json { "success": true, "data": { "search_parameters": { "engine": "google_scholar", "q": "machine learning", "hl": "en", "start": 0, "num": 10, "as_ylo": "2020", "scisbd": 0 }, "search_information": { "query_displayed": "machine learning", "total_results": 38300, "result_stats": "About 38,300 results (0.12 sec)" }, "organic_results": [ { "position": 1, "title": "Machine learning", "result_id": "WHD7vRZpYhIJ", … "publication_info": { "summary": "S Marsland - Computing Handbook, 2022 - api.taylorfrancis.com", … } }, { "position": 2, "title": "Machine learning", "result_id": "K_YKyl3arXoJ", … "inline_links": { "cited_by": { "total": 292, "link": "https://scholar.google.com/scholar?cites=8839961739954681387&as_sdt=2005&sciodt=0,5&hl=en", "cites_id": "8839961739954681387" }, … } } ] } } ``` The fields you'll use most are listed here. Each one appears in the recorded response above. | Field | What it holds | | --- | --- | | `position` | Rank of the result in the list | | `title` | The paper or chapter title | | `result_id` | Scholar's identifier for the result | | `link` | URL of the paper or its host page | | `snippet` | The text excerpt Scholar shows under the title | | `publication_info.summary` | Authors, venue, year and host in one string | | `inline_links.cited_by.total` | Citation count | | `inline_links.cited_by.cites_id` | Identifier for the citing set | Not every result has every field. In the recording, the first result has no `inline_links` block, while the second has `cited_by.total` set to 292. Read optional fields with a default instead of assuming they exist. ## How do you get citation counts from the response? Read `inline_links.cited_by.total` on each entry in `organic_results`, and treat a missing block as "no count". In the recording, `cited_by.total` is the citation count field. This short script prints each title with its count and rank: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/google-scholar/search", params={"q": "machine learning", "hl": "en", "num": 10, "as_ylo": 2020}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) resp.raise_for_status() for item in resp.json()["data"]["organic_results"]: cited = item.get("inline_links", {}).get("cited_by", {}).get("total") print(item["position"], item["title"], cited) ``` Check `X-Credits-Used` and `X-Credits-Remaining` on the response if you track spend. A successful call reports 1 for the first. A failed call reports `X-Credits-Used: 0` and isn't billed. ### Follow a paper's citations with `cites` The `cited_by.link` in the recording carries a `cites=` query value, and the same value appears as `cites_id`. The search endpoint has a `cites` parameter, typed as a string. The catalogue doesn't describe what it does, so try passing a `cites_id` there on one paper and inspect the response before you build a loop around it. ## What do the author, co-author, citation and cite endpoints do? Four more endpoints cover authors, an author's citation entry and the cite lookup. We only have a recorded response for search, so this section lists their parameters, and the endpoint pages carry the details. All four take `GET` and cost 1 credit. | Endpoint | Required | Optional | | --- | --- | --- | | [`/v1/google-scholar/author`](https://perceptlayer.com/apis/google-scholar/author) | `user` | `hl`, `num`, `start`, `sort` | | [`/v1/google-scholar/author-citation`](https://perceptlayer.com/apis/google-scholar/author-citation) | `user`, `citation_id` | `hl` | | [`/v1/google-scholar/author-co-authors`](https://perceptlayer.com/apis/google-scholar/author-co-authors) | `user` | `hl` | | [`/v1/google-scholar/cite`](https://perceptlayer.com/apis/google-scholar/cite) | `q` | `hl` | All three author endpoints require `user`. `sort` on the author endpoint accepts `title` or `pubdate`, and it also takes `num` and `start`. `author-citation` additionally requires a `citation_id`, and `cite` requires `q`. See the [author](https://perceptlayer.com/apis/google-scholar/author), [author-citation](https://perceptlayer.com/apis/google-scholar/author-citation), [author-co-authors](https://perceptlayer.com/apis/google-scholar/author-co-authors) and [cite](https://perceptlayer.com/apis/google-scholar/cite) pages for what each returns. A request for an author's co-authors looks like this, with your own `user` value: ```bash curl "https://api.perceptlayer.com/v1/google-scholar/author-co-authors?user=USER_ID&hl=en" \ -H "X-API-Key: $API_KEY" ``` Author profiles are personal data in the sense that they name real people. Use them for research and bibliometrics, and don't use them to contact people or build profiles without a lawful basis. Endpoints that return personal data can be restricted. If a call returns `restricted_endpoint` (403), accept the restricted-endpoint terms in the dashboard and retry. ## How much does a Google Scholar API call cost? Every endpoint above costs 1 credit per successful call, and a failed call costs nothing. Credits are prepaid, so when your balance reaches zero the API returns `insufficient_credits` (402) and nothing more is debited. There's no automatic top-up. The [credits docs](https://docs.perceptlayer.com/credits) cover the headers, and the [pricing page](https://perceptlayer.com/pricing) shows what credits cost. | Source of credits | Credits | | --- | --- | | Free tier | 100, once, on signup | | Starter pack | 10,000 | | Build pack | 50,000 | | Growth pack | 200,000 | Larger packs (Pro, Scale and Volume) also exist, up to 5,000,000 credits. The free tier needs a verified email address and no credit card. Purchased credits last 12 months, with no subscription and no seats. A worked example: a literature scan that runs 20 search calls, one per query, makes 20 calls × 1 credit = 20 credits, well inside the free tier. At 10,000 search calls a month you'd spend 10,000 calls × 1 credit = 10,000 credits, which equals one Starter pack. For what a pack costs, see [pricing](https://perceptlayer.com/pricing). ## What goes wrong, and how do you handle it? Errors come back as an HTTP status and a JSON body shaped `{"error": {"code", "message", "request_id"}}`. The codes you're most likely to meet here are `invalid_api_key` (401), `invalid_parameters` (422), `rate_limited` (429), `source_error` (502) and `temporarily_unavailable` (503). The [errors docs](https://docs.perceptlayer.com/errors) list all of them. For 429 and 503, read the `Retry-After` header and wait that many seconds. Requests have no idempotency key, so a call whose reply was lost to a client timeout may have succeeded and been billed. [Retrying web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers how to handle that, and the [rate limit docs](https://docs.perceptlayer.com/rate-limits) give the limits. If you're building an agent that looks up papers on demand, the same endpoints work through the MCP server. The `call_endpoint` tool takes an endpoint ID and its parameters. See [MCP server for web scraping](https://perceptlayer.com/blog/mcp-server-for-web-scraping) or the [MCP docs](https://docs.perceptlayer.com/ai-agents). Next step: run the search call above in the [playground on the Google Scholar API page](https://perceptlayer.com/apis/google-scholar), then copy the cURL into your own script. ## APIs in this post - [Google Scholar **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-scholar) ## Frequently asked questions ### Does Google Scholar have an official API? Google's Scholar about page doesn't mention one, though we can't prove none exists. To get results and citation counts as JSON, you call a service that returns them as fields. The Perceptlayer Google Scholar API exposes five endpoints for this, and each successful call costs 1 credit. ### How much does the Google Scholar API cost? Each successful call to any of the five endpoints costs 1 credit, and failed calls cost nothing. The free tier gives 100 credits after you verify an email. Paid packs start at 10,000 credits (the Starter pack), so 10,000 calls × 1 credit = 10,000 credits. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Is there an endpoint for authors and co-authors? Yes, there are two, though we have no recorded response for them. The `author` endpoint takes a required `user` and optional `hl`, `num`, `start` and `sort` ( `title` or `pubdate`). The `author-co-authors` endpoint takes `user` and optional `hl`. Each call costs 1 credit. Use them for research, and not to contact people. ### How do I filter Google Scholar results by year? Pass `as_ylo` for the earliest year and `as_yhi` for the latest on the search endpoint. Both are integers. The recorded request above used `as_ylo=2020`, and the response echoed it back inside `search_parameters`. Filtering doesn't change the price: the call still costs 1 credit. ### What happens if a call fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`. Failed calls return `X-Credits-Used: 0` and aren't billed. For 429 and 503, wait the number of seconds in `Retry-After`. If a client timeout hid the reply, the call may still have been billed. google scholar citations academic search research data search engines ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 31 Oct 2026 Perceptlayer 8 min read ## [Google Scholar Scraper or API: What You Get](https://perceptlayer.com/blog/google-scholar-scraper-vs-api) A Google Scholar scraper vs search endpoints at 1 credit a call: a recorded machine learning search with cited\_by.total, and the cost per paper tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. --- title: "Kiwi.com API: Search Fares and Cheapest Dates as JSON" description: "Search Kiwi.com fares by origin, destination and date, then scan a window with calendar-cheapest-dates. A recorded London–Barcelona response and costs." url: https://perceptlayer.com/blog/kiwi-flights-api-cheapest-dates --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Kiwi.com API: Search Fares and Cheapest Dates as JSON 1 Sept 2026 Perceptlayer 6 min read Kiwi.com's own API is now for invited business partners, so most developers can't get a key for it. To read Kiwi.com fares as JSON, call `GET /v1/kiwi/flights-search` with `origin`, `destination` and `departure_date`; each successful call costs 1 credit and returns itineraries with price, carriers, stops, duration, baggage and a booking link. For a date window, `GET /v1/kiwi/calendar-cheapest-dates` takes a `start_date` and `end_date` in one call. ## Key takeaways - `flights-search` needs `origin`, `destination` and `departure_date`; `cabin`, `max_stops`, `sort` ( `quality`, `price` or `duration`), `currency` and passenger counts are optional. - A recorded search from `LON` to `BCN` returned flights from both Luton and Stansted, so a city code covers all of a city's airports. - `duration` is in seconds: the recorded Ryanair flight shows `7800`, 2 hours 10 minutes, for a 15:35 departure and 18:45 local arrival one time zone east. - Scanning 30 departure dates one by one is 30 `flights-search` calls, 30 credits. `calendar-cheapest-dates` asks for the whole window in a single 1-credit call. - All 7 Kiwi.com endpoints cost 1 credit per successful call, and failed calls cost nothing. ## Can you still get a Kiwi.com API key? Not unless Kiwi.com invites you. Kiwi.com used to give public access to its Tequila platform, which included the API, a white-label product and an affiliate programme. It has since narrowed that to key business partnerships, and new Tequila partnerships are by invitation only; existing partners keep their tools and documentation ( [Kiwi.com](https://media.kiwi.com/articles-and-interviews/better-for-business-kiwi-com-takes-a-new-approach-to-partnerships/), 2024). If you're a travel agency that wants to sell Kiwi.com itineraries and take bookings, the partner route is the right one: the [Tequila site](https://tequila.kiwi.com/) asks prospective affiliates to get in touch with Kiwi.com by email (2026). If you want to read fares for research, alerts or an agent, the [Kiwi.com API](https://perceptlayer.com/apis/kiwi) returns what the site shows, as JSON, with the same key as every other API in the catalogue. It doesn't book anything: each itinerary carries a `booking_url` that opens the booking page on Kiwi.com. ## What can the Kiwi.com API return? Seven GET endpoints cover search, a single itinerary, date flexibility and destination discovery. Each costs 1 credit per successful call. The two that matter most are `flights-search` for one route on one date and `calendar-cheapest-dates` for one route across a window. `locations` turns a place name into the codes the other endpoints take. | Endpoint | Use it for | Required | | --- | --- | --- | | [`/v1/kiwi/flights-search`](https://perceptlayer.com/apis/kiwi/flights-search) | Itineraries for one route and date | `origin`, `destination`, `departure_date` | | `/v1/kiwi/flights-detail` | One itinerary from a search | `origin`, `destination`, `departure_date`, `itinerary_id` | | [`/v1/kiwi/calendar-cheapest-dates`](https://perceptlayer.com/apis/kiwi/calendar-cheapest-dates) | Cheapest dates in a window | `origin`, `destination`, `start_date`, `end_date` | | `/v1/kiwi/calendar-price-graph` | Prices across a window for a stay length | adds `nights_min`, `nights_max` | | [`/v1/kiwi/explore-price-map`](https://perceptlayer.com/apis/kiwi/explore-price-map) | Destinations from one origin | `origin`, `start_date`, `end_date` | | `/v1/kiwi/flights-one-per-city` | One flight per destination city | `origin`, `departure_date` | | `/v1/kiwi/locations` | Place name to codes | `query` | `explore-price-map` also takes a bounding box ( `south_west_lat`, `south_west_lng`, `north_east_lat`, `north_east_lng`) and a `limit`, which is how you ask "where can I fly from London in December" for one region of the map. ## How do you search Kiwi.com fares? Send `origin`, `destination` and `departure_date` to `GET /v1/kiwi/flights-search`. Codes can be airports or cities: the recorded request below uses `LON` for London and `BCN` for Barcelona. Add `return_date` for a return trip. If you don't know a code, call `/v1/kiwi/locations?query=London` first. This is the request behind the recorded response in the next section: ```bash curl "https://api.perceptlayer.com/v1/kiwi/flights-search?origin=LON&destination=BCN&departure_date=2026-12-04" \ -H "X-API-Key: $API_KEY" ``` You need a key in the `X-API-Key` header; [get a free API key](https://perceptlayer.com/signup), and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ### Which parameters does flights-search take? Three are required and fourteen optional. The table lists them with the types and allowed values from the endpoint definition. Nothing else is documented about defaults, although the recorded response echoes the values it used, such as `cabin` `economy`, `currency` `EUR` and `sort` `quality`. | Parameter | Type | Notes | | --- | --- | --- | | `origin` | string, required | Airport or city code, such as `LON` | | `destination` | string, required | Airport or city code, such as `BCN` | | `departure_date` | string, required | `YYYY-MM-DD` | | `return_date` | string | For a return trip | | `adults`, `children`, `infants` | integer | Passenger counts | | `cabin` | string | `economy`, `premium_economy`, `business` or `first` | | `max_stops` | integer | `0` for direct flights only | | `min_price`, `max_price` | integer | Price bounds | | `sort` | string | `quality`, `price` or `duration` | | `limit` | integer | Itineraries to return | | `currency`, `locale` | string | Display currency and language | | `carriers[]`, `exclude_carriers[]` | list of strings | Airline codes to include or exclude | To see only direct flights on one airline, combine `max_stops=0` with `carriers[]=FR`. ### What does a flights-search response look like? The response echoes the search, gives `total_available`, and lists `itineraries`. The recorded London to Barcelona search on 2026-12-04 found 23. Here is the first itinerary, trimmed with `…`: ```json { "success": true, "data": { "trip_type": "one_way", "origin": "LON", "destination": "BCN", "departure_date": "2026-12-04", "cabin": "economy", "currency": "EUR", "sort": "quality", "total_available": 23, "itineraries": [ { "id": "ItineraryOneWay:eyJwcm92aWRlcnMiOiJLSVdJLUJBU0lDOktJV0kiLCJyb3V0ZV9kYXRhIjoiRlI6NzgwNzpMVE46MTc5NjM5ODUwMDpCQ046MTc5NjQwNjMwMDplY29ub215OkZhbHNlOjo6IiwicHJpY2Ui…", "price": { "amount": 29, "currency": "EUR", "formatted": "29 €" }, "duration": 7800, "stops": 0, "carriers": [{ "code": "FR", "name": "Ryanair", "icao": "RYR" }], "departure": { "airport_code": "LTN", "city": "London", "local_time": "2026-12-04T15:35:00" }, "arrival": { "airport_code": "BCN", "city": "Barcelona", "local_time": "2026-12-04T18:45:00" }, "segments": [{ "flight_number": "FR7807", "cabin_class": "ECONOMY", "duration": 7800, … }], "booking_url": "https://www.kiwi.com/en/booking/?direct=true&locale=en¤cy=eur&passengers=1-0-0&token=…", … }, … ] }, … } ``` The second itinerary is FR8216 from Stansted ( `STN`) at 32 EUR, which is how you know `LON` searched every London airport. Times are local to each airport, so compute flight time from `duration` rather than from the two timestamps. Each itinerary's `id` is what `flights-detail` takes as `itinerary_id`, up to 2,000 characters. For what the `baggage` block says about the real price of a cheap fare, see [what fare tracking can and cannot show](https://perceptlayer.com/blog/flight-price-data-fare-tracking). ## How do you find the cheapest date to fly? Use `GET /v1/kiwi/calendar-cheapest-dates` with a route and a window. It takes `origin`, `destination`, `start_date` and `end_date`, plus optional `nights_min` and `nights_max` for a return stay, and returns the cheapest dates in that window in one call. We don't have a recorded response for it, so run it in the playground on the [Kiwi.com API page](https://perceptlayer.com/apis/kiwi) to see its fields and how wide a window it accepts. ```bash curl "https://api.perceptlayer.com/v1/kiwi/calendar-cheapest-dates?origin=LON&destination=BCN&start_date=2026-12-01&end_date=2026-12-30¤cy=EUR" \ -H "X-API-Key: $API_KEY" ``` When you need full itineraries for every date, not only the cheapest, loop over `flights-search` instead. This script scans 30 departure dates and keeps the lowest `price.amount` for each, using only fields from the recorded response: ```python import datetime as dt import os import requests URL = "https://api.perceptlayer.com/v1/kiwi/flights-search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} start = dt.date(2026, 12, 1) for i in range(30): day = (start + dt.timedelta(days=i)).isoformat() r = requests.get(URL, params={"origin": "LON", "destination": "BCN", "departure_date": day, "currency": "EUR"}, headers=HEADERS, timeout=60) if r.status_code != 200: print(day, "error", r.json()["error"]["code"]) continue its = r.json()["data"]["itineraries"] if not its: print(day, "no itineraries") continue best = min(its, key=lambda x: x["price"]["amount"]) print(day, best["price"]["amount"], best["carriers"][0]["code"], best["departure"]["airport_code"], best["duration"] // 60, "min") ``` The script reads only fields from the recording, but we haven't run it live for this article. Each line prints the date, the lowest fare, the airline, the departure airport and the flight time in minutes. A day that fails prints its error code and costs nothing. ## What does a 30-day date scan cost? Every Kiwi.com endpoint costs 1 credit per successful call, so the cost depends on how many calls the scan takes. With `flights-search`, one call per departure date makes a 30-day scan 30 × 1 = 30 credits per route. With `calendar-cheapest-dates`, the same window is one call, 1 credit, if the endpoint accepts a 30-day range. | Scan | Calls per route | Credits per route | Daily for 30 days | | --- | --- | --- | --- | | `flights-search`, 30 dates | 30 | 30 | 30 × 30 = 900 | | `calendar-cheapest-dates`, one window | 1 | 1 | 1 × 30 = 30 | | Calendar, then `flights-search` on the 3 cheapest dates | 4 | 4 | 4 × 30 = 120 | The last row is the usual compromise: let the calendar find the dates, then pull full itineraries only for the ones worth showing. Watching 10 routes that way daily is 4 × 10 = 40 credits a day, or 120 × 10 = 1,200 credits a month. The 100 free credits on signup cover the first two days, and a Starter pack of 10,000 credits covers eight months. Failed calls return `X-Credits-Used: 0`. See the [credits docs](https://docs.perceptlayer.com/credits) for the balance and [pricing](https://perceptlayer.com/pricing) for what packs cost. To try it, run the London to Barcelona search above in the playground on the [Kiwi.com API page](https://perceptlayer.com/apis/kiwi), then change the date. ## APIs in this post - [Kiwi.com **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/kiwi) ## Frequently asked questions ### How much does the Kiwi.com API cost? Each of the 7 Kiwi.com endpoints costs 1 credit per successful call, and failed calls cost nothing. A one-date fare search is 1 credit, and a 30-date scan with `flights-search` is 30 credits per route. Every verified account gets 100 free credits on signup. The [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. ### Can I book flights through this API? No. The API reads fares and itineraries as the site shows them at the time of the call. Each itinerary includes a `booking_url` that opens Kiwi.com's booking page, where the traveller completes the booking. Selling and ticketing Kiwi.com itineraries yourself is what its invitation-only partner programme is for. ### Are the prices final? They're the prices the site displayed at the time of the call, and fares change often. The recorded response also shows a fare that includes a personal item but no checked bag, with `checked_bag_tier_prices` for adding one. Re-check a fare with `flights-detail` before you show it as current. ### Which codes does origin accept? Airport codes such as `LTN` and city codes such as `LON` both appear in the recorded response, which searched with `LON` and returned flights from Luton and Stansted. If you only have a place name, call `/v1/kiwi/locations` with it as `query` to find the code. ### What happens when I hit the rate limit? You get `rate_limited` (429) with a `Retry-After` header giving the seconds to wait, and nothing is debited. Free accounts get 1 request a second; packs include at least 5 a second. A 30-date scan at 1 request a second takes about 30 seconds. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain how limits work. kiwi.com flights flight prices travel cheapest dates ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 29 Oct 2026 Perceptlayer 7 min read ## [Flight API: Google Flights and Kiwi Data as JSON](https://perceptlayer.com/blog/flight-api-comparison) Compare Google Flights and Kiwi.com flight search as JSON: price, stops, duration, CO2 or baggage per itinerary, date-range calls, 1 credit per route per date. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 19 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Google Flights API: Fares, Date Ranges and Airports](https://perceptlayer.com/blog/google-flights-api) Get Google Flights fares as JSON: one-way, round-trip and date-range calls, a recorded JFK to LAX response, and the credit cost of a daily fare check. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. --- title: "Idealista API: Spanish Property Listings as JSON" description: "Search Idealista listings in Spain as JSON with one GET call: 1 credit per call, location IDs, price and size filters, and a real recorded response." url: https://perceptlayer.com/blog/idealista-api-property-listings --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Idealista API: Spanish Property Listings as JSON 30 Aug 2026 Updated 10 Nov 2026 Perceptlayer 7 min read You can get Idealista property listings as JSON with `GET /v1/idealista/search`. Pass `country=es`, an `operation` (sale or rent), a `property_type` and optionally a `location_id`, and send your key in the `X-API-Key` header. Each successful call costs 1 credit, failed calls cost nothing, and the free tier gives you 100 credits on signup. The recorded response below comes from the sibling `map-search` endpoint, since we have no recorded `search` response. ## Key takeaways - `GET /v1/idealista/search` needs three parameters: `country`, `operation` and `property_type`. Add `location_id` to scope it to a province, city or neighbourhood. - The Idealista API in the [Perceptlayer catalogue](https://perceptlayer.com/apis/idealista) has 22 endpoints, and every one costs 1 credit per successful call. - The recorded `map-search` response (no `search` sample is recorded) has named fields such as `price`, `size`, `rooms`, `priceByArea`, `latitude`, `longitude` and `locationId`. - `locations` takes a `prefix` or `coordinates` and a `mode`; `locationId` appears in the recorded listings, and `location_id` is the filter parameter. - Check the terms on [idealista.com](https://www.idealista.com) before deciding. If you want a call today, a key here needs only a verified email and no credit card. ## How do you get Idealista listings as JSON? Call the search endpoint with a country, an operation and a property type. You get the listings that match, with price, size, rooms, address and coordinates as named JSON fields instead of HTML you'd have to parse. The request below asks for sale listings of type `homes` in the Madrid province ( `0-EU-ES-28`), with `max_items=2` set. ```bash curl "https://api.perceptlayer.com/v1/idealista/search?country=es&operation=sale&property_type=homes&location_id=0-EU-ES-28&max_items=2" \ -H "X-API-Key: $API_KEY" ``` You need a key that starts with `sk_live_`. [Get a free API key](https://perceptlayer.com/signup) by verifying an email address, with no credit card. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the header and the `api_key` query parameter for clients that can't set headers. Prefer clicking first? The [Idealista API page](https://perceptlayer.com/apis/idealista) has a playground where you pick an endpoint, fill in the parameters and run a real call with your key. ## Which parameters does the search endpoint take? `search` takes three required parameters and a long list of optional filters. The required ones are `country`, `operation` and `property_type`. Everything else narrows the result: place, price, size, rooms, advertiser and sort order. The same parameter set applies to `map-search` (which also needs `mode`, `listings` or `pins`), `map-georeach` and `map-tiles` (which also needs `z`, `x` and `y`, all integers). | Parameter | Type | Required | Values or notes | | --- | --- | --- | --- | | `country` | string | yes | `es`, `it`, `pt`, `fr` | | `operation` | string | yes | `sale`, `rent` | | `property_type` | string | yes | `homes`, `newDevelopments`, `bedrooms`, `offices`, `premises`, `transfers`, `buildings`, `storageRooms`, `garages`, `vacationRentals`, `luxury`, `lands` | | `location_id` | string | no | Up to 80 characters | | `center`, `distance` | string, integer | no | Search around a point | | `min_price`, `max_price` | integer | no | Price range | | `min_size`, `max_size` | integer | no | Size range | | `min_rooms`, `max_rooms` | integer | no | Room range | | `sort`, `order` | string | no | `sort` is `asc` or `desc`; `order` is up to 40 characters | | `max_items`, `num_page` | integer | no | Integers; check the playground for how they behave | | `auction` | string | no | `onlyAuctions`, `excludeAuctions` | | `current_occupation_type` | string | no | `free`, `bareOwnership`, `tenanted`, `illegallyOccupied`, `viager` | | `chalet` | boolean | no | Chalet filter | | `advertiser_type`, `home_type`, `bank_offer` | string | no | Up to 40 characters each | | `shape` | string | no | Search inside an area | | `quality`, `gallery`, `locale` | string, boolean, string | no | `quality` is `high` or `low`; `locale` is up to 8 characters | The country list shows the endpoints cover more than Spain: `it`, `pt` and `fr` are accepted too. This post sticks to `es`. ## How do you find a location ID? Use `GET /v1/idealista/locations`. It takes `country` and `mode`, where `mode` is one of `suggest`, `reverse`, `vacational`, `picker` or `smart`. Pass a `prefix` with a place name, or `coordinates`, to look a place up. We have no recorded `locations` response, so check the [playground](https://perceptlayer.com/apis/idealista) for the exact shape before wiring it to `location_id` in other calls. | Parameter | Required | Notes | | --- | --- | --- | | `country` | yes | `es`, `it`, `pt`, `fr` | | `mode` | yes | `suggest`, `reverse`, `vacational`, `picker`, `smart` | | `prefix` | no | Text to match, up to 80 characters | | `coordinates` | no | Up to 40 characters | | `property_type`, `operation` | no | Same values as `search` | | `locale`, `language` | no | Up to 8 characters each | | `filter`, `location_id` | no | Up to 80 characters each | ```bash curl "https://api.perceptlayer.com/v1/idealista/locations?country=es&mode=suggest&prefix=Pozuelo" \ -H "X-API-Key: $API_KEY" ``` The recorded response below shows the ID format. The request used `0-EU-ES-28` for Madrid province, and a listing in Pozuelo de Alarcón carries `0-EU-ES-28-02-003-115-07-001` as its `locationId`. To look at one place, `GET /v1/idealista/location` takes `country` and `location_id`. ## What does a listing response look like? Each listing is one object in `data.elementList`, next to paging fields such as `total` and `totalPages`. The excerpt below is a recorded response from `GET /v1/idealista/map-search` with `mode=listings`, trimmed with `…`. We have no recorded `search` response, so treat these fields as what `map-search` returned and confirm them on `search` in the playground. It was requested like this: ```bash curl "https://api.perceptlayer.com/v1/idealista/map-search?country=es&mode=listings&property_type=homes&operation=sale&location_id=0-EU-ES-28" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "elementList": [ { "propertyCode": "110108160", "externalReference": "CA217051", "numPhotos": 33, "price": 2200000, "priceInfo": { "price": { "amount": 2200000, "currencySuffix": "€", "priceDropInfo": "…" } }, "propertyType": "chalet", "operation": "sale", "size": 480, "rooms": 5, "bathrooms": 5, "address": "Chalet pareado en Paseo Club Deportivo, La Finca, Pozuelo de Alarcón", "province": "Madrid", "municipality": "Pozuelo de Alarcón", "district": "Zona Prado de Somosaguas - La Finca", "country": "es", "neighborhood": "La Finca", "locationId": "0-EU-ES-28-02-003-115-07-001", "latitude": 40.4173893, "longitude": -3.8060585, "url": "https://www.idealista.com/inmueble/110108160/", "priceDropValue": 200000, "priceDropPercentage": 8, "priceByArea": 4583, "features": { "hasSwimmingPool": true, "hasTerrace": true, "hasAirConditioning": true, "hasBoxRoom": true, "hasGarden": true }, "detailedType": { "typology": "chalet", "subTypology": "semidetachedHouse" }, "…": "…" } ], "total": 33943, "totalPages": 16972, "actualPage": 1, "itemsPerPage": 2, "summary": [ "Comprar casas y pisos en Madrid provincia", "Todos los precios" ], "searchTitle": "Madrid provincia", "paginable": true }, "meta": { "duration_ms": 764, "endpoint_family": "map_search" } } ``` A few fields are worth knowing. The first listing has `price` 2200000, `size` 480 and `priceByArea` 4583; the field isn't documented, but those numbers are consistent with price divided by size, so check that on your own data. The same listing has `priceDropValue` 200000 and `priceDropPercentage` 8, and we don't document what they mean beyond their names. `locationId` is on each listing, so you can group results by it. `total` and `totalPages` show how large the result set is, so you can estimate the credits before paging. Listings also include contact details for the advertising agency. That's business data, but treat it with care: don't use it to contact people in bulk without a lawful basis. Data is collected from publicly available sources and returned as found at the time of the call. ## Which other endpoints take a listing or location? Four more endpoints are worth a look: `filters`, `listing-stats`, `home` and `listing`. We have no recorded response for any of them, so this section lists only their parameters. Each costs 1 credit per successful call. The [Filters](https://perceptlayer.com/apis/idealista/filters), [Listing Stats](https://perceptlayer.com/apis/idealista/listing-stats), [Home](https://perceptlayer.com/apis/idealista/home) and [Listing](https://perceptlayer.com/apis/idealista/listing) pages and the playground show what each returns. | Endpoint | Required parameters | Optional parameters | | --- | --- | --- | | `GET /v1/idealista/filters` | `country`, `operation`, `property_type`, `location_id` | `locale`, `quality`, `gallery` | | `GET /v1/idealista/listing-stats` | `country`, `ad_id` | `language` | | `GET /v1/idealista/home` | `country` | `locale`, `quality` | | `GET /v1/idealista/listing` | `country`, `ad_id` | `include[]`, `typology`, `from_date`, `to_date`, `guests`, `quality`, `locale`, `language`, `max_items` | `ad_id` is a required string on `listing` and `listing-stats`. The recorded listings carry a `propertyCode` such as `110108160`, but we haven't confirmed that it is the value `ad_id` expects, so test it in the playground first. `listing` accepts `include[]` values of `multimedia`, `comment`, `stats` and `recommendation`. ## What does it cost? Every endpoint in the Idealista API costs 1 credit per successful call, and a failed call costs 0 and returns `X-Credits-Used: 0`. Credits come in prepaid packs that last 12 months, and the free tier gives you 100 credits on signup. [Pricing](https://perceptlayer.com/pricing) has what credits cost; this post only counts them. A worked example: a daily check of 20 saved searches, with one `listing` call for each of 10 listings. - Searches: 20 calls × 1 credit = 20 credits a day. - Listing calls: 10 calls × 1 credit = 10 credits a day. - Over 30 days: 30 credits × 30 = 900 credits. The 100 free credits on signup cover the first 3 days, and the Starter pack's 10,000 credits cover 11 months. Every response carries `X-Credits-Used` and `X-Credits-Remaining`, so you can log the balance after each call. Request limits are per account and counted per minute: free accounts get 1 request a second. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain what happens past that, and the [errors docs](https://docs.perceptlayer.com/errors) list the codes, including `invalid_parameters` (422) for a bad filter value. The [credits docs](https://docs.perceptlayer.com/credits) cover the rest. ## How does this compare with Idealista's own API? Idealista runs a [developer access request form](https://developers.idealista.com/access-request), so the official route is by application. We haven't seen its quotas, fields or permitted uses, so we won't describe them. Here is a rule you can apply without them. - Need access under an agreement with Idealista itself, for example because your use case or your lawyers require it? Apply there and read the terms on [idealista.com](https://www.idealista.com) first. - Need JSON from the search endpoints today, with no application step? A key here needs only a verified email, no credit card, and 100 free credits on signup. - Need Italy, Portugal or France as well as Spain? These endpoints accept `es`, `it`, `pt` and `fr`. - Need an agent to call it as a tool? The same key works over HTTP and over [MCP](https://docs.perceptlayer.com/ai-agents), and the catalogue covers 480 websites and 2,782 endpoints. You can also start here and apply for official access in parallel. For other property markets, see the [Immobilienscout24 guide](https://perceptlayer.com/blog/immobilienscout24-api-listings) and the [Rightmove guide](https://perceptlayer.com/blog/rightmove-api-property-data). Next step: [run a search in the playground](https://perceptlayer.com/apis/idealista) with your free key, then copy the cURL call into your code. ## APIs in this post - [Idealista **1 credit per call** · 22 endpoints](https://perceptlayer.com/apis/idealista) ## Frequently asked questions ### Is there an official Idealista API? Idealista has a [developer access request form](https://developers.idealista.com/access-request), so apply there if you need access under Idealista's own agreement. Perceptlayer's Idealista endpoints are a separate route: verify an email, get a key and call them the same day, with failed calls costing nothing. ### How much does an Idealista API call cost? Each successful call to any of the 22 Idealista endpoints costs 1 credit. A failed call costs nothing and returns `X-Credits-Used: 0`. Free accounts get 100 credits after verifying an email address, with no credit card. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Can I search countries other than Spain? The `country` parameter accepts `es`, `it`, `pt` and `fr`, so the same endpoints take Italy, Portugal and France as well as Spain. The recorded `map-search` response in this post is for Spain ( `country=es`). We haven't recorded the other countries, so check them in the playground before you rely on their fields. ### How do I get more than one page of results? `num_page` and `max_items` are integer parameters; confirm how they page in the playground. The recorded `map-search` response includes `total`, `totalPages` and `actualPage`, which tell you how many pages exist. Each page is a separate call at 1 credit, so check `total` first and set a budget. Calls are counted per minute; see the [rate limits docs](https://docs.perceptlayer.com/rate-limits). ### What happens if a request fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. For example, `invalid_parameters` (422) means a value was rejected, and `rate_limited` (429) carries a `Retry-After` header. Failed calls aren't billed. The [errors docs](https://docs.perceptlayer.com/errors) list every code. real estate idealista spain property listings api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 9 min read ## [Zillow Listings API: Get Property Data as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) One GET to /v1/zillow/search returns listings near a point as JSON with price, beds, baths and address. Parameters, a real response, 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. --- title: "Rental Listing Data for Market Analysis: Fields That Matter" description: "Which rental listing fields drive yield and rent-index work: rent range, beds, fees, deposit and availability date, with real HotPads and SpareRoom output." url: https://perceptlayer.com/blog/rental-listing-data-market-analysis --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Rental Listing Data for Market Analysis: Fields That Matter 30 Aug 2026 Updated 24 Oct 2026 Perceptlayer 7 min read Five fields carry most rental market analysis: asking rent with its period, bedroom count, fees and deposit, the availability date, and the listing's age or last update. US portals like HotPads give rent as a range per building, while UK portals like SpareRoom give it per room and per period. Normalise those differences before you compare anything. ## Key takeaways - Rent, beds, fees and deposit, availability date and listing age are the fields that decide yield and rent-index work. Photos, labels and advertiser details rarely matter. - HotPads returns `price`, `beds`, `baths` and `sqft` as `min`/ `max` ranges per building. SpareRoom returns `rent.min` with a `period` ( `pcm` or `pw`) and a per-room `rooms` array. - Asking rent isn't paid rent. Track `price_drop_count`, `special_offer` and `updated_at` so concessions don't hide inside your averages. - One search query reaches only part of a market: 10 pages of 40 on HotPads, 1,000 rows on SpareRoom. Split by price band and bedroom count. - Each call costs 1 credit, and failed calls cost nothing. The worked example below prices one US city snapshot at 40 credits, or 2,080 credits for a year of weekly snapshots. - US fee fields are unverified here. The recorded HotPads search has no fees or availability dates, and there is no recorded Zumper response, so test the Zumper fee endpoints in the playground before you rely on them. ## Which rental fields matter for market analysis? Start from the question. Yield work needs rent and a way to compare units of different size. Rent-index work needs the same unit measured repeatedly over time. Both need to know what the advertised rent includes and when the home can actually be occupied. That points to five field groups: rent with its period, bedroom count (and area where available), fees and deposit, availability date, and listing age. Everything else is context. Photos, promotional labels and advertiser verification flags help a renter choose, not an analyst measure a market. Keep them out of your warehouse table unless a later question needs them, because every extra column is one more thing to validate. The table maps each group to the fields in the two recorded responses below. | What you need | HotPads (US) | SpareRoom (UK) | | --- | --- | --- | | Rent | `price.min`, `price.max`, `price.currency` | `rent.min`, `rent.period`, `rent.currency`, `rooms[].price` | | Size | `beds.min`/ `max`, `baths`, `sqft.min`/ `max` | `accommodation_type`, `rooms_in_property`, `double_rooms` | | Fees and deposit | none in search results | `security_deposit`, `bills_included` | | Availability | none in search results | `availability.from`, `availability.from_iso` | | Age and change | `listed_at`, `updated_at`, `price_drop_count` | `expires_at`, `promotion.label` | | Concessions | `special_offer`, `labels` | none recorded | | Location | `address`, `location.latitude`/ `longitude` | `location.postcode`, `location.neighbourhood` | ## How does US portal data differ from UK portal data? US portals list buildings with several floor plans, so the rent is a range. UK portals such as SpareRoom list a single room or a whole flat, so the rent is one number with a period. The same word, "listing", means a building in one market and a rentable unit in the other. If you merge them without noticing, your averages mix unit types. ### HotPads: ranges per building This is a trimmed excerpt of a recorded `GET /v1/hotpads/search` response for `area=albuquerque-nm&type=apartments`: ```json { "name": "Markana Uptown", "price": { "min": 1732, "max": 2529, "currency": "USD" }, "beds": { "min": 0, "max": 2 }, "sqft": { "min": 589, "max": 1022 }, "unit_count": 12, "price_drop_count": 2, "labels": ["New Today", "Special Offer"], "listed_at": "2023-10-25T14:34:52Z", "updated_at": "2026-10-22T00:55:05Z" … } ``` One row covers studios to two-bedrooms. A rent of 1,732 to 2,529 USD is not a rent for a two-bed. Don't compute a rent per square foot by dividing the minimum rent by the minimum area unless you know the cheapest unit is also the smallest. The `GET /v1/hotpads/listing` endpoint takes the listing `id` for a closer look. ### SpareRoom: one room, one period This excerpt comes from a recorded `GET /v1/spareroom/search` response for `where=London`: ```json { "accommodation_type": "Double room", "rent": { "min": 950, "period": "pcm", "rent_options": "room", "currency": "GBP" }, "rooms": [{ "type": "double", "price": 950, "period": "pcm", "security_deposit": 950 … }], "bills_included": "yes", "security_deposit": 950, "availability": { "from": "2026-12-03" … } … } ``` The other recorded row is a whole one-bed flat at 2,500 `pcm` with `rent_options` set to `whole`. The two rows are not comparable until you separate whole-property rents from room rents. Use `rent_options` for that split, and `bills_included` to avoid comparing a rent with utilities to one without. ## Why do fees, deposits and availability dates change the numbers? Asking rent is the start of the cost, not the end. A deposit sets the upfront cash a tenant needs, bills inclusion shifts running cost, and the availability date tells you whether a listing is on the market now or in six weeks. In the recorded SpareRoom rows, both deposits equal one month's rent (2,500 on 2,500 and 950 on 950), which is a ratio you can track across areas. Availability matters for rent indexes. A room advertised on 2026-10-24 for a 2026-12-03 move-in is 40 days out, and the flat available 2026-11-23 is 30 days out. One hypothesis worth testing is that rents advertised for far-future dates differ from near-term ones, because the landlord is pricing a market that hasn't happened yet. The recording is too small to show it, so group listings by days-to-availability and check before you average them. For the US, the search response in the recording carries no fee or availability fields. Zumper exposes `listing-fees` and `building-fees` endpoints, and `address-rent-history` and `price-trends` for change over time. The catalogue lists no documented parameters for them, and there's no recorded response in this article, so check the [Zumper API page](https://perceptlayer.com/apis/zumper) and run one in the playground to see which fields your target cities return. ## How do you turn listings into a yield or rent-index input? Gross yield is annual rent divided by purchase price, and the listing gives you only the numerator. You join rent to a price from a sales source, so the quality of the join (address, postcode, area) matters more than any single rent field. For the join mechanics see [matching listings without IDs](https://perceptlayer.com/blog/deduplicate-listings-across-sources), and for the sales side see [real estate listing data for valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields). For an index, hold the unit type constant and track the median asking rent per cell (area, bedrooms, type) over time. Official statistics take a different route. The ONS Price Index of Private Rents uses a hedonic regression double imputation approach, covers new and existing tenancies, and draws on administrative data collected by rent officers ( [ONS](https://www.ons.gov.uk/economy/inflationandpriceindices/methodologies/priceindexofprivaterentsdetailedmethodology), 2025). In the US, the BLS Housing Survey collects rent from each sampled unit every 6 months, and most rents in the sample are continuing rents ( [BLS](https://www.bls.gov/cpi/factsheets/owners-equivalent-rent-and-rent.htm), 2026). Listing data measures the advertised end of the market, so treat it as a leading signal, not a replacement. ### Worked example: normalise SpareRoom rents to a weekly figure `rent.period` can be `pcm` or `pw`, so convert before you compare. This script pulls one page and prints weekly rent, deposit as a share of monthly rent, and days until the room is free: ```python import os from datetime import date import requests resp = requests.get( "https://api.perceptlayer.com/v1/spareroom/search", params={"where": "London"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) resp.raise_for_status() for r in resp.json()["data"]["results"]: rent, period = r["rent"]["min"], r["rent"]["period"] weekly = rent * 12 / 52 if period == "pcm" else rent monthly = rent if period == "pcm" else rent * 52 / 12 deposit = r.get("security_deposit") start = date.fromisoformat(r["availability"]["from"]) print( r["id"], r["rent"]["rent_options"], round(weekly, 2), round(deposit / monthly, 2) if deposit else None, (start - date.today()).days, ) ``` On the two recorded rows, the whole flat works out to 576.92 a week (2,500 × 12 / 52) and the room to 219.23 (950 × 12 / 52). Both have a deposit ratio of 1.0. Run on 2026-10-24, the days-to-availability values are 30 and 40. To turn those rows into an index input, group the weekly rents by cell (postcode area, `rent_options`) and take the median per cell on each fetch date. Store the fetch date with it. ```python from collections import defaultdict from statistics import median cells = defaultdict(list) for r in results: # the same list as above rent, period = r["rent"]["min"], r["rent"]["period"] weekly = rent * 12 / 52 if period == "pcm" else rent cells[(r["location"]["postcode"], r["rent"]["rent_options"])].append(weekly) index_row = {cell: round(median(v), 2) for cell, v in cells.items()} ``` With only two recorded rows, each cell holds one value (E14 whole at 576.92, N16 room at 219.23), so the median is just that rent. On a full 1,000-row sweep, the cells fill up and the median stops moving with one outlier. Yield then needs a sale price joined to the same cell: annual rent (median weekly × 52) divided by the median price. ## How many calls does a market sweep take, and what does it cost? Each call costs 1 credit, and failed calls cost nothing. The limit to plan around is reach, not price. The recorded HotPads response shows `total_results` of 3,541 but `total_pages` of 10 at 40 per page, so one query reaches 400 rows. The recorded SpareRoom response shows `total_pool` of 12,891, `rows_reachable` of 1,000 and `truncated` set to `true`. Split the market into cells so each fits under the cap. HotPads search takes `type`, `beds`, `min_price`, `max_price` and `page`. SpareRoom search takes `min_rent`, `max_rent`, `rent_period`, `room_types` and `page`, among others. ```bash curl "https://api.perceptlayer.com/v1/hotpads/search?area=albuquerque-nm&type=apartments&beds=2&min_price=1500&max_price=2000&page=1" \ -H "X-API-Key: $API_KEY" ``` If you slice one US city by 4 bedroom counts and pull all 10 pages for each, that's 4 × 10 × 1 credit = 40 credits for a snapshot. Repeat it weekly for a year and you spend 52 × 40 = 2,080 credits. The free tier gives 100 credits once, after you verify an email, enough for the first two snapshots; [pricing](https://perceptlayer.com/pricing) has what larger packs cost. Details on how calls are billed are in [credits](https://docs.perceptlayer.com/credits), and a sweep that runs concurrently should respect the [rate limits](https://docs.perceptlayer.com/rate-limits). ## When is this data the wrong tool? Listing data shows asking rents of homes currently advertised. It doesn't show what tenants signed for, how long a home stayed empty, or the stock that never goes to market. For regulated reporting or published rent statistics, use the official series such as the ONS and BLS measures above, and use listings for timeliness and neighbourhood detail. Data is returned as found at the time of the call, so store the fetch date with every row. To start, [get a free API key](https://perceptlayer.com/signup), then run `GET /v1/hotpads/search` or `GET /v1/spareroom/search` from the [HotPads API](https://perceptlayer.com/apis/hotpads) or [SpareRoom API](https://perceptlayer.com/apis/spareroom) pages. For the same method on another asset class, see [used car listing data for price analysis](https://perceptlayer.com/blog/used-car-listing-data-price-analysis). ## APIs in this post - [Zumper **1 credit per call** · 50 endpoints](https://perceptlayer.com/apis/zumper) - [HotPads **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/hotpads) - [SpareRoom **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/spareroom) ## Frequently asked questions ### Which single field matters most for rent analysis? Asking rent, but only with its period and unit type attached. A bare number is ambiguous: HotPads gives a `min`/ `max` range per building, and SpareRoom gives `rent.min` with `pcm` or `pw` and a `rent_options` value of `room` or `whole`. Normalise to one period and one unit type before averaging. ### Do HotPads search results include fees or availability dates? The recorded search response includes `price_drop_count`, `special_offer`, `listed_at` and `updated_at`, but no fee or availability fields. For fees on US listings, check the Zumper `listing-fees` and `building-fees` endpoints on the [Zumper API page](https://perceptlayer.com/apis/zumper), and test them in the playground. ### How do I get more than the first page of results? Add the `page` parameter, and narrow the query so it fits the cap. In the recordings, HotPads reports 10 pages of 40 and SpareRoom reports 1,000 reachable rows. Split by `beds`, `min_price` and `max_price` on HotPads, or `min_rent` and `max_rent` on SpareRoom. ### What happens if a call fails? A failed call costs nothing and returns `X-Credits-Used: 0`. Errors come back as an HTTP status with a JSON body containing a `code`, `message` and `request_id`. A rate-limited (429) response carries a `Retry-After` header with the seconds to wait. The [errors page](https://docs.perceptlayer.com/errors) lists every code. rental data real estate rent index rental yield hotpads spareroom ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 10 Jul 2026 Perceptlayer 10 min read ## [Real Estate Listing Data: Fields That Matter for Valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields) Which fields in a Zillow search response feed a valuation model (price, livingArea, yearBuilt), which are noisy, and what listing data can't tell you. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. --- title: "Web Data Quality Checks for Scraped and API Data" description: "Seven web data quality checks in Python, with code written against a recorded Zillow search response: schema drift, null rates, duplicate zpids and outliers." url: https://perceptlayer.com/blog/web-data-quality-monitoring-checklist --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Web Data Quality Checks for Scraped and API Data 30 Aug 2026 Updated 21 Oct 2026 Perceptlayer 7 min read Web data goes wrong quietly: a field disappears, a price turns into text, a page repeats. Seven checks catch most of it: the response envelope, schema drift, null rates, duplicate IDs, price outliers, geographic bounds and freshness. Each one is a short Python function you can run on every response. The examples below use the shape of a recorded Zillow search response, but the same checks work on any JSON endpoint. ## Key takeaways - Check the envelope first: HTTP status, `X-Credits-Used` and whether `count` matches the length of `data.listings`. - Track null rates per field against a baseline. In the recorded sample, `estimates.zestimate` is present on one listing and absent on the other, so absence alone isn't an error. - Treat `zpid` as the key: duplicates inside a page or across pages mean a broken paging loop. - Flag price outliers with a median-based score, and cross-check `price.value` against `livingArea` and `pricePerSquareFoot`. - A failed check rarely needs an immediate retry. A repeat call costs another credit, and data is returned as found at the time of each call, so an immediate retry may show the same problem. ## Why does web data need its own quality checks? Web data is collected from publicly available sources and returned as found at the time of the call, so the shape and completeness of a response can change without a version bump. Scrapers fail loudly when a selector breaks, but they also fail quietly, by returning a null where a number used to be. An API removes the parsing work, not the need to validate what comes back. For the maintenance side of that trade-off, see [what maintaining a scraper really involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost). A useful rule: validate at the boundary where data enters your pipeline, and store the failures instead of dropping them. ## What are the seven checks? Seven checks cover most pipeline failures in web data: the response envelope, schema drift, null rates, duplicate IDs, price sanity, geographic bounds and freshness. Run them cheapest first on every response; each is a short Python function that returns a list of problems. Code for each follows in the next section. 1. **Envelope:** the call succeeded, cost what you expected, and the list is where you expect it. 2. **Schema drift:** required fields exist, and new, unexpected fields get logged. 3. **Null rates:** the share of missing values per field stays near its baseline. 4. **Duplicate IDs:** no `zpid` appears twice in a page or across pages. 5. **Price sanity:** prices agree with area and with the stated price per square foot, and extremes get flagged. 6. **Geographic bounds:** every listing sits inside the area you asked for. 7. **Freshness:** the response says when its source data was taken, and that stamp isn't older than your limit. | Check | What it catches | Extra calls | | --- | --- | --- | | Envelope | Failed call, wrong credit cost, `count` mismatch | 0 | | Schema drift | Missing required fields, new unexpected fields | 0 | | Null rates | A field that suddenly goes empty | 0 | | Duplicate IDs | Repeated `zpid` in or across pages | 0 | | Price sanity | Prices that disagree with area, extreme values | 0 | | Geographic bounds | Listings outside the requested radius | 0 | | Freshness | Missing or too-old source timestamp | 0 | All seven read the response you already paid for, so the only cost is the fetch itself. ## How do you fetch a sample to check? Send one [Zillow search](https://perceptlayer.com/apis/zillow) request and keep the raw response, because every check below reads from it. Perceptlayer charges 1 credit for a successful call; a failed call costs nothing and returns `X-Credits-Used: 0`. Checking one query a day for 30 days is 30 calls × 1 credit = 30 credits. [Pricing](https://perceptlayer.com/pricing) lists what credits cost. ```python import os, requests URL = "https://api.perceptlayer.com/v1/zillow/search" PARAMS = {"latitude": 47.6062, "longitude": -122.3321, "radius_mi": 5, "listing_category": "category1", "page_size": 20} def fetch(page=1): return requests.get(URL, params={**PARAMS, "page": page}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30) ``` ## How do you run each check in Python? Each function takes the parsed listings and returns a list of problems, so you can log them, count them or fail a job on them. The listing fields ( `zpid`, `price.value`, `livingArea`, `location`) come from the recorded response. ### 1\. Envelope ```python def check_envelope(r): if not r.ok: return [f"http {r.status_code}"], [] data = r.json().get("data") or {} listings = data.get("listings") if not isinstance(listings, list): return ["data.listings is not a list"], [] problems = [] if r.headers.get("X-Credits-Used") != "1": problems.append(f"credits used: {r.headers.get('X-Credits-Used')}") if data.get("count") != len(listings): problems.append("count differs from len(listings)") return problems, listings ``` A non-200 response carries a JSON error body with a `code`; the [error reference](https://docs.perceptlayer.com/errors) lists them, and [credits](https://docs.perceptlayer.com/credits) explains the headers. ### 2\. How do you detect schema drift? ```python REQUIRED = {"zpid", "address", "location", "price", "livingArea", "bedrooms", "bathrooms", "propertyType", "listing"} def check_schema(listings, known_keys): missing = [l.get("zpid") for l in listings if REQUIRED - set(l)] seen = set().union(*(set(l) for l in listings)) return missing, sorted(seen - known_keys) ``` Set `REQUIRED` to the fields your code reads, not every field you've seen. For stricter type checks, [JSON Schema](https://json-schema.org/understanding-json-schema/) describes the same rules declaratively. Save `known_keys` from your last good run, and alert on the second return value: a new key is how drift usually shows up first. ### 3\. How do you track null rates? ```python def get(d, path): for key in path.split("."): d = d.get(key) if isinstance(d, dict) else None return d def null_rates(listings, paths): return {p: sum(get(l, p) is None for l in listings) / len(listings) for p in paths} ``` Compare the result with a stored baseline, and alert on a jump rather than on any null. In the two listings excerpted from the recorded response, `estimates.zestimate` appears on the first and `taxAssessment` on the second, so both are optional fields. A rate that moves from 0.1 to 0.6 is a signal; a single null is not. ### 4\. Duplicate IDs ```python from collections import Counter def duplicate_ids(listings, seen_before=frozenset()): counts = Counter(l.get("zpid") for l in listings if l.get("zpid") is not None) return [z for z, c in counts.items() if c > 1 or z in seen_before] ``` Pass the IDs from earlier pages as `seen_before`. The recorded response notes that `page * page_size` must not exceed 1000. What happens past that limit isn't documented, so cap your loop below it; [safe page loops](https://perceptlayer.com/blog/paginate-web-data-api-python) covers it. ### 5\. How do you detect price outliers? Flag price per square foot with the modified z-score, 0.6745 × (x − median) / MAD, and review values above 3.5 ( [NIST e-Handbook](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm)). Skip it under five rows, and cross-check `price.value` against `livingArea` and `pricePerSquareFoot`. ```python import statistics def price_problems(listings, limit=3.5): rows = [(l.get("zpid"), l["price"]["value"], l["livingArea"], l["price"].get("pricePerSquareFoot")) for l in listings if get(l, "price.value") and l.get("livingArea")] unit = [v / a for _, v, a, _ in rows] out = [(z, "stated $/sqft disagrees") for (z, v, a, s), u in zip(rows, unit) if s and abs(s - u) > 0.02 * u] if len(rows) >= 5: med = statistics.median(unit) mad = statistics.median(abs(u - med) for u in unit) or 1 out += [(z, "price outlier") for (z, *_), u in zip(rows, unit) if abs(0.6745 * (u - med) / mad) > limit] return out ``` The [NIST e-Handbook](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm) describes the modified z-score, attributes it to Iglewicz and Hoaglin and recommends a cutoff of 3.5: values with a larger absolute score are potential outliers. It needs enough rows to be stable, which is why the code skips it under five. The first recorded listing has `price.value` 14000000 and `livingArea` 7870, which gives about 1,779 per square foot, matching its `pricePerSquareFoot`. A high price that agrees with its own area is flagged for review, not deleted. The [Python statistics docs](https://docs.python.org/3/library/statistics.html) cover `median`, which stays stable when a few extreme values are present. For which fields matter in valuation work, see [listing fields for valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields). ### 6\. Geographic bounds ```python import math def miles(lat1, lon1, lat2, lon2): p = math.pi / 180 a = (math.sin((lat2 - lat1) * p / 2) ** 2 + math.cos(lat1 * p) * math.cos(lat2 * p) * math.sin((lon2 - lon1) * p / 2) ** 2) return 3958.8 * 2 * math.asin(math.sqrt(a)) def outside_radius(listings, lat, lon, radius_mi): out = [] for l in listings: la, lo = get(l, "location.latitude"), get(l, "location.longitude") if la is not None and lo is not None \ and miles(lat, lon, la, lo) > radius_mi * 1.05: out.append(l.get("zpid")) return out ``` The 5% margin absorbs rounding at the edge. Coordinates of 0, 0 or a different state are worth an alert. ### 7\. Freshness ```python import re from datetime import datetime, timezone from zoneinfo import ZoneInfo def age_hours(data): text = " ".join(data.get("freshness", [])) m = re.search(r"as of (\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})", text) if not m: return None ts = datetime.strptime(m.group(1), "%Y-%m-%d %H:%M:%S") ts = ts.replace(tzinfo=ZoneInfo("America/Los_Angeles")) return (datetime.now(timezone.utc) - ts).total_seconds() / 3600 ``` The recorded `freshness` entry reads "Based on information submitted to the MLS GRID as of 2026-10-21 06:24:36 PDT…", so the code assumes Pacific time. Record the age and alert on a missing stamp, or one older than the limit you pass to the runner below (72 hours is a placeholder). The stamp tells you when the listing data was taken, not that the source is correct. ## What do you do when a check fails? Store the raw response with the failed check's name, keep it out of your clean tables, and look at it before you retry. A second call costs another credit, and a data-quality failure is often a property of the source rather than a glitch, so don't retry it by reflex. Retry transport problems and the retryable statuses: 429 and 503 carry a `Retry-After` header with the seconds to wait. Read [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) for lost replies. The sketch below wires the seven checks together. `check_envelope` returns a tuple while the others return lists, and `age_hours` needs the `data` object the envelope check discards, so the runner parses it again. The baseline file, the 0.3 null-rate jump and the 72-hour age limit are placeholders to tune. ```python import json, time def run_checks(r, baseline, seen_ids=frozenset(), max_age_hours=72): env, listings = check_envelope(r) failed = {"envelope": env} if env else {} if listings: data = r.json()["data"] missing, new_keys = check_schema(listings, set(baseline["known_keys"])) rates = null_rates(listings, baseline["null_rates"]) jumps = [p for p, v in rates.items() if abs(v - baseline["null_rates"][p]) > 0.3] age = age_hours(data) found = {"schema": missing + new_keys, "null_rates": jumps, "duplicates": duplicate_ids(listings, seen_ids), "price": price_problems(listings), "geo": outside_radius(listings, PARAMS["latitude"], PARAMS["longitude"], PARAMS["radius_mi"]), "freshness": ["no timestamp"] if age is None else [f"{age:.0f}h old"] if age > max_age_hours else []} failed.update({k: v for k, v in found.items() if v}) elif not env: failed["envelope"] = ["no listings"] if failed: with open(f"quarantine-{int(time.time())}.json", "w") as f: json.dump({"checks": failed, "raw": r.text}, f) return failed baseline = json.load(open("baseline.json")) # shape below failed = run_checks(fetch(), baseline) ``` `baseline.json` holds what a known-good run looked like: the top-level listing keys you've seen, and the null rate you expect for each field you track. This shortened example lists only some keys. A real baseline lists every top-level key from your good run, or `check_schema` reports the rest as new, so write yours from that run. ```json { "known_keys": ["zpid", "location", "address", "price", "livingArea", "bedrooms", "bathrooms", "propertyType", "listing", "estimates", "taxAssessment"], "null_rates": {"estimates.zestimate": 0.5, "taxAssessment": 0.5, "price.pricePerSquareFoot": 0.0} } ``` One more trap sits in the response itself. The `listing_category_counts_note` field warns that a sale (category1) request reports the rent (category2) counts, so read the note before trusting those counts. Next step: [get a free API key](https://perceptlayer.com/signup), run the fetch above, and wire the seven checks into the job that already loads your data. More pipeline patterns live in the [data engineering category](https://perceptlayer.com/blog/category/data-engineering). ## APIs in this post - [Zillow **1 credit per call** · 20 endpoints](https://perceptlayer.com/apis/zillow) ## Frequently asked questions ### How often should I run web data quality checks? Run the cheap checks (envelope, schema, duplicates) on every response, since they cost no extra calls. Run null-rate and outlier checks per batch, because they need enough rows to mean anything. A scheduled probe of one fixed query costs 1 credit per run; 30 daily runs is 30 credits. ### Does a failed call cost credits? No. A failed call returns `X-Credits-Used: 0` and debits nothing. A successful call costs the credits shown on its endpoint, which is 1 for the Zillow search endpoint. A call whose reply was lost to a client timeout may still have succeeded and been billed, so log those separately. See the [credits docs](https://docs.perceptlayer.com/credits). ### Should I drop rows that fail a check? Quarantine them instead. Keep the raw record and the failed check's name in a separate table, and exclude it from downstream queries. High-priced listings and missing optional fields are often true to the source, so a human review of the first few flags tells you which thresholds to tune. ### How is this different from validating scraper output? The checks are the same; the failure modes differ. A scraper breaks when markup changes, and you debug selectors. With an API you validate named JSON fields and read the [error codes](https://docs.perceptlayer.com/errors) for failures. Schema drift and null rates still matter in both, because the underlying website can change either way. data quality monitoring python zillow data pipelines ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 3 Oct 2026 Perceptlayer 6 min read ## [Detect Schema Changes in API JSON Responses](https://perceptlayer.com/blog/web-data-api-json-schema-changes) Infer a path-and-type schema from a recorded Google Search response (71 paths), diff each new response against it and alert on removed or retyped fields. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 22 Jul 2026 Perceptlayer 10 min read ## [Deduplicate Listings Across Sources: Matching Without IDs](https://perceptlayer.com/blog/deduplicate-listings-across-sources) Match car listings from AutoScout24 and AutoTrader UK with no shared ID: normalise make and model, block, then score year, price and mileage in Python. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. --- title: "Hotel Price Data for Rate Monitoring: Fields and Costs" description: "The fields a rate-monitoring job needs from Booking, Expedia and Trivago, and what 200 hotels over 30 dates costs, 6,000 credits per source." url: https://perceptlayer.com/blog/hotel-price-data-rate-monitoring --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Hotel Price Data for Rate Monitoring: Fields and Costs 28 Aug 2026 Perceptlayer 8 min read A rate-monitoring job needs one price per hotel, per stay date, per occupancy, in a known currency, tied to a room and a rate plan. Booking and Expedia room calls return room-level prices, and region searches on Booking, Expedia and Trivago return one price per hotel. Checking 200 hotels over 30 dates with room calls is 200 × 30 = 6,000 calls × 1 credit = 6,000 credits per source. ## Key takeaways - Pin the query: check-in, check-out, adults and currency decide what a price means, so store them next to every price. - Expedia `hotels-rooms` returns `rate_plans` per room with `total_price` and `price_per_night`; Booking `rooms` returns a `price` text string per room that you have to parse. - A region search prices hotels, a rooms call prices rooms. Use searches to find where prices moved and room calls to see which room moved. - 200 hotels × 30 dates × 1 credit = 6,000 credits for one source and one occupancy. Failed calls cost nothing. - Total credits for a run is the sum of `X-Credits-Used`, not the difference between two `X-Credits-Remaining` readings. ## What does a rate-monitoring job need from a hotel price feed? It needs five things on every row: the stay dates, the occupancy, the currency, the room or rate plan the price belongs to, and the source it came from. Without the first three, two prices can't be compared. | Field | Why a rate check needs it | Where the recordings show it | | --- | --- | --- | | Check-in and check-out | A price is for a stay, not a night. Length of stay changes the rate. | Your request; Expedia and Trivago echo `check_in` and `check_out` in the response | | Occupancy | Rates change with the number of adults. | Your request ( `group_adults`, `adults`); Booking rooms also list `occupancy` per room | | Currency | Sources return different currencies for the same query. | Expedia `currency` ( `EUR`), Trivago `currency` ( `USD`), Booking inside the price text ( `$351.05`, `€ 588`) | | Room type | Compares like with like across days. | Booking `name`, `occupancy`, `beds`; Expedia `unit_id`, `name`, `features` | | Rate plan | The same room is sold at several prices. | Expedia `rate_plans[].rate_plan_id` | One gap, stated once: neither room response includes cancellation terms. The only cancellation signal in the recordings is Expedia's hotel-level `free_cancellation` flag in search results, so if your rate comparison depends on refundable versus non-refundable rates, plan around that. ## What do the Booking, Expedia and Trivago responses actually contain? Hotel-level search responses carry a name, a price, a rating and an identifier you can feed into the next call. Room-level responses carry the rooms and their prices for one hotel. The excerpts below are trimmed from recorded responses for 20 to 23 November 2026, three nights. The Booking and Expedia requests used two adults; the Trivago search request had no `adults` parameter. ### Hotel-level prices from region searches The [Booking.com prices endpoint](https://perceptlayer.com/apis/booking/prices) returns hotels for a destination with a `price` string: ```json "prices": [ { "name": "Royal Saint Michel", "url": "https://www.booking.com/hotel/fr/royal-saint-michel.html", "price": "$351.05", "review_score": "8.8", … } ], "total_prices": 25 ``` The price is text with a currency symbol, and the response doesn't label whether it covers the stay or one night. Check that against the page before you compare it with anything. The [Expedia hotels-search endpoint](https://perceptlayer.com/apis/expedia/hotels-search) returns numbers, a currency and both stay and nightly figures: ```json { "property_id": "564660", "name": "Mercure Paris Centre Tour Eiffel", "total_price": 690, "price_per_night": 230, "free_cancellation": false, "sponsored": true, "currency": "EUR" } ``` A discounted hotel in the same response also carries `original_price` (1329 against a `total_price` of 1203). The [Trivago search endpoint](https://perceptlayer.com/apis/trivago/search) returns hotel records with `id`, `stars`, `rating`, `review_count` and `provider_count`, plus a `forecast_price` per night and a destination-wide `price_histogram`. `forecast_price` is a monthly forecast: it carries a `month` field ( `2026-11` and `2027-01` in the recording), so it is not the price for the dates you searched. The recorded hotels carry no per-hotel stay total, so treat Trivago search as a market-shape source. The [Trivago deals endpoint](https://perceptlayer.com/apis/trivago/deals) takes a hotel ID, dates, `rooms`, `children_ages[]` and `currency`; there's no recording of it here, so try it in the playground first. ### Room-level prices from rooms calls The [Expedia hotels-rooms endpoint](https://perceptlayer.com/apis/expedia/hotels-rooms) returns each room with its rate plans: ```json "currency": "EUR", "rooms": [ { "unit_id": "226385", "name": "Classic Room, 1 Double Bed", "features": ["18 sq m", "Sleeps 2"], "rate_plans": [ { "rate_plan_id": "397104173", "total_price": 690, "price_per_night": 230 }, { "rate_plan_id": "397104181", "total_price": 825, "price_per_night": 275 } ] }, … ] ``` This is the same hotel as the first Expedia search result, and its cheapest rate plan (690) matches the search's `total_price`, so the rooms call shows what sits above the search price. Use `total_price` as the key figure: the second room's 700 over three nights is shown as 233 a night, so `price_per_night` is rounded. The [Booking.com rooms call](https://perceptlayer.com/apis/booking) ( `/v1/booking/rooms`) returns a smaller record: ```json { "name": "Attic Single Room", "price": "€ 978 € 588 Original price € 978 Current price € 588 € 326.12 × 3 nights € 978.35 Limited-time Deal …", "occupancy": "1 adult", "beds": "1 twin bed", "available": true } ``` The price field is one text blob holding the original price, the current price and a deal note. Extract the number after "Current price" and keep the raw string. `occupancy` is the room's stated capacity, not an echo of your `group_adults`, so don't use it to verify your query. ## Should you monitor with region searches or room calls? Use both, for different jobs. A region search answers "which hotels moved" at one call per page of results. A rooms call answers "which room and rate plan moved" for one hotel, at one call per hotel per date. They return different things, so a search's cost per date is not a cheaper way to get room prices. | | Region search | Rooms call | | --- | --- | --- | | Prices | One per hotel | One or more per room | | Calls per date | One per page of results | One per hotel | | Good for | Spotting a market-wide move, finding hotels to track | Rate-plan changes, room mix, undercut checks | | Endpoints | Booking `prices`, Expedia `hotels-search`, Trivago `search` | Booking `rooms`, Expedia `hotels-rooms` | A practical pattern: search across your 30 dates to see where the market moves, then run room calls for your own hotels and a fixed competitor set. More sources are on the [Travel APIs page](https://perceptlayer.com/verticals/travel). ## What does checking 200 hotels over 30 dates cost? A full room sweep of 200 hotels over 30 check-in dates is 6,000 calls, and every successful call costs 1 credit, so 6,000 credits per source and occupancy. Failed calls cost nothing. What a credit costs is on the [pricing page](https://perceptlayer.com/pricing); the arithmetic below stays in credits. | Job | Calls | Credits | | --- | --- | --- | | One room sweep, one source, 2 adults | 200 × 30 = 6,000 | 6,000 | | The same sweep for 1 and 2 adults | 2 × 6,000 = 12,000 | 12,000 | | Weekly sweeps for a month (4 runs) | 4 × 6,000 = 24,000 | 24,000, within the Build pack's 50,000 | | Daily sweeps for a month (30 runs) | 30 × 6,000 = 180,000 | 180,000, within the Growth pack's 200,000 | | Region search, 30 dates, first page only | 30 × 1 = 30 | 30 per city per source for the first page; a full city needs more calls | | Free tier: 3 hotels × 30 dates | 90 | 90 of the 100 free credits on signup | One page is not a whole city. In the recordings the first page returned 10 of Expedia's 500 results and 35 of Trivago's 2,500, so covering a city means more calls per date, following `offset` and `next_offset`. Rate matters as much as credits. Paying accounts run at a minimum of 5 requests a second, so 6,000 calls take 6,000 ÷ 5 = 1,200 seconds, or 20 minutes, but only if you actually send 5 a second. That is a ceiling. Your throughput is workers ÷ latency: 4 workers at about 2 seconds a call give roughly 2 requests a second, which is about 50 minutes for 6,000 calls. Scale the worker count with latency, for example 10 workers at 2 seconds to approach the ceiling. Free accounts get 1 request a second. The [rate limits page](https://docs.perceptlayer.com/rate-limits) has the details, and the [credits page](https://docs.perceptlayer.com/credits) explains how balances are debited. ## How do you run the sweep and reconcile the credits? Fan out the calls, honour `Retry-After`, and add up `X-Credits-Used` from every response. Don't compute the total from the first and last `X-Credits-Remaining` of a concurrent run: responses arrive out of order, so those two values don't bracket the run. This script sweeps Expedia room prices for a list of property IDs. ```python import os import time from concurrent.futures import ThreadPoolExecutor from datetime import date, timedelta import requests URL = "https://api.perceptlayer.com/v1/expedia/hotels-rooms" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PROPERTY_IDS = ["564660", "994215"] # your 200 Expedia property IDs FIRST_CHECK_IN = date(2026, 11, 20) DATES = 30 NIGHTS = 3 WORKERS = 4 # requests a second = WORKERS / latency in seconds, capped at 5; use 1 on a free account def fetch(job): property_id, check_in = job params = { "property_id": property_id, "check_in": check_in.isoformat(), "check_out": (check_in + timedelta(days=NIGHTS)).isoformat(), "adults": 2, } for _ in range(3): try: r = requests.get(URL, params=params, headers=HEADERS, timeout=30) except requests.Timeout: # The call may have succeeded and been billed; the reply was lost. return job, [], 0, "timeout" if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue break used = int(r.headers.get("X-Credits-Used", 0)) if not r.ok: return job, [], used, r.json().get("error", {}).get("code", "error") data = r.json()["data"] rows = [ { "property_id": property_id, "check_in": data["check_in"], "currency": data["currency"], "room": room["name"], "rate_plan_id": plan["rate_plan_id"], "total_price": plan["total_price"], } for room in data["rooms"] for plan in room["rate_plans"] ] return job, rows, used, None jobs = [ (pid, FIRST_CHECK_IN + timedelta(days=i)) for pid in PROPERTY_IDS for i in range(DATES) ] with ThreadPoolExecutor(max_workers=WORKERS) as pool: results = list(pool.map(fetch, jobs)) rows = [row for _, r, _, _ in results for row in r] credits_used = sum(used for _, _, used, _ in results) problems = [(job, why) for job, _, _, why in results if why] print(f"{len(rows)} rate rows, {credits_used} credits used, {len(problems)} calls to review") ``` Because requests have no idempotency key, a timed-out call may have been billed even though you got no body. The script flags those instead of counting them as free. See [errors](https://docs.perceptlayer.com/errors) for the codes you'll hit, and the [Expedia API page](https://perceptlayer.com/apis/expedia) for the playground. ## What should you check before trusting the numbers? Check four things before a price goes into a dashboard, so the series isn't a mix of different quantities. 1. **Currency.** In the recordings Expedia returned EUR, Trivago USD and Booking a mix of `$` and `€` strings. Booking and Trivago accept a `currency` parameter and Expedia's room and search endpoints don't list one, so convert on your side and store the original currency. 2. **Unit.** Expedia gives both `total_price` and `price_per_night`; use the total, since the nightly figure is rounded. For Booking text prices, confirm whether a value covers the stay or a night. 3. **Identity.** Booking identifies hotels by `country` and `slug`, Expedia by `property_id`, Trivago by `id`. The recordings don't link them, so keep your own mapping table. 4. **Timestamps.** Data is returned as found at the time of the call. Store the time you made each request next to the price. Pick one source, run the sweep on 5 hotels and compare it with the site by hand before scaling to 200. [Get a free API key](https://perceptlayer.com/signup) for 100 credits on signup; no card needed. For the Booking side in more depth, see [Booking.com Hotel Prices API](https://perceptlayer.com/blog/booking-com-hotel-prices-api), and for a polling loop around prices, [Build a Price Tracking Agent in Python](https://perceptlayer.com/blog/price-tracking-agent-python). Store dates as [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) and currencies as [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) codes. ## APIs in this post - [Booking.com **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/booking) - [Expedia **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/expedia) - [Trivago **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/trivago) ## Frequently asked questions ### How many credits does a hotel rate check cost? Each successful call costs 1 credit on these endpoints. Checking 200 hotels over 30 check-in dates with a rooms call is 200 × 30 × 1 credit = 6,000 credits per source and occupancy. Failed calls cost nothing and return `X-Credits-Used: 0`. Credit pricing is on the [pricing page](https://perceptlayer.com/pricing). ### Can I get room-level prices, or only one price per hotel? Both. Booking `rooms` and Expedia `hotels-rooms` return prices per room, and Expedia adds one entry per rate plan. Booking `prices`, Expedia `hotels-search` and Trivago `search` return hotel-level results. The calls are separate, so budget for each one rather than assuming a search includes rooms. ### Do the responses include cancellation terms? Not in the room responses. Expedia's search results include a hotel-level `free_cancellation` boolean, which is the only cancellation field in the recordings. If refundable and non-refundable rates must be tracked separately, check the page for each rate plan against your results before relying on it. ### How fast can I run a 6,000-call sweep? At 5 requests a second, the minimum for paying accounts, 6,000 calls take 20 minutes, but that is a ceiling: throughput is workers ÷ latency, so 4 workers at about 2 seconds a call manage roughly 2 a second. A free account runs at 1 request a second, so the same count would take 100 minutes, and its 100 free credits cover only 100 calls. Rate-limited responses carry `Retry-After`; wait that many seconds before retrying. hotel prices rate monitoring revenue management travel booking ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 14 Sept 2026 Updated 4 Nov 2026 Perceptlayer 8 min read ## [Airfare Data Feed: What Flight Price Tracking Can Show](https://perceptlayer.com/blog/flight-price-data-fare-tracking) Build an airfare data feed from flight search calls: price, stops, duration and CO2 per flight from a recorded JFK to LAX search, and the daily cost. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Booking.com Scraper or API: What You Get](https://perceptlayer.com/blog/booking-com-scraper-vs-api) A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price. --- title: "MCP vs Function Calling for Live Web Data in Agents" description: "One Google Maps endpoint as an MCP tool and as a hand-written function: setup, where each spends tokens, upkeep, and a verdict per use case." url: https://perceptlayer.com/blog/mcp-vs-function-calling-web-data --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # MCP vs Function Calling for Live Web Data in Agents 28 Aug 2026 Updated 10 Nov 2026 Perceptlayer 10 min read Use function calling when your agent needs one or two known endpoints and you want control over what the model sees. Use MCP when the agent should pick from many sources, or when the client already speaks MCP. Both end in the same HTTP call at the same price. The difference is who writes and maintains the tool definitions: you, or the server. ## Key takeaways - Function calling means you write one schema and one handler per endpoint. For `GET /v1/google-maps/simple-search`, that is a schema with `query` and `limit` plus a short HTTP function. - The Perceptlayer MCP server exposes three tools ( `search_endpoints`, `get_endpoint`, `call_endpoint`) for all 2,782 endpoints, so the tool list the model carries doesn't grow with the catalogue. - Cost per call is identical either way: 1 credit on success, nothing on failure. Catalogue lookups through MCP ( `search_endpoints`, `get_endpoint`) cost no credits. - Function calling lets you trim a response in your own handler before the model reads it. Over MCP, `call_endpoint` returns the endpoint's JSON response; `simple-search` also has an optional `fields` parameter, but its behaviour isn't documented, so test it before relying on it. - Rule of thumb: one to three endpoints, write functions. Open-ended source choice, or an MCP-native client like Claude Code, use the server. ## How do MCP and function calling differ for web data? Function calling is a model feature: you send tool definitions with each request, the model returns a structured call, and your code runs it. MCP is a protocol on top of that idea: a server publishes its tools, and any compatible client lists and calls them. The model still sees tools with a name, a description and a JSON schema either way. The [MCP specification](https://modelcontextprotocol.io/specification/latest/server/tools) defines this as `tools/list` for discovery and `tools/call` for invocation, with each tool carrying a name, a description and an `inputSchema`. Function calling, as described in [Anthropic's tool use docs](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview), uses the same three pieces under an `input_schema` key. So the real question isn't which one the model understands. Both look identical to it. The question is where the definitions live, who keeps them correct, and what happens to the result before the model reads it. ## What does the same endpoint look like both ways? The same endpoint, `GET /v1/google-maps/simple-search`, can be wired as a hand-written function schema or as a call through the MCP server, and both reach the same URL. Its only required parameter is `query`; optional ones include `limit`, `page`, `hl` and `gl`. It costs 1 credit per successful call. The [Google Maps API page](https://perceptlayer.com/apis/google-maps) lists all 12 endpoints. ### As a function schema You write the schema, the handler and the loop. This example uses the Anthropic Python SDK and `requests`. The handler returns only the fields the agent needs, all of which appear in the recorded response from this endpoint. ```python import json import os import requests from anthropic import Anthropic API = "https://api.perceptlayer.com" tools = [ { "name": "search_places", "description": "Search Google Maps for businesses matching a text query, " "for example 'restaurants in new york'. Returns name, rating, " "review count, address and business_id for each place.", "input_schema": { "type": "object", "properties": { "query": {"type": "string", "description": "What to search for"}, "limit": {"type": "integer", "description": "Maximum places to return"}, }, "required": ["query"], }, } ] def search_places(query, limit=5): r = requests.get( f"{API}/v1/google-maps/simple-search", params={"query": query, "limit": limit}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) if not r.ok: return {"status": r.status_code, "error": r.json().get("error")} keep = ("name", "rating", "review_count", "full_address", "business_id") return [{k: item.get(k) for k in keep} for item in r.json()["items"]] client = Anthropic() messages = [{"role": "user", "content": "Find well-rated Italian restaurants in Manhattan."}] while True: resp = client.messages.create( model="claude-sonnet-5-5", max_tokens=1024, tools=tools, messages=messages ) if resp.stop_reason != "tool_use": break messages.append({"role": "assistant", "content": resp.content}) results = [] for block in resp.content: if block.type == "tool_use": out = search_places(**block.input) results.append( {"type": "tool_result", "tool_use_id": block.id, "content": json.dumps(out)} ) messages.append({"role": "user", "content": results}) print(next(b.text for b in resp.content if b.type == "text")) ``` Failed calls come back as a JSON `error` object with a `code`, a `message` and a `request_id`, and they cost nothing, so the handler passes that object to the model rather than raising. ### As an MCP tool There's no schema to write. The two paths also serve different clients, so there are two ways to show it. For your own agent loop, the Anthropic API can attach a remote MCP server through its [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector), which replaces the `tools` list, the handler and the `while` loop above: ```python import os from anthropic import Anthropic client = Anthropic() resp = client.beta.messages.create( model="claude-sonnet-5-5", max_tokens=1024, messages=[{"role": "user", "content": "Find well-rated Italian restaurants in Manhattan."}], mcp_servers=[ { "type": "url", "url": "https://perceptlayer.com/mcp", "name": "perceptlayer", "authorization_token": os.environ["API_KEY"], } ], tools=[{"type": "mcp_toolset", "mcp_server_name": "perceptlayer"}], betas=["mcp-client-2025-11-20"], ) print(next(b.text for b in resp.content if b.type == "text")) ``` The connector is a beta feature, so confirm the parameter names and the `betas` value against its docs before copying this. We haven't run this snippet against the server. With the connector, the API makes the tool calls for you, which means you give up the handler where function calling trims results. In an interactive client such as Claude Code, one command registers the server instead: ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` The server at `https://perceptlayer.com/mcp` uses Streamable HTTP and exposes three tools. `search_endpoints` finds endpoints in the catalogue, `get_endpoint` returns one endpoint's details, and `call_endpoint` takes an endpoint ID plus that endpoint's parameters and returns its JSON response. Given those tools, the expected flow is to search for a Google Maps endpoint, read its details with `get_endpoint`, then call it. The [MCP docs section](https://docs.perceptlayer.com/ai-agents) covers the setup per client. We haven't recorded a test of this flow, so treat it as the expected behaviour from the tool design, not a measurement. If the model does make lookup calls first, they spend no credits, but they do add turns, which matters in the next section. ## How much setup effort does each approach take? Function calling is faster for the first endpoint only if you already have an agent loop. You write a schema, a handler, error handling and the loop above. MCP is one command, but the model may need to look up an endpoint's details before it can call it (we haven't tested that flow). The effort scales differently. A second function-calling endpoint, say `GET /v1/google-maps/reviews` with its required `business_id` and optional `sort`, `limit` and `pages`, means another schema and another handler. A tenth means ten. With MCP, the tenth endpoint costs the same as the first: the model would look it up through the same three tools. If your client already supports MCP, as Claude Code does, the server path has no code at all. If you're building your own loop with a framework, the [LangChain custom tool tutorial](https://perceptlayer.com/blog/langchain-custom-tool-web-data) shows the function route end to end. For a fuller MCP walkthrough, see [MCP Server for Web Scraping: Tools Agents Can Call](https://perceptlayer.com/blog/mcp-server-for-web-scraping) and [Claude MCP Web Search](https://perceptlayer.com/blog/claude-agent-live-search-mcp). ## Which approach uses fewer tokens? Neither wins outright; they spend tokens in different places. Tool definitions count as input tokens on every request ( [Anthropic, tool use overview, 2026](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)): the `tools` parameter carries tool names, descriptions and schemas. So the size of your tool list is a recurring cost on each turn. With function calling, you pay per endpoint you expose. The example above sends one tool with two properties ( `query` and `limit`), and you can write a tight description. Ten schemas means ten tools, and every one is sent on every turn whether the agent uses it or not. With MCP against this server, the list stays at three tools whatever the catalogue size. By count, function calling sends fewer tools up to two endpoints, ties at three and sends more from four on. Count isn't tokens, since descriptions and schemas differ in size, so the method below measures the real figure. The cost moves to turns: any lookups before the first call, and then the endpoint response in the context. We haven't benchmarked token totals, so we won't give a number. Here is a method you can reproduce. It is a method, not a result: we haven't run it, so this article publishes no `usage.input_tokens` figures. 1. Send the same prompt twice with the Messages API, once with the one-schema `tools` list from the example and once with the three MCP tools, copied from the server's `tools/list` response. 2. Read `usage.input_tokens` from each response and compare the first turn. 3. Run the agent to completion and sum `usage.input_tokens` and `usage.output_tokens` across all turns. 4. Repeat with ten schemas against the same three MCP tools to see where the lines cross. The second lever is result shaping. In the function version above, the handler keeps five fields per place: `name`, `rating`, `review_count`, `full_address` and `business_id`. Each item in the recorded `simple-search` response has 28 top-level fields, so the handler drops 23 of them, including coordinates, `photos_sample` with its long photo URLs, owner fields, `phone_numbers`, an `order_link` and an `attributes` object. With function calling, you cut that down in your handler. Over MCP, `call_endpoint` returns the endpoint's JSON response. `simple-search` also takes an optional `fields` string, but how it behaves isn't documented, so check a real response before counting on it to trim output. A field count isn't a token count, and we haven't measured either side. What the recorded item does show is that the payload is far wider than the five fields the agent needs, and that it repeats for every place returned. On a wide endpoint like this one, that suggests shaping can matter at least as much as the tool list, but measure both with the method above before deciding which to optimise first. ## What does it cost to run? Running costs are the same for both approaches, because both end in the same HTTP call. A successful call costs 1 credit through function calling or `call_endpoint`, and failed calls return `X-Credits-Used: 0`. Lookups through `search_endpoints` and `get_endpoint` cost nothing, so the only extra spend MCP adds is model tokens. A worked example: an agent that makes 10,000 data calls a month spends 10,000 calls × 1 credit = 10,000 credits. That equals the Starter pack's 10,000 credits, and purchased credits last 12 months. Every account also gets 100 free credits once, after email verification, with no credit card, which would cover the first 100 of those calls. See [pricing](https://perceptlayer.com/pricing) for what credits cost. The service is prepaid. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. That is a hard ceiling on a runaway agent in either approach. Each successful response carries `X-Credits-Remaining`, which your function handler can read; over MCP, `call_endpoint` reports credits used and remaining. See [AI Agent API Cost Control](https://perceptlayer.com/blog/ai-agent-web-data-costs) for budget patterns, and [Pricing](https://perceptlayer.com/pricing) for the packs. ## What breaks over time, and who fixes it? With function calling, the schema is yours, so drift is yours. If you copy a parameter list into a schema today and the endpoint gains an optional parameter, the model won't know it exists until you edit the schema. Wrong or missing `required` entries produce `invalid_parameters` (422) errors the model then has to recover from. With MCP, the server publishes the tools, and `get_endpoint` returns an endpoint's details, so you don't hand-copy parameter lists into schemas. You write nothing per new endpoint. We haven't tested how quickly a catalogue change reaches the model, so check that if drift matters to you. The trade-off is less control: you can't reword a description to steer the model, and you depend on the client's handling of the server. Retries are the same in both. Rate-limited (429) and temporarily unavailable (503) responses carry a `Retry-After` header with the seconds to wait. Requests have no idempotency key, so a call whose reply was lost to a client timeout may have succeeded and been billed. Put that logic in your handler or client, not in the model's hands; [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) shows how. ## Comparison: MCP vs function calling In short, function calling puts definitions, result shaping and turn count in your hands, while MCP hands definition upkeep to the server and keeps the tool list at three tools. Credit cost per successful call is identical. The table sets the two side by side on the points covered above. | | Function calling | MCP server | | --- | --- | --- | | Who writes tool definitions | You, per endpoint | The server | | Tool list sent to the model | One schema per endpoint you expose | Three tools, any endpoint | | Setup for one endpoint | Schema, handler, loop | One command in an MCP client | | Setup for ten endpoints | Ten schemas and handlers | Same as one | | Extra turns | None | Possible lookups before the first call (untested) | | Result shaping | In your handler, before the model | `call_endpoint` returns the JSON response; `fields` exists on `simple-search`, behaviour undocumented | | Parameter drift | Your job to track | Server publishes the tools; `get_endpoint` returns an endpoint's details | | Cost per successful call | 1 credit | 1 credit | | Cost of lookups | Not applicable | 0 credits | | Best control over prompts | Full | Limited | ## Which should you pick for your use case? Pick by how many endpoints the agent uses and who controls the client: function calling for a few known endpoints where you want control, MCP for open-ended source choice or an MCP-native client. Since the credit price is the same either way, cost shouldn't decide it. Here is a plain verdict for five common cases. - **A fixed workflow with one to three endpoints** (for example, search a place, then fetch its reviews): function calling. Small schemas, no lookup turns by design, trimmed results. - **An agent that must choose among many sources:** MCP. Writing and updating dozens of schemas isn't worth it when three tools cover the catalogue. - **Interactive use in Claude Code or another MCP client:** MCP. There's no code to write, and you can ask for data in plain language. - **High-volume, latency-sensitive pipelines:** function calling. You avoid any possible lookup turns and control the payload size exactly. If no model needs to choose, call the HTTP endpoint directly from code and skip tools altogether. - **Prototyping before you know which sources matter:** MCP first, then move the endpoints you settle on into functions. The two aren't exclusive. You can expose a handful of hand-written functions for the hot path and attach the MCP server for everything else. Whichever you choose, start with a real call. [Get a free API key](https://perceptlayer.com/signup), then run `simple-search` in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps) to see the response your tool will return. Authentication details are in the [docs](https://docs.perceptlayer.com/authentication). ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### Is MCP better than function calling? Neither is better in general. They carry the same kind of tool definition to the model. MCP moves definition upkeep to the server and keeps the tool list short; function calling gives you control over descriptions, results and turn count. For one to three endpoints, function calling is usually simpler. For many sources, MCP is. ### Does MCP cost more credits than calling the API directly? No. A successful `call_endpoint` spends the same credits as the endpoint's price, which is 1 credit for nearly all endpoints, including every Google Maps endpoint. `search_endpoints` and `get_endpoint` only look up the catalogue and spend nothing. Failed calls cost nothing either. ### Can I use both in one agent? Yes. One workable setup is hand-written functions for the two or three endpoints the agent calls constantly, plus the MCP server for occasional lookups of other sources. Just avoid exposing the same endpoint through both paths, since the model may pick either and you could see duplicate calls on your balance. ### What happens when an MCP or function call fails? The API returns an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`; codes include `invalid_parameters` (422), `rate_limited` (429) and `insufficient_credits` (402). The failed call is not billed. Pass the error back to the model so it can correct parameters, and handle `Retry-After` in code. See [Errors](https://docs.perceptlayer.com/errors). mcp function calling ai agents tool use google maps ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 20 Jul 2026 Perceptlayer 7 min read ## [LLM Tool Schema Design: A Checklist for Web APIs](https://perceptlayer.com/blog/agent-tool-schema-design-web-apis) LLM tool schema design checklist, applied to the Google Maps simple-search endpoint: a before and after schema that cuts 28 result fields to 7. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. --- title: "Booking.com Hotel Prices API: Search, Rooms and Reviews" description: "Eleven Booking.com endpoints as JSON: search, prices, rooms and reviews, with parameters and a 1,000-hotel price check costed in credits." url: https://perceptlayer.com/blog/booking-com-hotel-prices-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Booking.com Hotel Prices API: Search, Rooms and Reviews 25 Aug 2026 Updated 23 Oct 2026 Perceptlayer 8 min read The [Booking.com API](https://perceptlayer.com/apis/booking) returns hotel prices, rooms and reviews as JSON through eleven endpoints, each costing 1 credit per successful call. Use `GET /v1/booking/prices` to price a destination for your dates, `rooms` for one hotel's room options, and `reviews` for guest feedback. A price check across 1,000 hotels costs between 40 and 2,000 credits, depending on the endpoints you pick. ## Key takeaways - Booking.com has eleven endpoints here: `search`, `search-by-url`, `prices`, `bulk-prices`, `destinations`, `hotel`, `rooms`, `facilities`, `photos`, `reviews` and `review-scores`. Every one costs 1 credit. - `prices` needs three parameters: `ss`, `checkin` and `checkout`. Add `dest_id` and `dest_type` to pin the destination. - Per-hotel endpoints ( `rooms`, `reviews`, `review-scores`) accept a hotel `url`, or `country` plus `slug`. - Pricing 1,000 hotels with one `rooms` call each costs 1,000 credits, ten times the 100 free credits a new account gets. Reading prices from `prices` result lists costs far fewer, because one call returned 25 hotels in the recorded sample. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## Which Booking.com endpoint does which job? The eleven endpoints fall into four jobs: finding hotels ( `destinations`, `search`, `search-by-url`), pricing them ( `prices`, `bulk-prices`), describing one property ( `hotel`, `rooms`, `facilities`, `photos`) and judging quality ( `reviews`, `review-scores`). All return JSON with named fields, and each costs 1 credit on success. | Job | Endpoint | Method | Use it to | | --- | --- | --- | --- | | Find | `/v1/booking/destinations` | GET | Turn a place name ( `q`) into a destination to search | | Find | `/v1/booking/search` | GET | List hotels for a place, optionally with dates | | Find | `/v1/booking/search-by-url` | GET | Run a Booking.com search results URL you already have | | Price | `/v1/booking/prices` | GET | Get hotel names, prices and review scores for dates | | Price | `/v1/booking/bulk-prices` | POST | Send a list of `searches` in one request | | Describe | `/v1/booking/hotel` | GET | Read one property's details | | Describe | `/v1/booking/rooms` | GET | See one property's rooms for your dates | | Describe | `/v1/booking/facilities` | GET | List one property's facilities | | Describe | `/v1/booking/photos` | GET | Get one property's photos | | Judge | `/v1/booking/reviews` | GET | Page through guest reviews, sorted | | Judge | `/v1/booking/review-scores` | GET | Read the score breakdown for one property | A typical flow starts with `destinations` or `search` to find hotels, then calls the per-hotel endpoints on the ones you care about. The per-endpoint pages, such as [Prices](https://perceptlayer.com/apis/booking/prices), [Hotel](https://perceptlayer.com/apis/booking/hotel) and [Reviews](https://perceptlayer.com/apis/booking/reviews), have a playground where you can run each one with your key. ## How do you search hotels for a place and dates? Call `GET /v1/booking/search` with `ss` (the place) and, for dated results, `checkin` and `checkout`. Only `ss` is required. Add `group_adults`, `group_children` and `no_rooms` to describe the party, and `dest_id` with `dest_type` to remove any ambiguity about which place you mean. ```bash curl "https://api.perceptlayer.com/v1/booking/search?ss=Paris&checkin=2026-06-01&checkout=2026-06-04&group_adults=2&dest_id=-1456928&dest_type=city" \ -H "X-API-Key: $API_KEY" ``` Don't know the `dest_id`? Call [`destinations`](https://perceptlayer.com/apis/booking/destinations) with `q` set to the place name first. `dest_type` accepts one of `city`, `region`, `district`, `hotel`, `landmark` or `airport`. If you already have a Booking.com results page open in a browser, `search-by-url` takes that `url` and nothing else. Keys go in the `X-API-Key` header; see [authentication](https://docs.perceptlayer.com/authentication) for the query-parameter alternative. ## How do you get hotel prices for your dates? `GET /v1/booking/prices` returns a list of hotels with a price for your stay. It requires `ss`, `checkin` and `checkout`, which makes it the right call when the question is "what does this stay cost", not "which hotels exist". Here is a recorded request for three nights in Paris for two adults. ```bash curl "https://api.perceptlayer.com/v1/booking/prices?ss=Paris&checkin=2026-11-20&checkout=2026-11-23&group_adults=2&dest_id=-1456928&dest_type=city" \ -H "X-API-Key: $API_KEY" ``` An excerpt of the real response, recorded on 2026-10-23: ```json { "success": true, "data": { "title": "Booking.com: hotels in Paris", "prices": [ { "name": "Royal Saint Michel", "url": "https://www.booking.com/hotel/fr/royal-saint-michel.html", "price": "$351.05", "review_score": "8.8", "location": "3 Boulevard Saint Michel, Paris", "image": "https://cf.bstatic.com/xdata/images/hotel/square240/560523800.jpg?…" }, … ], "total_prices": 25, "parsed": true }, "meta": { "duration_ms": 1423.85, "scraped_at": "2026-10-23T19:48:12+00:00", "cached": false, … } } ``` These are the parameters for `prices`; `search` takes the same ones, except that its dates are optional. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `ss` | string | yes | The place, up to 200 characters | | `checkin` | string | yes | Check-in date | | `checkout` | string | yes | Check-out date | | `group_adults` | integer | no | Adults in the party | | `group_children` | integer | no | Children in the party | | `no_rooms` | integer | no | Number of rooms | | `dest_id` | integer | no | Destination ID, from `destinations` | | `dest_type` | string | no | `city`, `region`, `district`, `hotel`, `landmark` or `airport` | | `lang` | string | no | Up to 10 characters | | `currency` | string | no | Up to 3 characters | `prices` documents no `page`, `limit` or offset parameter, so one call returns one result list. Two details matter for pipelines. `price` and `review_score` are strings, so parse them before you compare. The price is a formatted amount, here in dollars; pass `currency` (up to three characters, an [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) code) and `lang` to control the format. And `meta.scraped_at` tells you when the data was read: values are returned as found at the time of the call. ## How do you get rooms and room-level prices? `GET /v1/booking/rooms` takes a hotel and, optionally, your stay details, and returns that property's rooms. Identify the hotel with its Booking.com `url`, or with `country` (two characters) and `slug`. Add `checkin`, `checkout`, `group_adults`, `group_children`, `no_rooms`, `lang` and `currency` to price the rooms for your dates. ```bash curl "https://api.perceptlayer.com/v1/booking/rooms?country=fr&slug=royal-saint-michel&checkin=2026-11-20&checkout=2026-11-23&group_adults=2" \ -H "X-API-Key: $API_KEY" ``` The `country` and `slug` come straight from a hotel URL: in `https://www.booking.com/hotel/fr/royal-saint-michel.html`, they are `fr` and `royal-saint-michel`. That means the `url` field in each `prices` result feeds the per-hotel endpoints directly. We haven't recorded a `rooms` response for this article, so the field list lives on the endpoint page and in the playground rather than here. `facilities` and `photos` take the same parameters as `rooms`, and [`hotel`](https://perceptlayer.com/apis/booking/hotel) takes only the identifiers. ## How do you pull reviews and review scores? Use `GET /v1/booking/reviews` for the text of guest reviews and `GET /v1/booking/review-scores` for the score breakdown. Both identify the hotel with `url`, or `country` plus `slug`. Reviews add `page`, `limit` and `sort`, where `sort` is one of `recent_desc`, `recent_asc`, `score_desc` or `score_asc`. ```bash curl "https://api.perceptlayer.com/v1/booking/reviews?country=fr&slug=royal-saint-michel&sort=recent_desc&page=1" \ -H "X-API-Key: $API_KEY" ``` Sorting by `recent_desc` suits monitoring: you see new reviews first and can stop paging once you reach one you've stored. Sorting by `score_asc` surfaces complaints. Each page is one call and one credit, so the cost of reading a hotel's whole review history is the number of pages you fetch. Reviews are guest-written text. If you store them, keep to the source's terms and don't contact the authors. ## What does a price check across 1,000 hotels cost? It costs between 40 and 2,000 credits, depending on how you build it. Every call is 1 credit, so the arithmetic is call counting. The sample above returned 25 hotels in a single `prices` call, and the number returned varies by search. Because `prices` has no paging parameter, you can't page one search up to 1,000 hotels. The first row below assumes 40 separate searches (different districts or dates, say), each returning 25 distinct hotels, so treat it as a best case. | Approach | Calls | Credits | | --- | --- | --- | | `prices`, 40 separate searches at 25 hotels each (as in the recorded sample) | 1,000 ÷ 25 = 40 | 40 × 1 = 40 | | `rooms` once per hotel, for room-level prices | 1,000 | 1,000 × 1 = 1,000 | | `rooms` plus `reviews` page 1 per hotel | 2,000 | 2,000 × 1 = 2,000 | The 1,000 credits of the second row are ten times the free credits (100, granted once after verifying an email address, no card), so the free credits cover the first 100 hotels and the full check needs a pack. Repeat that check daily for 30 days and you need 30,000 credits, so look at the [pricing](https://perceptlayer.com/pricing) page for what packs cost. Packs start at 10,000 credits, last 12 months, and carry no subscription. `bulk-prices` takes a list of `searches` in a single POST. Its endpoint listing shows 1 credit per call. Because we haven't recorded a batch here, send a small list first and read `X-Credits-Used` on the response before you size a job. Every successful response also carries `X-Credits-Remaining`, which is how a scheduled job can stop itself before the balance runs out. The [credits guide](https://docs.perceptlayer.com/credits) covers both headers. ### How long does 1,000 calls take? Rate limits are per account, counted per minute. A free account gets 1 request a second, so 1,000 sequential calls take about 17 minutes. A paying account runs at least 5 requests a second (300 a minute), so the same job finishes in under 4 minutes. A 429 response carries a `Retry-After` header with the seconds to wait; see [rate limits](https://docs.perceptlayer.com/rate-limits). ## A script that calls rooms for a list of hotels This Python script calls `rooms` for each hotel URL in a list, waits and retries the same hotel on a 429, stops on any other error, and prints the credits the API reports. It doesn't parse the room data, because we haven't recorded a `rooms` response; add that once you've seen one in the playground. ```python import os import time import requests API = "https://api.perceptlayer.com/v1/booking/rooms" HEADERS = {"X-API-Key": os.environ["API_KEY"]} hotel_urls = [ "https://www.booking.com/hotel/fr/royal-saint-michel.html", # …your other hotel URLs ] def fetch(url, attempts=5): for _ in range(attempts): r = requests.get( API, headers=HEADERS, params={"url": url, "checkin": "2026-11-20", "checkout": "2026-11-23", "group_adults": 2}, timeout=60, ) if r.status_code == 429: time.sleep(int(r.headers.get("Retry-After", "1"))) continue r.raise_for_status() return r raise RuntimeError(f"still rate limited after {attempts} attempts: {url}") for url in hotel_urls: r = fetch(url) print(url, "credits used:", r.headers["X-Credits-Used"], "remaining:", r.headers["X-Credits-Remaining"]) ``` A rate-limited 429 isn't billed, so retrying it is safe. A timed-out request is different: it may have succeeded and been billed, because requests have no idempotency key, so don't blindly retry timeouts on a large job. Error codes such as `invalid_parameters` (422) and `insufficient_credits` (402) are listed in [errors](https://docs.perceptlayer.com/errors). ## When should you use the official Booking.com API instead? If you're an approved Booking.com partner, the company's own [developer portal](https://developers.booking.com/) is worth checking first: it lists the Demand API, Connectivity APIs, Metasearch Connect API and Data Portability API, and may fit a production affiliate or connectivity product better than collected data. Check the portal for what access each one requires. This API suits the cases where you need hotel prices, rooms and reviews as JSON today, in the same account and format as the rest of the [travel APIs](https://perceptlayer.com/verticals/travel). Data is collected from publicly available sources and returned as found at the time of the call, so it isn't a booking channel and shouldn't be shown as a guaranteed, bookable rate. Comparing sources for the same stay is a common next step. The [Google Hotels API guide](https://perceptlayer.com/blog/google-hotels-api) covers a second set of prices, and the [AI travel planning agent](https://perceptlayer.com/blog/ai-travel-planning-agent-mcp) shows how to expose both to an agent over MCP. Get a free API key at [signup](https://perceptlayer.com/signup), open the [Booking.com API](https://perceptlayer.com/apis/booking) page and run the Prices call in the playground with your own dates. ## APIs in this post - [Booking.com **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/booking) ## Frequently asked questions ### How much does a Booking.com API call cost? Every Booking.com endpoint here costs 1 credit on a successful call. Failed calls cost nothing and return `X-Credits-Used: 0`. New accounts get 100 free credits after verifying an email, with no credit card. They cover the first 100 calls of a 1,000-call job; the rest needs a pack, and the smallest, Starter, has 10,000 credits. ### Can I check prices for many destinations in one request? Yes. `POST /v1/booking/bulk-prices` accepts a list of `searches`, and the endpoint is listed at 1 credit per call. Test it with a few searches and read the `X-Credits-Used` header on the response before you scale it. For a single destination, one `prices` call is simpler. ### What is the difference between search and prices? `search` requires only `ss` and lists hotels, with dates optional. `prices` requires `ss`, `checkin` and `checkout`, and is built to return a price for each hotel along with its review score. Use `search` to discover hotels and `prices` when the stay dates are known. ### How do I identify a hotel for the rooms and reviews endpoints? Pass the hotel's Booking.com page as `url`, or pass `country` (two characters) and `slug`. Both come from the hotel's URL, such as `/hotel/fr/royal-saint-michel.html`. The `url` field returned by `prices` gives you these values for every hotel in a result set. ### How fast can I call the API? Limits are per account and counted per minute. Free accounts get 1 request a second (60 a minute); paying accounts run at the rate of the credits they're using and at least 5 a second (300 a minute). A 429 response includes a `Retry-After` header with the wait in seconds. booking.com hotel prices travel reviews rooms ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Jul 2026 Perceptlayer 7 min read ## [Expedia Hotels API: Search Hotels and Rooms as JSON](https://perceptlayer.com/blog/expedia-hotels-api-search-json) Search Expedia hotels by region and dates, then list rooms and rate plans as JSON. Real parameters, a recorded response and 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Nov 2026 Perceptlayer 8 min read ## [Booking.com Scraper or API: What You Get](https://perceptlayer.com/blog/booking-com-scraper-vs-api) A Booking.com scraper vs 11 endpoints at 1 credit a call: one recorded Paris prices call returned 25 hotels, about 0.04 credits per hotel price. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. --- title: "Car Auction Price Data: What Sold Prices Can Show" description: "Auction results are sold prices, not asking prices. The filters that matter on Bring a Trailer, Cars & Bids and Copart, their biases, and a 5-year pull's cost." url: https://perceptlayer.com/blog/car-auction-price-data --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Car Auction Price Data: What Sold Prices Can Show 25 Aug 2026 Perceptlayer 8 min read Car auction price data shows what buyers actually paid, which dealer listings can't: an asking price is an offer, a closed auction is a result. That makes auctions the closest public source to transaction prices for enthusiast and damaged cars. But each auction type sells a different slice of the market, so the useful questions are which results to keep, which to separate, and which biases to correct before you average anything. ## Key takeaways - A sold result and a high bid on an unsold car are different numbers: Bring a Trailer search takes `sale_status` of `sold` or `unsold`, so you can pull both and measure how often a model fails to meet its reserve. - `auction_type=no-reserve` on Bring a Trailer separates auctions that had to sell from reserve auctions, where low bids never become prices. - Copart mostly sells insurance total losses: insurers supplied 79% of the vehicles it processed in fiscal 2026, so its prices measure damaged and salvage cars, filtered by `damage` and `title_group`. - Online enthusiast auctions add a buyer's fee on top of the winning bid, so the hammer price understates what the buyer paid. - A 5-year model history on Bring a Trailer is one call per page of `auctions-search` with `auction_status=past&range=5Y`, plus 1 credit per auction you open with `listings`. ## Why are auction prices different from listing prices? Because they're outcomes, not offers. A dealer listing tells you what a seller hopes to get, and it can sit unsold, be cut, or sell below the sticker after negotiation that never appears online. A closed auction records the highest bid at a fixed end time, in public, and whether it was enough to sell. For pricing a specific car, that's the stronger signal. The catch is coverage. Listings cover nearly every used car for sale; auctions cover the cars their sellers chose to auction. Our guide to [used car listing data for price analysis](https://perceptlayer.com/blog/used-car-listing-data-price-analysis) covers the listing side, with its own fields and biases. The two work best together: listings for breadth and current supply, auctions for what the market actually cleared. ## Which auction types does the data cover? Three, each with a different seller and buyer. The [Bring a Trailer API](https://perceptlayer.com/apis/bring-a-trailer) and the [Cars & Bids API](https://perceptlayer.com/apis/cars-and-bids) cover online enthusiast auctions, where private sellers and dealers list collectable and enthusiast cars with photos, history and a public comment thread. The [Copart API](https://perceptlayer.com/apis/copart) covers salvage auctions, where most vehicles come from insurers after a total loss. | | Bring a Trailer | Cars & Bids | Copart | | --- | --- | --- | --- | | What's sold | Collectable and enthusiast cars | Enthusiast cars from the 1980s on | Mostly damaged, total-loss and recovered vehicles | | Typical seller | Private owners and dealers | Private owners and dealers | Insurance companies, then dealers, banks, rental and fleet companies | | Price signal | Sold price or high bid, reserve or no reserve | Sold price or high bid | Sale price of a damaged vehicle | | Key search filters | `sale_status`, `auction_type`, `range`, `minimum_year`, `maximum_year` | `status`, `make_slug`, `model_slug`, `start_year`, `end_year`, `transmission` | `make`, `model`, `damage`, `title_group`, `odometer_max`, `year_from`, `year_to` | | Endpoints | 4 | 3 | 4 | Copart's own filings are explicit about its mix: insurance company sellers supplied 79% of the vehicles it processed in fiscal 2026 and 81% in fiscal 2025, and most vehicles sold for insurers are total losses or recovered stolen vehicles ( [Copart Form 10-K, fiscal 2026](https://www.sec.gov/Archives/edgar/data/0000900075/000119312526405731/cprt-20260731.htm), 2026). A Copart price is the value of a car in its damaged state, not a retail price. ## Which fields matter for sold-price analysis? Five things decide whether two auction results are comparable: the outcome, the reserve, the car's condition, its mileage and the date. On these endpoints, most of them are search filters, which is useful: you can pull comparable sets directly instead of downloading everything and filtering later. We haven't recorded responses from these three APIs, so the response field names are on each endpoint page; the table lists the filters. | What matters | Why | Filter | | --- | --- | --- | | Sold or unsold | An unsold car's high bid is below the seller's reserve, not a price | Bring a Trailer `sale_status` ( `sold`, `unsold`); Cars & Bids `status` ( `closed`) | | Reserve or no reserve | No-reserve auctions always sell, so their prices include weak days | Bring a Trailer `auction_type` ( `premium`, `no-reserve`, `alumni`) | | Condition and title | A salvage title or flood damage can outweigh every other factor | Copart `damage`, `title_group` | | Mileage | The main within-model price driver for drivable cars | Copart `odometer_max`; Cars & Bids `sort=lowest_mileage` | | Model year and spec | Model years and gearboxes can price very differently | Year ranges on all three; Cars & Bids `transmission` ( `automatic`, `manual`), `body_style` | | Date | Prices move; compare like periods | Bring a Trailer `range` ( `7D`, `30D`, `1Y`, `2Y`, `5Y`) | Store the unsold results rather than dropping them. The share of a model's auctions that fail to sell is a market signal in its own right: a rising no-sale rate says sellers' reserves are above what buyers will pay, often before sold prices fall. ## What biases come with each auction type? Every auction sells a selected sample, and the selection runs in a known direction. Correct for it, or at least don't mix samples. The four biases below are the ones that change averages most. **Selection on enthusiast sites.** Sellers bring good examples of desirable cars to Bring a Trailer and Cars & Bids, because those sites reward photos, records and originality. Their results describe the top of a model's market, not the average example on a dealer lot. **Fees on top of the bid.** On online enthusiast auctions, the winning bidder pays a buyer's fee on top of the winning bid; Cars & Bids describes its fee, a percentage of the winning bid with a minimum and a maximum, that way on its own site ( [Cars & Bids](https://carsandbids.com/what-is/), 2026), and it says it focuses on cars from the 1980s onward. Fee rates and caps change, so check the current terms. Decide whether you're modelling the hammer price or the buyer's total, and apply one rule throughout. **Reserve censoring.** On a reserve auction, a car that doesn't reach its reserve goes unsold, so sold prices alone leave out the low end. A model with a high no-sale rate looks more valuable from sold prices than it is. Pull `sale_status=unsold` too, and report sold prices alongside the no-sale rate. **Condition on salvage auctions.** Copart prices reflect damage type, title status and whether the car runs. A "front end" hit and a flood car of the same model aren't comparable, and neither tells you a retail value. Segment by `damage` and `title_group` before averaging. ## How much does a 5-year model history cost? A worked example Price a 5-year history of one model on Bring a Trailer by counting pages. `GET /v1/bring-a-trailer/auctions-search` returns one page of results per call at 1 credit, and it takes `page` and `per_page`. Pull sold and unsold results separately, so you can compute the no-sale rate. These requests haven't been run for this article: ```bash curl "https://api.perceptlayer.com/v1/bring-a-trailer/auctions-search?auction_status=past&sale_status=sold&make_or_model=porsche+911&range=5Y&page=1&per_page=50" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/bring-a-trailer/auctions-search?auction_status=past&sale_status=unsold&make_or_model=porsche+911&range=5Y&page=1&per_page=50" \ -H "X-API-Key: $API_KEY" ``` The number of pages depends on how many auctions match and how many results a page holds; the endpoint definition documents neither a default nor a maximum `per_page`, so read both from the first response in the playground on the [Auctions Search page](https://perceptlayer.com/apis/bring-a-trailer/auctions-search). The arithmetic is then simple. As an illustration, suppose a model has 600 sold and 150 unsold past auctions and pages hold 50 results: | Step | Calls | Credits | | --- | --- | --- | | Sold results, 600 ÷ 50 per page | 12 | 12 | | Unsold results, 150 ÷ 50 per page | 3 | 3 | | Full record for each sold auction ( `listings`) | 600 | 600 | | Total, search only | 15 | 15 | | Total, with every record | 615 | 615 | Those counts are an example, not a measurement. The pattern holds whatever the real numbers are: searching is cheap and opening every record dominates the cost. Open records only for the auctions you need details on, such as the ones closest to your car's year and mileage. A search-only history of 20 models at 15 credits each is 300 credits; the 100 free credits cover the first 6 models, and the Starter pack's 10,000 covers the rest. The same method applies to the others. On Cars & Bids, `search` pages with `limit` and `offset`, and `auction` opens one result by `id`. On Copart, `lots-search` pages with `page` and `per_page`, `lots-filters` lists the filter values, and `lots-detail` opens one lot by `lot_number`. Every endpoint costs 1 credit per successful call; failed calls cost nothing. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for billing. ## What can't auction data show? Three things. It can't show private sales, dealer trade-ins or wholesale dealer auctions that aren't public, which is where most used cars change hands. It can't tell you what an unsold car eventually went for. And it can't separate a car's value from its presentation: two identical cars can sell apart because one had better photos and a busier comment thread. So use auction results as a high-quality sample of the enthusiast and salvage markets, alongside listing data, not as a measure of the whole used-car market. To pull either side as JSON, [get a free API key](https://perceptlayer.com/signup) and try a past-auctions search in the playground on the [Bring a Trailer API page](https://perceptlayer.com/apis/bring-a-trailer). The [cars APIs](https://perceptlayer.com/verticals/cars) list the listing sources on the same key. Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Bring a Trailer **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/bring-a-trailer) - [Copart **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/copart) - [Cars & Bids **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/cars-and-bids) ## Frequently asked questions ### Where can I get car auction price data? Public online auctions publish their results: Bring a Trailer and Cars & Bids for enthusiast cars, Copart for damaged and salvage vehicles. The Perceptlayer [Bring a Trailer](https://perceptlayer.com/apis/bring-a-trailer), [Cars & Bids](https://perceptlayer.com/apis/cars-and-bids) and [Copart](https://perceptlayer.com/apis/copart) APIs return searches and single results as JSON, at 1 credit per successful call, with filters for sale status, reserve, damage, title, mileage and year. ### Is an auction high bid the same as a sale price? No. On a reserve auction, the high bid on a car that didn't sell was below the seller's reserve, so it's an upper bound on what buyers offered, not a price. Bring a Trailer search separates them with `sale_status` of `sold` or `unsold`. Keep both: the share that fails to sell is a useful market signal. ### Why are Copart prices so much lower than retail? Because most Copart vehicles are insurance total losses or recovered stolen vehicles; insurers supplied 79% of the vehicles Copart processed in fiscal 2026, per its annual report. Prices reflect damage, title status and whether a car runs. Filter by `damage` and `title_group`, and don't compare Copart prices with retail listings. ### How much does a model's price history cost? On Bring a Trailer, one search page costs 1 credit, so a 5-year history of one model is as many credits as it has pages of sold and unsold results. Opening each auction's full record with `listings` adds 1 credit per auction. Failed calls cost nothing, and every account gets 100 free credits on signup. ### Do auction prices include the buyer's fee? Usually not. Online enthusiast auctions such as Cars & Bids charge the winning bidder a fee on top of the winning bid, so the total the buyer paid is higher than the hammer price. Fee rates and caps change, so check each site's current terms and apply one rule consistently in your analysis. car auctions used car prices bring a trailer copart vehicle data ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 31 Oct 2026 Perceptlayer 9 min read ## [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check. --- title: "Rightmove API: Get UK Property Listings and Sold Prices" description: "Pull Rightmove UK listings, sold prices and agents as JSON with 8 endpoints at 1 credit per call, with a real London search response and cURL examples." url: https://perceptlayer.com/blog/rightmove-api-property-data --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Rightmove API: Get UK Property Listings and Sold Prices 25 Aug 2026 Perceptlayer 8 min read Rightmove's Real Time Data Feed is described as a way to upload listings. The Perceptlayer Rightmove API is for the reading side: eight GET endpoints return listings, single properties, sold prices, agents and location lookups as JSON, at 1 credit per successful call. One cURL call against `/v1/rightmove/search` is enough to start. ## Key takeaways - Rightmove's Real Time Data Feed is described as a way for agents to upload and update their own listings, not to read other people's. - `GET /v1/rightmove/search` needs only `channel` (BUY, RENT, COMMERCIAL\_BUY or COMMERCIAL\_RENT) and returns listings with price, bedrooms, address and coordinates. - Sold prices come from `GET /v1/rightmove/sold-properties`, filtered by `postcode`, `property_type`, `tenure` and `sold_in`. - Every one of the 8 Rightmove endpoints costs 1 credit on success. Failed calls cost nothing and return `X-Credits-Used: 0`. - A single search sweep is capped at about 1,000 records over 41 pages, so narrow the location to go deeper. ## Is there an official Rightmove API? No. Rightmove's own data-feed documentation is for sending listings in, not for reading them out. Its current specifications page covers loading "UK Sales & Lettings properties", "Overseas Sales properties" and "New Homes Developers properties" onto the live site, and describes no way to search or retrieve listings ( [Rightmove Automated Datafeed Specifications](https://www.rightmove.co.uk/adf.html), 2026). Rightmove introduced the Real Time Data Feed so agents could "upload your properties and make changes to your current Rightmove listings almost instantly" ( [Rightmove news, Real Time Data Feed](https://www.rightmove.co.uk/news/?p=29205), 2015). If you're an estate agent or a CRM vendor publishing stock, the feed is your route. If you're a developer who needs to read UK listings as JSON, that's the gap the [Rightmove API](https://perceptlayer.com/apis/rightmove) covers. It's one of the sites in the [real estate APIs](https://perceptlayer.com/verticals/real-estate) area, and it uses the same key and the same JSON conventions as the rest of the catalogue. ## What can the Rightmove API return? Eight endpoints cover the data a Rightmove page shows: listings for sale or rent, a single property, sold prices, agents and branches, addresses, and location lookups. All are GET requests, all cost 1 credit on success, and all return JSON. The table lists each one with its required parameters. | Endpoint | Returns | Required | Credits | | --- | --- | --- | --- | | [`/v1/rightmove/search`](https://perceptlayer.com/apis/rightmove/search) | Search | `channel` | 1 | | [`/v1/rightmove/property`](https://perceptlayer.com/apis/rightmove/property) | Property | `id` | 1 | | [`/v1/rightmove/sold-properties`](https://perceptlayer.com/apis/rightmove/sold-properties) | Sold Properties | none | 1 | | [`/v1/rightmove/sold-property`](https://perceptlayer.com/apis/rightmove/sold-property) | Sold Property | `uuid` | 1 | | [`/v1/rightmove/locations-typeahead`](https://perceptlayer.com/apis/rightmove/locations-typeahead) | Locations Typeahead | `query` | 1 | | [`/v1/rightmove/agents`](https://perceptlayer.com/apis/rightmove/agents) | Agents | `channel` | 1 | | [`/v1/rightmove/branch`](https://perceptlayer.com/apis/rightmove/branch) | Branch | `id` | 1 | | [`/v1/rightmove/address`](https://perceptlayer.com/apis/rightmove/address) | Address | none | 1 | The usual flow is: resolve a place name, search listings, then fetch detail for the ones you care about. For sold prices, go straight to `sold-properties` with a postcode, then open individual records with `sold-property`. ## How do you search Rightmove listings? Call `GET /v1/rightmove/search` with a `channel` and a place. `channel` is the only required parameter. Pass `location` as free text, or `location_identifier` if you already have one. The call below searches London listings for sale, and it's the exact request behind the recorded response in the next section. ```bash curl "https://api.perceptlayer.com/v1/rightmove/search?location=London&channel=BUY" \ -H "X-API-Key: $API_KEY" ``` Get a key from [the free signup](https://perceptlayer.com/signup); authentication is covered in the [docs](https://docs.perceptlayer.com/authentication). Keys start with `sk_live_` and go in the `X-API-Key` header. ### Which parameters does the search endpoint take? Search takes one required parameter and thirteen optional ones. Types and allowed values below come straight from the endpoint definition. Nothing else about defaults or page sizes is documented, so don't rely on any. | Parameter | Type | Notes | | --- | --- | --- | | `channel` | string, required | One of `BUY`, `RENT`, `COMMERCIAL_BUY`, `COMMERCIAL_RENT` | | `location` | string | Up to 120 characters | | `location_identifier` | string | Up to 60 characters | | `location_name` | string | Up to 120 characters | | `radius` | integer | | | `page` | integer | | | `sort` | integer | | | `min_price`, `max_price` | integer | Price bounds | | `min_bedrooms`, `max_bedrooms` | integer | Bedroom bounds | | `property_type` | string | Up to 60 characters | | `must_have` | string | Up to 60 characters | | `enrich` | boolean | | For example, `channel=RENT&location=Manchester&min_bedrooms=2&max_price=1800` asks for rentals in Manchester with at least two bedrooms and a price ceiling of 1,800. Check the [Search endpoint page](https://perceptlayer.com/apis/rightmove/search) or the playground for the allowed `sort` values. ### What does a search response look like? The recorded response for the London request above holds a `data` object with a `properties` array plus paging fields, and a `meta` object. Here is an excerpt, trimmed with `…`: ```json { "data": { "properties": [ { "id": 90486465, "bedrooms": 3, "bathrooms": 2, "displayAddress": "Cavaye Place, Chelsea, London, SW10", "countryCode": "GB", "location": { "latitude": 51.486678, "longitude": -0.180225 }, "propertySubType": "Apartment", "tenure": { "tenureType": "LEASEHOLD" }, "price": { "amount": 1495000, "currencyCode": "GBP", "displayPrices": ["…"] }, "customer": { "branchId": 298991, "branchDisplayName": "OB Private, Mayfair" }, "displaySize": "1,285 sq. ft.", "channel": "BUY", "addedOrReduced": "Added on 03/07/2026", "listing_id": "90486465", "branch_id": 298991 } ], "count": 60081, "page": 1, "page_size": 24, "channel": "BUY", "location_identifier": "REGION^87490", "has_next_page": true, "record_limit": { "max_page": 41, "approx_records_per_search": 1025, "note": "Rightmove caps a single search sweep at roughly 1,000 records over 41 pages. Narrow the location to go deeper." } }, "meta": { "attempts": 1, "lookups": 1, "duration_ms": 1253 } } ``` The fields you'd use most are `price.amount`, `bedrooms`, `displayAddress`, `location`, `propertySubType` and `tenure.tenureType`. The listing `id` is what you pass to the property endpoint. The same recorded response shows `channel` as `COMMERCIAL_BUY` on a second, commercial listing in the array, so a residential search can return commercial stock. ## Why does a London search stop at 41 pages? A single search sweep stops at roughly 1,000 records. The recorded response reports `count: 60081` matches for London but also `max_page: 41` and `approx_records_per_search: 1025`, and its own note says to narrow the location to go deeper. `has_next_page` tells you whether another page exists within that cap. Treat `count` as the size of the market, not the size of your result set. To collect more than about 1,000 listings, split the area: run one search per borough, outcode or neighbourhood, and add price bands with `min_price` and `max_price` so each slice stays under the cap. Here's a short page loop in Python: ```python import os import requests URL = "https://api.perceptlayer.com/v1/rightmove/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def search_all(params, max_pages=41): listings = [] for page in range(1, max_pages + 1): r = requests.get(URL, headers=HEADERS, params={**params, "page": page}, timeout=60) r.raise_for_status() data = r.json()["data"] listings.extend(data["properties"]) if not data["has_next_page"]: break return listings homes = search_all({"channel": "BUY", "location": "London"}) print(len(homes)) ``` It reads the `has_next_page` flag from the recorded response shape and stops when it's false. For retries, rate limits and safe loops, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## How do you get one property, or find a location first? Use `GET /v1/rightmove/property` with the listing `id`, and `GET /v1/rightmove/locations-typeahead` to turn typed text into a location. There's no recorded response for either in this article, so the descriptions below stick to the parameters. Open each endpoint page or the playground to see the actual output. | Endpoint | Parameters | Use it to | | --- | --- | --- | | `/v1/rightmove/property` | `id` (string, required) | Fetch one listing after a search returned its `id` | | `/v1/rightmove/locations-typeahead` | `query` (string, required, up to 120 characters), `limit` (integer, optional) | Resolve a place name before searching | ```bash curl "https://api.perceptlayer.com/v1/rightmove/locations-typeahead?query=Chelsea&limit=5" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/rightmove/property?id=90486465" \ -H "X-API-Key: $API_KEY" ``` Typeahead is useful when users type a place name and you want a precise match rather than free text. The [Locations Typeahead page](https://perceptlayer.com/apis/rightmove/locations-typeahead) and the [Property page](https://perceptlayer.com/apis/rightmove/property) list the response fields. ## How do you get sold prices? Call `GET /v1/rightmove/sold-properties`. Nothing is required, but you'll want to filter: `postcode` (up to 10 characters), `location_id` with a `location_type` of REGION, OUTCODE, POSTCODE, BRANCH or STATION, and `radius`. You can narrow by `property_type` (DETACHED, FLAT, TERRACED, SEMI\_DETACHED), `tenure` (FREEHOLD, LEASEHOLD) and `sold_in`. ```bash curl "https://api.perceptlayer.com/v1/rightmove/sold-properties?postcode=SW10&property_type=FLAT&tenure=LEASEHOLD" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Allowed values | | --- | --- | --- | | `postcode` | string | Up to 10 characters | | `location_id` | integer | | | `location_type` | string | `REGION`, `OUTCODE`, `POSTCODE`, `BRANCH`, `STATION` | | `radius` | integer | | | `page`, `page_size` | integer | | | `property_type` | string | `DETACHED`, `FLAT`, `TERRACED`, `SEMI_DETACHED` | | `tenure` | string | `FREEHOLD`, `LEASEHOLD` | | `sold_in` | integer | `3`, `6`, `12`, `24`, `120` | To look at one sale in full, pass its `uuid` to `GET /v1/rightmove/sold-property`. We haven't recorded a sold-prices response for this article, so see the [Sold Properties page](https://perceptlayer.com/apis/rightmove/sold-properties) and the [Sold Property page](https://perceptlayer.com/apis/rightmove/sold-property) for the output, or run it in the playground. When is the free government data a better fit? If you only need completed sale prices for England and Wales, HM Land Registry's Price Paid Data covers "all property sales in England and Wales that are sold for value and are lodged with us for registration", is released under the Open Government Licence, and is updated on the 20th working day of each month ( [HM Land Registry, Price Paid Data](https://www.gov.uk/government/statistical-data-sets/price-paid-data-downloads), 2026). It's free to download, so for bulk historical analysis it's the cheaper route. Rightmove sold-price data is the better fit when you want it alongside live listings, agents and the same JSON shape. Whichever source you use, read Rightmove's terms of use first and make sure your use of the data complies with them. ## What about agents, branches and addresses? Three more endpoints cover the supply side. `GET /v1/rightmove/agents` needs a `channel` of BUY or RENT and takes `location` or `location_identifier` as optional filters. `GET /v1/rightmove/branch` takes a branch `id`. `GET /v1/rightmove/address` takes an optional `postcode` or `term`. The search response already carries `branch_id`, so a typical flow is to take it from a listing and pass it to the [Branch endpoint](https://perceptlayer.com/apis/rightmove/branch). The [Agents endpoint](https://perceptlayer.com/apis/rightmove/agents) lists agents for an area, and the [Address endpoint](https://perceptlayer.com/apis/rightmove/address) helps when you start from a postcode or an address fragment instead of a listing. For listing-data design, our guide to [the real estate listing fields that matter for valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields) goes through which of these fields to keep. ## What does a Rightmove API call cost? Every Rightmove endpoint costs 1 credit per successful call. Failed calls cost nothing and return `X-Credits-Used: 0`. Each success also returns `X-Credits-Used` and `X-Credits-Remaining`, so you can track your balance as you go. See the [credits docs](https://docs.perceptlayer.com/credits) for how billing works. The free tier gives you 100 credits after you verify an email address, with no credit card. Paid packs are prepaid and last 12 months. There's no subscription and no seats. | Pack | Credits | | --- | --- | | Free | 100, once | | Starter | 10,000 | | Build | 50,000 | | Growth | 200,000 | | Pro | 500,000 | | Scale | 1,000,000 | | Volume | 5,000,000 | Worked example: a full sweep of one search is at most 41 pages × 1 credit = 41 credits, so the 100 free credits cover 2 sweeps (2 × 41 = 82). A Starter pack of 10,000 credits covers 243 sweeps (243 × 41 = 9,963). Add one `property` call per listing you want in full and each costs 1 more credit. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Rate-limited (429) and temporarily unavailable (503) responses carry a `Retry-After` header with the seconds to wait. There's no idempotency key, so a request that timed out on your side may still have been billed. The [errors docs](https://docs.perceptlayer.com/errors) and [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the codes. Prices and packs are on the [pricing page](https://perceptlayer.com/pricing). ## Can an AI agent call the Rightmove API? Yes. The Perceptlayer MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing. `call_endpoint` takes an endpoint ID and its parameters, and spends credits only on success. An agent can look up the Rightmove search endpoint, read its parameters, then call it with the user's area and budget. Setup is in the [MCP docs](https://docs.perceptlayer.com/ai-agents), and [an MCP server for web scraping](https://perceptlayer.com/blog/mcp-server-for-web-scraping) explains how the tools fit together. To try the endpoints first, [get a free API key](https://perceptlayer.com/signup) and run your own London search in the playground on the [Rightmove API page](https://perceptlayer.com/apis/rightmove). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Rightmove **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/rightmove) ## Frequently asked questions ### Does Rightmove have a public API? No. Rightmove's published data-feed specifications cover uploading listings, and they describe no way to search or retrieve them ( [Rightmove Automated Datafeed Specifications](https://www.rightmove.co.uk/adf.html), 2026). To read listings, sold prices or agent data as JSON, use the [Rightmove API](https://perceptlayer.com/apis/rightmove) from Perceptlayer, which returns each endpoint's data with one key. ### How much does the Rightmove API cost? Every Rightmove endpoint costs 1 credit per successful call, and failed calls cost nothing. You get 100 free credits on signup. After that, credits come in prepaid packs from 10,000 (Starter) to 5,000,000 (Volume), so 20,000 calls × 1 credit = 20,000 credits. The [pricing page](https://perceptlayer.com/pricing) shows what each pack costs. ### How many listings can one Rightmove search return? About 1,000. The recorded London search reported 60,081 matches but a cap of 41 pages and roughly 1,025 records per search, and its note says to narrow the location to go deeper. Split a large area into boroughs or outcodes, and add price bands, so each search stays under the cap. ### Can I get Rightmove sold prices as JSON? Yes. `GET /v1/rightmove/sold-properties` accepts `postcode`, `property_type`, `tenure` and `sold_in`, and `GET /v1/rightmove/sold-property` takes a `uuid` for one record. Each call costs 1 credit. We haven't recorded a sold-prices response here, so check the endpoint pages for the fields it returns. ### What happens if a call fails or I run out of credits? A failed call returns an HTTP status and a JSON error with a `code`, `message` and `request_id`, and costs nothing. When your prepaid balance reaches zero, calls return `insufficient_credits` (402) and nothing more is debited. There's no automatic top-up. The [errors docs](https://docs.perceptlayer.com/errors) list every code. rightmove uk property real estate listings sold prices ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 12 Jul 2026 Perceptlayer 7 min read ## [Zoopla API: UK Listings and Sold Prices as JSON](https://perceptlayer.com/blog/zoopla-api-property-listings-sold-prices) Search Zoopla listings by outcode, pull sold prices and a property's valuation history by UPRN, at 1 credit per call. Parameters, cURL and a sweep cost. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. --- title: "MCP Server for Web Scraping: Tools Agents Can Call" description: "An MCP server gives an agent three tools to find, inspect and call web endpoints. Use the scraper for uncatalogued pages, structured endpoints for the rest." url: https://perceptlayer.com/blog/mcp-server-for-web-scraping --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # MCP Server for Web Scraping: Tools Agents Can Call 23 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read An MCP server for web scraping exposes web access to an agent as named tools it can discover and call, instead of code you write and maintain per site. Perceptlayer's server at `https://perceptlayer.com/mcp` has three tools: `search_endpoints`, `get_endpoint` and `call_endpoint`. The agent finds an endpoint, looks it up, then calls it. A raw page scrape and a structured endpoint both cost 1 credit, so the real choice is the shape of the response your agent has to work with. ## Key takeaways - The server has three tools. `search_endpoints` and `get_endpoint` only read the catalogue and cost nothing; `call_endpoint` spends credits, and only when the call succeeds. - The `/v1/web-scraper/scrape` endpoint takes a `url` (up to 2048 characters) and costs 1 credit. A structured endpoint such as `/v1/google-search/search` also costs 1 credit, and its recorded response has named fields such as `organic_results[0].link`. - Use the scraper for pages with no structured endpoint. Use a structured endpoint when the site is in the catalogue, because the agent reads documented fields. - Every successful response reports `X-Credits-Used` and `X-Credits-Remaining`, and failed calls return `X-Credits-Used: 0`, so an agent can track its own spend. ## What does an MCP server do for a scraping agent? An MCP server turns web access into a tool list the agent can discover at runtime. The Model Context Protocol is an open standard for connecting models to tools and data ( [Model Context Protocol specification](https://modelcontextprotocol.io/specification/2026-07-28), 2026). Without it, you hand-write a function per site and describe each one in the prompt. With it, the agent asks the server what exists and what each tool needs. If you're weighing this against defining your own functions, [MCP vs Function Calling for Live Web Data in Agents](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) compares the two. For web data this matters because the catalogue is large: 480 websites and 2,782 endpoints, all returning JSON. You can't list that many tool definitions in a prompt. So the server doesn't try. It gives the agent a search tool over the catalogue and calls the right endpoint on demand. The transport is Streamable HTTP, one of the two standard transports in the [MCP transport specification](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports) (2026). That means a plain HTTPS URL, no local process to run. ## Which tools does the Perceptlayer MCP server expose? The server exposes three tools, and only one of them costs anything. `search_endpoints` finds endpoints in the catalogue, `get_endpoint` looks up one endpoint, and `call_endpoint` runs it. The first two are lookups and are free. The third takes an endpoint ID plus that endpoint's parameters, returns the endpoint's JSON response, and reports the credits used and remaining. | Tool | What it does | Credits | | --- | --- | --- | | `search_endpoints` | Finds endpoints in the catalogue | 0 | | `get_endpoint` | Looks up one endpoint in the catalogue | 0 | | `call_endpoint` | Calls an endpoint by ID with its parameters | The endpoint's credits, on success only | The agent's usual path is search, inspect, call. Because lookups are free, an agent can look at several candidate endpoints before it spends anything. If a call fails, you aren't billed for it. ### What does the search, inspect, call sequence look like? Take one task: an agent is asked for the top Google result for a query. It starts with `search_endpoints`, describing what it needs, and reads the candidates the catalogue returns. That step is free. It picks the Google Search endpoint that fits. Next it calls `get_endpoint` on the chosen endpoint, which is also free, to look it up in the catalogue before spending anything. Last, it calls `call_endpoint` with the endpoint's ID and its parameters. For `GET /v1/google-search/search` that means a required `query` plus optional ones such as `hl` and `safe`. The call spends 1 credit if it succeeds and returns the endpoint's JSON, the same shape as the recorded response further down. If the question had no good match in the catalogue, the first step would show that, and the agent could fall back to the scraper. ### How do you add the server? For Claude Code, one command registers it. Put your key in `API_KEY` first; you can get one free at [/signup](https://perceptlayer.com/signup). ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` Other MCP clients need the same three things: the URL, the HTTP transport and the key in the `Authorization` header. The [AI agents (MCP) docs](https://docs.perceptlayer.com/ai-agents) are the place to check the details, and [Claude MCP Web Search](https://perceptlayer.com/blog/claude-agent-live-search-mcp) walks through a full search agent. ## What does raw scraping give an agent? Raw scraping takes a URL you choose and leaves the extraction to the agent. The Web Scraper API's `scrape` endpoint, `GET /v1/web-scraper/scrape`, costs 1 credit per call; the API also has a `map` endpoint that takes a site `url`. `scrape` takes a required `url` (up to 2048 characters) and three optional parameters: `include_html`, `javascript` and `response_type`. | Parameter | Type | Notes | | --- | --- | --- | | `url` | string, required | Up to 2048 characters | | `include_html` | boolean, optional | See the [Scrape endpoint](https://perceptlayer.com/apis/web-scraper/scrape) | | `javascript` | boolean, optional | See the [Scrape endpoint](https://perceptlayer.com/apis/web-scraper/scrape) | | `response_type` | string, optional | `json` or `markdown` | Here's the request: ```bash curl "https://api.perceptlayer.com/v1/web-scraper/scrape?url=https%3A%2F%2Fexample.com&include_html=0&javascript=0" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a response for `scrape`, so this post can't show what it returns. The [Web Scraper API page](https://perceptlayer.com/apis/web-scraper) has a playground where you can run it against your own URL and see the response before you design the agent's extraction step. The upside is reach: you pass the `url`, so it can point at a page no structured endpoint covers. ## What does a structured endpoint give an agent instead? A structured endpoint returns named fields for a known site, so the agent reads values rather than hunting for them. For Google results, `GET /v1/google-search/search` takes a required `query` and costs 1 credit, the same as a scrape. This is the recorded response to a search for `best restaurants in Berlin` with `hl=en`, trimmed: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "redirect_link": "https://www.google.com/goto?url=CAESegHrOzAV7vOTOiRYGN3Rq_LJMgUCSUtmes2rLIk-rn2vHS6tGU7IIN38aZ1xjQeD3kZuDFfbW6QvUSum1Woyp6Hmrl5u9WEXLlEP2Ek60dzztg2yT13pxwC2ptSy…", "displayed_link": "https://andershusa.com › best-restaurants-berlin-german...", "source": "Anders & Kaitlin", "rank_group": 1, "rank_absolute": 4 }, … ], "related_searches": [ { "query": "Best restaurants in Berlin for tourists", … } ], … } ``` An agent asked for the top result's link reads `organic_results[0].link`. There's no page to parse. The same response also carries `snippet` text, `related_searches` and `people_also_search_for`, which an agent can use for follow-up queries. The [Google Search API page](https://perceptlayer.com/apis/google-search) lists all seven endpoints, and [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json) covers the parameters in depth. One caution: the recorded excerpt includes long `redirect_link` values on each result. They arrive in the response, so a lean agent prompt should say which fields to use. ## How do the two compare on credits and response shape? On credits they tie: both calls cost 1. These are two different tasks, so it isn't a like-for-like comparison: one starts from a URL you supply, the other from a query. The table sets out what's documented. | | Web Scraper `scrape` | Structured endpoint ( `search`) | | --- | --- | --- | | Credits per call | 1 | 1 | | Input | `url`, required | `query`, required | | Response | `json` or `markdown` ( `response_type`) | Named fields such as `organic_results[0].link` | | Sites covered | The URL you pass | Sites in the catalogue | ### What does a task cost in credits? Credits add up per call, so work out the calls per task. Suppose an agent runs one `search` and scrapes three of the result pages: 1 + 3 = 4 credits per task. At 1,000 tasks that's 1,000 × 4 credits = 4,000 credits, which fits inside the Starter pack's 10,000 credits. See [pricing](https://perceptlayer.com/pricing) for what credits cost. The free tier gives 100 credits once, after you verify an email address, no credit card: enough for 25 of those tasks. The same task done with only structured calls might need one call, not four. That's a design choice, not a guarantee: it depends on whether the question needs page text at all. [AI Agent API Cost Control](https://perceptlayer.com/blog/ai-agent-web-data-costs) shows how to cap this spend, and the [credits docs](https://docs.perceptlayer.com/credits) list the rules. ## When is raw scraping the right tool? Raw scraping is right when no structured endpoint exists for the page, or when you need the page's own text. An agent reading a blog post, a changelog or a documentation page wants prose, not fields. The `response_type` parameter accepts `json` or `markdown`, so you can pick whichever your agent reads better. For what it costs to maintain your own scrapers instead, see [Scraper or API: What Maintaining a Scraper Really Involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost). It's also the fallback for the long tail. The catalogue covers 480 websites; the web is far bigger. If the agent's question lands outside it, `scrape` is the endpoint to try. Check a site's terms and its `robots.txt` before you point an agent at it ( [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309), 2022). Structured endpoints are right when the site is in the catalogue and the question is about a value: a ranking, a price, a rating. In that case search first. An agent that calls `search_endpoints` before `scrape` finds structured coverage when it exists, and the lookup costs nothing. ## What happens when a call fails? A failed call returns an HTTP status and a JSON body shaped as `{"error": {"code", "message", "request_id"}}`, and it costs nothing. The response carries `X-Credits-Used: 0`. Common codes are `invalid_api_key` (401), `insufficient_credits` (402), `invalid_parameters` (422) and `rate_limited` (429). Two cases matter for agents. A 429 or 503 carries a `Retry-After` header with the seconds to wait, so the agent should sleep that long rather than retry in a loop. And because requests have no idempotency key, a request whose reply was lost to a client timeout may have succeeded and been billed. [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers that case, and the [errors docs](https://docs.perceptlayer.com/errors) list every code. The service is prepaid. When the balance reaches zero, calls return `insufficient_credits` (402) and nothing more is debited. Nothing tops up automatically. ## What to do next Add the server, then give the agent a question that has a catalogue answer and one that doesn't, and watch which tool it picks. To see the data before wiring anything, run a call in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search), or [get a free API key](https://perceptlayer.com/signup) and try the cURL requests above. For a LangChain version of the same idea, see [LangChain Custom Tool for Live Web Data](https://perceptlayer.com/blog/langchain-custom-tool-web-data). More agent guides are in the [AI agents category](https://perceptlayer.com/blog/category/ai-agents). ## APIs in this post - [Web Scraper **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/web-scraper) - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Do the MCP lookup tools cost credits? No. `search_endpoints` and `get_endpoint` only look up the catalogue and cost nothing. Only `call_endpoint` spends credits, it spends the endpoint's listed credits, and it does so only when the call succeeds. Most endpoints cost 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. ### How does the agent authenticate with the MCP server? Claude Code sends your API key in the `Authorization: Bearer` header, as in the command above. Direct HTTP calls use the `X-API-Key` header instead. Keys start with `sk_live_`. See [authentication](https://docs.perceptlayer.com/authentication) for the API key details. ### Is a scrape cheaper than a structured call? No. The `scrape` endpoint costs 1 credit and so does `search`. A structured call costs the credits shown on its endpoint, and nearly all cost 1. So the decision rests on the input and the response shape, not on price per call. ### How much does it cost to run an agent for a month? Multiply calls per task by tasks by 1 credit. An agent making 10,000 calls a month uses 10,000 calls × 1 credit = 10,000 credits, which is the Starter pack's 10,000 credits. Purchased credits last 12 months, and there's no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and for the Build and Growth packs. ### What happens if my agent hits the rate limit? A rate-limited response returns 429 with a `Retry-After` header giving the seconds to wait. Temporarily unavailable responses (503) carry the same header. Have the agent wait that long before retrying, and cap the number of retries so a stuck loop can't run indefinitely. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have details. mcp web scraping ai agents tool calling credits ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Sept 2026 Perceptlayer 7 min read ## [MCP Server Too Many Tools: Keeping Agent Context Small](https://perceptlayer.com/blog/mcp-too-many-tools-context) One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small. --- title: "Patent Data for Competitive Intelligence: A Practical Guide" description: "Which patent fields show where a competitor invests (assignee, priority and filing dates, family status), the 18-month publication lag, and a worked example." url: https://perceptlayer.com/blog/patent-data-competitive-intelligence --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Patent Data for Competitive Intelligence: A Practical Guide 23 Aug 2026 Perceptlayer 7 min read Patent data shows where a competitor has committed money to an idea, years before a product ships, but it shows it late. The fields that matter are the assignee, the priority, filing and grant dates, the family's status in each country and the classification codes. The catch is timing: applications are generally published 18 months after their earliest priority date, so the newest work is always invisible. Research papers fill part of that gap. ## Key takeaways - Filter by `assignee` on `GET /v1/google-patents/search` and sort with `sort=new` to see a company's newest publications; `status` separates `GRANT` from `APPLICATION`. - The priority date is the closest public proxy for when the work was done; the grant date is a legal event, often years later. - In the recorded search, both patents were granted about 9.5 and 10 years after their priority dates, and one is kind code B1, meaning it had no earlier pre-grant publication. - `family_status` shows where protection is active by country: the second recorded patent's WO and EP family members are `NOT_ACTIVE`, a hint about where its owner chose not to pursue it. - Scholar results for a topic can show research directions before the patents publish; tracking 10 competitors monthly is about 20 credits. ## What can patent data tell you about a competitor? Three things, with decreasing confidence. Volume over time says how much a company files in an area, which tracks R&D spending more honestly than press releases. Topic, through titles, snippets and classification codes, says which problems it's working on. Geography, through family status, says which markets it thinks are worth protecting, since filing and keeping a patent in each country costs money. What it can't tell you is what the company will build. Companies patent defensively, patent ideas they abandon, and keep important work as trade secrets. Treat a cluster of filings as evidence of investment, not of a product plan. And remember the lag: anything filed in the last year and a half is mostly invisible. ## Which fields matter, and why? The ones that place an invention in time, ownership and geography. The [Google Patents search endpoint](https://perceptlayer.com/apis/google-patents/search) returns them for each result. The table maps each field in the recorded response to what it's good for in competitive analysis. | Field | What it is | What it tells you | | --- | --- | --- | | `assignee` | The owner of the patent | Whose investment it is; normalise names, since one company files under several | | `dates.priority` | Earliest claimed filing date | Closest proxy for when the work was done | | `dates.filing` | Filing date of this application | Later than priority for continuations; shows a company extending a family | | `dates.grant`, `dates.publication` | When it was granted and published | When the public could first see it | | `publication_number` | Number plus kind code, e.g. `US12438891B1` | `B1`/ `B2` granted, `A1` an application | | `family_status` | Status per country or office | Where protection is active or has lapsed | | `title`, `snippet` | Title and a claim excerpt | Topic, for clustering | Classification codes are the other key field for topic analysis. The Cooperative Patent Classification is the scheme the USPTO and the EPO developed jointly and both use ( [CPC](https://www.cooperativepatentclassification.org/about), 2026), and codes cluster filings far better than keywords. They aren't in the recorded search response; the [Details endpoint](https://perceptlayer.com/apis/google-patents/details) returns a single patent's full record, so check there. The inventor field is also returned; it names people, so this guide doesn't use it. ## Why do the newest filings stay hidden? Because of the publication rule. In the US, applications are published promptly after 18 months from the earliest filing date they claim, with exceptions such as applicants who certify they won't file abroad ( [USPTO MPEP 1120](https://www.uspto.gov/web/offices/pac/mpep/s1120.html), 2026). Most other major offices publish on the same 18-month schedule. Until then, an application is confidential, so no data source, paid or free, can show it. That sets a floor on how current patent intelligence can be. A search today shows work whose priority date is at least about 18 months old, plus older applications granted recently. A company that starts filing heavily in a new area this quarter won't appear in patent data until around 2028. Plan analysis around that: patent data is for direction over years, not for this quarter's moves. Some patents never appear as applications at all. The USPTO's kind codes mark a granted patent with no previously published pre-grant publication as `B1`, and one with an earlier publication as `B2` ( [USPTO, kind codes](https://www.uspto.gov/learning-and-resources/support-centers/electronic-business-center/kind-codes-included-uspto-patent), 2026). A `B1` was invisible until the day it was granted. ## What does the recorded data show? A worked example The recorded response for `q=machine learning` holds two patents. Here's an excerpt, trimmed with `…`, with inventor names cut: ```json { "success": true, "data": { "total_results": 122797, "total_pages": 99, "patents": [ { "patent_id": "patent/US12438891B1/en", "title": "Anomaly detection based on ensemble machine learning model", "publication_number": "US12438891B1", "dates": { "priority": "2015-08-31", "filing": "2022-02-18", "grant": "2025-10-07", "publication": "2025-10-07" }, "assignee": "Splunk Inc.", "family_status": [{ "country": "US", "status": "ACTIVE" }], … }, { "patent_id": "patent/US12518214B2/en", "title": "Distributed machine learning systems including generation of synthetic data", "publication_number": "US12518214B2", "dates": { "priority": "2016-07-18", "filing": "2023-04-21", "grant": "2026-01-06", "publication": "2026-01-06" }, "assignee": "Nantomics, Llc", "family_status": [{ "country": "WO", "status": "NOT_ACTIVE" }, { "country": "EP", "status": "NOT_ACTIVE" }], … } ], … } } ``` Work out the gaps from the dates. They show how far a grant can trail the work it protects: | Patent | Priority to filing | Filing to grant | Priority to grant | | --- | --- | --- | --- | | US12438891B1 | 6.5 years | 3.6 years | 10.1 years | | US12518214B2 | 6.8 years | 2.7 years | 9.5 years | Both were filed more than six years after their priority dates, which is consistent with a continuation: a later application in an existing family, claiming the original date. Both were granted in 2025 and 2026 on work first filed in 2015 and 2016. If you counted these as "machine learning patents in 2025", you'd be measuring decade-old work. Count by priority year instead. The `B1` on the first means its owner received a patent with no earlier pre-grant publication of this application. The second's WO and EP entries are `NOT_ACTIVE`, so its owner isn't, or is no longer, pursuing protection through those routes, while it holds a US grant. Two results aren't a trend, but they show which questions each field answers. ## How do research papers fill the gap? Papers can appear well before related patents publish, and they name institutions. The [Google Scholar API](https://perceptlayer.com/apis/google-scholar) search takes `q`, a year range with `as_ylo` and `as_yhi`, and `scisbd` for date sorting. The recorded response for `q=machine learning&as_ylo=2020` reports 38,300 results, with each result's `publication_info.summary`, a source and year, and `inline_links.cited_by.total`, 292 for its second result. Citation counts favour older papers, so compare papers of similar age. Scholar results don't carry an affiliation field in the recording, so to follow one company, search its name together with a topic, or follow known researchers with the [Author endpoint](https://perceptlayer.com/apis/google-scholar/author), keeping in mind that author profiles are personal data. Our [Google Scholar API guide](https://perceptlayer.com/blog/google-scholar-api) covers the parameters. ## How do you set up monthly tracking, and what does it cost? Run one patent search per competitor per month, filtered by `assignee` and sorted newest first, plus one Scholar search for its main topic. Store results keyed by `publication_number` and count by priority year. These requests haven't been run for this article; the `assignee` value must match how the company appears in patent records, so check it in the playground first: ```bash curl "https://api.perceptlayer.com/v1/google-patents/search?q=anomaly+detection&assignee=Splunk+Inc.&sort=new" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/google-scholar/search?q=anomaly+detection+splunk&as_ylo=2025&scisbd=1" \ -H "X-API-Key: $API_KEY" ``` Every call costs 1 credit on success; failed calls cost nothing. The recorded patent search reports 99 pages for 122,797 results, so a broad query can't be read in full; filter by assignee, `status`, `before` and `after` to keep result sets to a few pages. Our [Google Patents API guide](https://perceptlayer.com/blog/google-patents-api-search-details) covers paging and when the official bulk datasets are a better fit. | Job | Calls a month | Credits a month | | --- | --- | --- | | 10 competitors, 1 patent search + 1 Scholar search | 20 | 20 | | The same, plus details for 30 new patents | 50 | 50 | | 50 competitors, 2 pages of patents + 1 Scholar search | 150 | 150 | The 100 free credits a verified account gets are granted once, so they cover five months of the first job, two of the second and none of the third. A Starter pack's 10,000 credits cover a year of any of them. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for billing. To try it, [get a free API key](https://perceptlayer.com/signup) and search a competitor's name as assignee in the playground on the [Google Patents API page](https://perceptlayer.com/apis/google-patents). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Google Patents **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/google-patents) - [Google Scholar **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-scholar) ## Frequently asked questions ### How is patent data used for competitive intelligence? Analysts count a competitor's filings by priority year and topic to see where it's investing, read family status to see which countries it protects, and watch new grants and applications for direction changes. It's evidence of R&D spending, not of product plans, and it runs at least 18 months behind because of publication rules. ### Why can't I see a competitor's latest patent applications? Because they aren't public yet. Applications are generally published 18 months after their earliest priority date, and some US applicants opt out of publication if they don't file abroad. Until publication, no source can show them. Granted patents with kind code `B1` had no earlier publication at all. ### Which date should I use to count patents by year? The priority date, the earliest filing date a patent claims. It's closest to when the work was done. Grant dates can be years later: the two recorded patents were granted 9.5 and 10.1 years after their priority dates, after continuation filings in 2022 and 2023. ### How much does tracking competitors' patents cost? Each Google Patents or Google Scholar call costs 1 credit per successful call, and failed calls cost nothing. Ten competitors with one patent search and one Scholar search a month is 20 credits a month, so the 100 free credits on signup cover the first five months. Opening a patent's full record with the details endpoint costs 1 more credit. ### Are inventor names personal data? Yes. Patent records name inventors, and Scholar results name authors, so handle them as personal data under the law that applies to you. For company-level analysis you rarely need them: assignee, dates, family status and classification codes answer most competitive questions without processing individuals' names. patents competitive intelligence google patents google scholar r&d ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 31 Oct 2026 Perceptlayer 9 min read ## [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check. --- title: "App Store Reviews API: Apple App Store Data as JSON" description: "Call GET /v1/apple-app-store/product-reviews with an app's product_id to get ratings, titles and review text as JSON. Parameters, a real response, 1 credit." url: https://perceptlayer.com/blog/app-store-reviews-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # App Store Reviews API: Apple App Store Data as JSON 21 Aug 2026 Perceptlayer 8 min read To get App Store reviews for any app as JSON, call `GET /v1/apple-app-store/product-reviews` with the app's `product_id` and `store=apps`. The response lists each review with its rating, title, text and date, plus a pagination block for the next page. A successful call costs 1 credit, and a failed call costs nothing. ## Key takeaways - Apple's App Store Connect API is the tool developers use to manage their own apps. For competitor or market research, work from a public app ID instead. - `GET /v1/apple-app-store/product-reviews` takes a `product_id`, a `store` and a `country`, and returns `reviews` plus a `reviews_pagination` block. - Each recorded review carries `id`, `title`, `rating`, `text`, `date` and `is_edited`. - Details and Charts use the same key and cost 1 credit per call each. Failed calls return `X-Credits-Used: 0`. - 100 free credits arrive once, when you verify an email address, with no credit card. ## Why can't App Store Connect return reviews for other people's apps? Apple's App Store Connect API is the tool developers use to manage their own apps. It has a Customer Reviews resource ( [Apple Developer Documentation, Customer Reviews](https://developer.apple.com/documentation/appstoreconnectapi/customer-reviews)), but it's part of an API you sign in to as a team that publishes apps. We wouldn't plan on it for a competitor's reviews, and you should check Apple's documentation for what your own account can read. That's the right tool when you're reading and answering feedback on your own app. If you're doing market research, competitor tracking or building a review dataset across many apps, you need a source that works from a public app ID. That's the gap this endpoint fills: it works from a public app ID, so you only need the ID. Apple's own API is the place for replies: its Customer Review Responses resource ( [Apple Developer Documentation, Customer Review Responses](https://developer.apple.com/documentation/appstoreconnectapi/customer-review-responses)) is the place to manage replies to reviews. This API doesn't publish replies. ## How do you find an app's product ID? The `product_id` is the numeric ID in the app's App Store URL (the digits after `id`). If you only know the name, use the search endpoint. It takes one required parameter, `query`, and returns matching apps for the `store` and `country` you choose. ```bash curl "https://api.perceptlayer.com/v1/apple-app-store/search?query=facebook&store=apps&country=us" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded search response to show, so this article doesn't name the field that holds the ID. Run the call in the playground on the [Apple App Store API page](https://perceptlayer.com/apis/apple-app-store) and read the ID from the output. The numeric ID in the App Store URL is the more reliable route. The search call costs 1 credit. If you already have the ID from a URL, skip this step. The `store` parameter accepts one of `apps`, `mac`, `books`, `audiobooks`, `movies`, `tv`, `music` or `podcasts`. For iPhone and iPad apps, use `apps`. The `country` parameter is a code of up to two characters, such as `us`. ## How do you request an app's reviews? Send a GET request to `/v1/apple-app-store/product-reviews` with the `product_id`, `store` and, optionally, `num` to set how many reviews you want. No parameter is strictly required by the catalogue, but without an app ID there is nothing to look up. ```bash curl "https://api.perceptlayer.com/v1/apple-app-store/product-reviews?product_id=324684580&store=apps&num=20" \ -H "X-API-Key: $API_KEY" ``` Send the key in the `X-API-Key` header, as above. Where headers aren't possible, the `api_key` query parameter works too. See [authentication in the docs](https://docs.perceptlayer.com/authentication) for both forms. Keys start with `sk_live_`, and you can [get a free API key](https://perceptlayer.com/signup) in a minute. ### Which parameters does the endpoint take? All parameters are optional in the catalogue. These are the ones you'll use for reviews. | Parameter | Type | What it does | | --- | --- | --- | | `product_id` | string, up to 255 characters | The app's ID from its store URL | | `id` | string, up to 255 characters | Listed in the catalogue alongside `product_id` | | `store` | string | One of `apps`, `mac`, `books`, `audiobooks`, `movies`, `tv`, `music`, `podcasts` | | `country` | string, up to 2 characters | The storefront country, such as `us` | | `num` | integer | How many reviews to request | | `offset` | integer | Where to start in the list of reviews | | `next_page_token` | string, up to 100 characters | The token from the previous page, for the next one | | `season_id` | string, up to 255 characters | Listed in the catalogue; not used in the request above | The catalogue documents types and limits for these parameters and nothing more. It doesn't state defaults or page sizes, so set `num` explicitly if you depend on a number. ## What does the response look like? The response has three parts: `search_parameters` echoing your request, a `reviews` array and a `reviews_pagination` block. This is a real, trimmed response for the request above. We've left out reviewer usernames and cut the text where it says `…`. ```json { "search_parameters": { "product_id": "324684580", "store": "apps", "num": 20, "country": "us", "engine": "apple_app_store_product_reviews" }, "reviews": [ { "id": "11994640656", "title": "Favorite app ever", "rating": 5, "text": "I personally love this app. I have had it for over 4 years, and it’s been an app I use daily. If you are thinking about getting it, for sure get the Premium pla…", "date": "2024-11-26T17:10:59Z", "is_edited": false }, … ], "reviews_pagination": { "offset": 0, "limit": 20, "next_offset": 20, "next_page_token": "20", "end_of_history": false } } ``` Each review has an `id`, a `title`, a numeric `rating`, the review `text`, an ISO 8601 `date` and an `is_edited` flag. The raw response also carries an `author` field, which we removed from the excerpt. If you store reviews, decide whether you need it at all; ratings, text and dates are enough for most analysis. The `…` at the end of each `text` value in the sample marks where we trimmed the excerpt. ## How do you page through all the reviews? Use `reviews_pagination`. It gives you `next_offset`, `next_page_token` and an `end_of_history` flag. Pass the token back as `next_page_token` (or the offset as `offset`) to fetch the next page, and stop when `end_of_history` is `true`. Every page is a separate call, so every page costs 1 credit. ```python import os import requests BASE = "https://api.perceptlayer.com/v1/apple-app-store/product-reviews" HEADERS = {"X-API-Key": os.environ["API_KEY"]} params = {"product_id": "324684580", "store": "apps", "num": 20, "country": "us"} reviews = [] for _ in range(5): # hard cap: at most 5 calls, 5 credits resp = requests.get(BASE, headers=HEADERS, params=params, timeout=30) resp.raise_for_status() body = resp.json() reviews.extend(body["reviews"]) page = body["reviews_pagination"] if page["end_of_history"]: break params["next_page_token"] = page["next_page_token"] print(len(reviews), "reviews") ``` The loop has a fixed cap so a large app can't run up your balance by accident. ### How do you turn the pages into a result? Once `reviews` is filled, you can work with the `rating` and `date` fields from the recorded response without any more calls. This adds a count per star rating and the share of low ratings, then lists the one-star and two-star reviews from the last 90 days. `date` is an ISO 8601 string, so comparing it as text works. ```python from collections import Counter from datetime import datetime, timedelta, timezone by_rating = Counter(r["rating"] for r in reviews) for stars in sorted(by_rating, reverse=True): print(stars, "stars:", by_rating[stars]) low = sum(n for stars, n in by_rating.items() if stars <= 2) print(f"{low / len(reviews):.0%} of {len(reviews)} reviews are 1 or 2 stars") cutoff = (datetime.now(timezone.utc) - timedelta(days=90)).strftime("%Y-%m-%dT%H:%M:%SZ") recent_low = [r for r in reviews if r["rating"] <= 2 and r["date"] >= cutoff] for r in recent_low: print(r["date"][:10], r["rating"], r["title"]) ``` The output is a rating breakdown and a list of recent complaints you can read, which is a usable first pass at what's going wrong in an app. The numbers describe only the pages you fetched, not every review the app has. If `reviews` is empty, the division fails, so check `end_of_history` and your parameters first. For retries, backoff and the lost-reply case, read [paginate a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). Requests have no idempotency key, so a call whose reply was lost may have succeeded and been billed. [Retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers it. ## What do the Details and Charts endpoints add? The same API also has `GET /v1/apple-app-store/details`, which takes the same parameters as reviews, and `GET /v1/apple-app-store/charts`, which takes `store`, `chart` ( `top-free`, `top-paid`, `top-grossing`, `most-played`, `top-subscriber` or `top-episodes`), `genre`, `country` and `limit`. We don't have a recorded response for either, so this article doesn't show their fields. Try them in the playgrounds on the [Charts](https://perceptlayer.com/apis/apple-app-store/charts) and [Details](https://perceptlayer.com/apis/apple-app-store/details) pages. Related endpoints include [Developer](https://perceptlayer.com/apis/apple-app-store/developer) (by `artist_id`) and [Apps Product](https://perceptlayer.com/apis/apple-app-store/apps-product). ## What does it cost? Every endpoint on the Apple App Store API costs 1 credit per successful call. Failed calls cost nothing and return `X-Credits-Used: 0`. Successful responses carry `X-Credits-Used` and `X-Credits-Remaining`, so you can watch your balance in code. The [credits docs](https://docs.perceptlayer.com/credits) explain the accounting. A worked example: one chart call, then reviews for each of its 10 apps with 5 pages each. | Step | Calls | Credits | | --- | --- | --- | | Charts, `limit=10` | 1 | 1 | | Reviews, 10 apps × 5 pages | 50 | 50 | | Total | 51 | 51 | 51 credits sits inside the 100 free credits you get on signup. At scale, credits come in prepaid packs: | Pack | Credits | Requests a second included | | --- | --- | --- | | Starter | 10,000 | 5 | | Build | 50,000 | 5 | | Growth | 200,000 | 5 | | Pro | 500,000 | 5 | | Scale | 1,000,000 | 10 | | Volume | 5,000,000 | 20 | To pull 5 pages for each of 2,000 apps, that's 2,000 × 5 = 10,000 calls × 1 credit = 10,000 credits, which is exactly the Starter pack. Reviews for 10,000 apps at 5 pages each is 10,000 × 5 = 50,000 calls × 1 credit = 50,000 credits, the Build pack. Purchased credits last 12 months, and there's no subscription. See [pricing](https://perceptlayer.com/pricing) for what credits cost and for faster request rates. ## What can go wrong? Errors return an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. The ones you'll meet most are `invalid_api_key` (401), `insufficient_credits` (402), `invalid_parameters` (422), `rate_limited` (429) and `temporarily_unavailable` (503). The service is prepaid. When the balance runs out you get a 402 and nothing further is debited, with no automatic top-up. A 429 or 503 carries a `Retry-After` header with the seconds to wait, so honour it instead of retrying in a tight loop. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and [rate limits](https://docs.perceptlayer.com/rate-limits) explain the 429 behaviour. Data is collected from publicly available sources and returned as found at the time of the call. Reviews can change after you fetch them, so store the `date` and the time you fetched them. If you're building an agent rather than a pipeline, the same key works over MCP. See [AI agents (MCP)](https://docs.perceptlayer.com/ai-agents) and [MCP server for web scraping](https://perceptlayer.com/blog/mcp-server-for-web-scraping). To compare iOS with Android, the [Google Play Store API guide](https://perceptlayer.com/blog/google-play-store-api) covers the same job on the other store. For a comparable reviews walkthrough on another site, see the [Trustpilot reviews API guide](https://perceptlayer.com/blog/trustpilot-reviews-api) or the [Google Maps reviews API guide](https://perceptlayer.com/blog/google-maps-reviews-api-parameters). More pull-by-source guides are in the [API guides category](https://perceptlayer.com/blog/category/api-guides). Next step: [get a free API key](https://perceptlayer.com/signup), then run the `product-reviews` call above in the playground on the [Apple App Store API page](https://perceptlayer.com/apis/apple-app-store). ## APIs in this post - [Apple App Store **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/apple-app-store) ## Frequently asked questions ### Can I get reviews for an app I don't own? Yes, this endpoint takes a public `product_id`, so ownership isn't required. App Store Connect also has a [Customer Reviews](https://developer.apple.com/documentation/appstoreconnectapi/customer-reviews) resource, but it sits inside an API for managing your own apps, so we'd use it for your own apps only. You can't post replies through Perceptlayer, though. Apple's [Customer Review Responses](https://developer.apple.com/documentation/appstoreconnectapi/customer-review-responses) resource is the place for that. ### How much does it cost to pull reviews for one app? Each successful call costs 1 credit and returns one page of reviews, so cost equals the number of pages you fetch. Five pages is 5 credits. Calls that fail cost nothing and return `X-Credits-Used: 0`. The 100 free credits on signup cover 100 pages with no credit card. ### Can I get reviews from a specific country? Use the `country` parameter, a code of up to two characters such as `us`. The recorded request above returned `"country": "us"` in `search_parameters`. Run the call once per country you care about; each is a separate call and costs 1 credit. ### How do I get the next page of reviews? Read `reviews_pagination` in the response. Pass its `next_page_token` as `next_page_token` (or `next_offset` as `offset`) in your next request. Keep going until `end_of_history` is `true`. Each page is billed as its own call, so cap your loop to control spend. ### Does this return personal data? Reviews can include author details and free text written by individuals. Treat them as personal data in your own system: keep only the fields you need, and don't use scraped reviews to contact people. Your lawful basis and retention rules are your responsibility. app store reviews apple mobile apps app data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 7 min read ## [Trustpilot Scraper or API: Ratings and Review History](https://perceptlayer.com/blog/trustpilot-scraper-vs-api) A Trustpilot scraper vs a 1-credit company-reviews call: the recorded Amazon response, its star breakdown, and 2,340 pages × 1 credit for a full history. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read ## [Yelp Scraper or API: Reviews Without the Upkeep](https://perceptlayer.com/blog/yelp-scraper-vs-api) A Yelp scraper vs three 1-credit endpoints: a recorded Gary Danko search whose alias feeds the reviews call, with rating, text, created\_at and next\_after. --- title: "DuckDuckGo Search API: Web Results as JSON | Perceptlayer" description: "DuckDuckGo's Instant Answer API returns topic summaries, not ranked links. GET /v1/duckduckgo/search returns organic results and paging at 1 credit per query." url: https://perceptlayer.com/blog/duckduckgo-search-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # DuckDuckGo Search API: Web Results as JSON 21 Aug 2026 Updated 6 Nov 2026 Perceptlayer 6 min read DuckDuckGo's only official API is the Instant Answer API, which returns topic summaries such as abstracts and related topics, not a ranked list of web results. For organic results as JSON, `GET /v1/duckduckgo/search?q=...` returns each result's position, title, link and snippet, plus paging and, for some queries, an AI answer. It takes a region ( `kl`), a date filter ( `df`), safe search and an offset ( `start`), and costs 1 credit per successful query. ## Key takeaways - DuckDuckGo's Instant Answer API at `api.duckduckgo.com` answers well-known topics with abstracts and related links; specific queries often come back empty, and it has no ranked results. - `GET /v1/duckduckgo/search` needs only `q` (up to 499 characters) and accepts `kl`, `df` ( `d`, `w`, `m`, `y`), `safe` and `start`. - The recorded response returns `organic_results[]` with `position`, `title`, `link`, `snippet` and `display_url`, and a `pagination` object whose `next_start` is 10. - Each query costs 1 credit on success; tracking 100 keywords daily on the first page is 100 × 30 = 3,000 credits a month. - DuckDuckGo says most of its traditional links come from Bing, so expect overlap with Bing results but not identical rankings. ## Does DuckDuckGo have an official search API? It has one official API, and it isn't a web search API. The Instant Answer API at `api.duckduckgo.com` returns the answer boxes DuckDuckGo shows above results: abstracts, definitions and related topics, mostly for well-known entities ( [DuckDuckGo Instant Answer API](https://api.duckduckgo.com/api), 2026). It covers well-known topics, so a specific query, such as a product comparison, often comes back with empty fields. It's free and needs no key, so for a quick topic summary it's a fine fit. For a ranked list of links, DuckDuckGo publishes nothing. That's the gap the [DuckDuckGo API](https://perceptlayer.com/apis/duckduckgo) covers: three endpoints ( `search`, `news` and `maps`), the same key as the rest of the [search engine APIs](https://perceptlayer.com/verticals/search), JSON out. Data is collected from publicly available sources and returned as found at the time of the call. | Need | Instant Answer API | `/v1/duckduckgo/search` | | --- | --- | --- | | Topic summary for a known entity | Yes | `knowledge_graph` on some queries | | Ranked organic results | No | `organic_results[]` | | Paging | No | `start` and `pagination` | | Region and date filters | No | `kl`, `df` | | Key and cost | No key, free | API key, 1 credit per query | ## Which parameters does the search endpoint take? `GET /v1/duckduckgo/search` takes `q`, the query, and four optional parameters. Types and allowed values come from the endpoint definition. `kl` and `df` mirror the region and date settings DuckDuckGo documents for its own search URLs ( [DuckDuckGo URL parameters](https://duckduckgo.com/duckduckgo-help-pages/settings/params), 2026); defaults for this endpoint aren't documented, so set what you need. | Parameter | Type | Allowed values or notes | | --- | --- | --- | | `q` | string, required | Up to 499 characters | | `kl` | string | Region and language, up to 10 characters, for example `us-en` | | `df` | string | Date filter: `d` (day), `w` (week), `m` (month), `y` (year) | | `safe` | boolean | Safe search on or off | | `start` | integer | Result offset; the recorded first page uses `0` | A search for news-like queries from the past week in the UK would pass `kl=uk-en&df=w`. We haven't recorded that request; the playground on the [Search endpoint page](https://perceptlayer.com/apis/duckduckgo/search) runs it. ## How do you get DuckDuckGo results as JSON? Send `q` and, ideally, `kl` so results come from the region you mean. The request below is the exact one behind the recorded response. Put your key in the `X-API-Key` header; keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ```bash curl "https://api.perceptlayer.com/v1/duckduckgo/search?q=laravel+taylor+otwell&kl=us-en&start=0" \ -H "X-API-Key: $API_KEY" ``` ### What does the response look like? The recorded response holds `search_parameters`, `organic_results`, `pagination` and, for this query, a `knowledge_graph` with an `ai_answer`. Here is an excerpt, trimmed with `…`; the first result, a personal profile page, is cut: ```json { "success": true, "data": { "search_parameters": { "q": "laravel taylor otwell", "kl": "us-en", "safe": true, "start": 0 }, "organic_results": [ …, { "position": 2, "title": "taylorotwell (Taylor Otwell) · GitHub", "link": "https://github.com/taylorotwell", "snippet": "Creator of @laravel. taylorotwell has 10 repositories available. Follow their code on GitHub.", "display_url": "github.com/taylorotwell", "favicon": "https://icons.duckduckgo.com/ip3/github.com.ico" } ], "pagination": { "current": 1, "has_more": true, "next_start": 10, "next": 2 }, "knowledge_graph": { "ai_answer": { "answer": "**Taylor Otwell** is the creator of **Laravel**, a PHP web application framework he started in **2011** as a side project for himself. …" } } }, "meta": { "duration_ms": 2169, "endpoint_family": "web_search" } } ``` Two details matter when you parse it. Snippets can carry HTML entities as found: the first result's snippet in the recording contains `&`, so unescape before display. And `ai_answer.answer` is markdown with `**bold**`, so render or strip it rather than showing it raw. The response echoes `safe: true` even though the request didn't send `safe`, so check `search_parameters` to see what was applied. ## How do you page through results? Use the `pagination` object. In the recording, the first page reports `current: 1`, `has_more: true` and `next_start: 10`, so the second page is the same request with `start=10`. Stop when `has_more` is false. Each page is one call and 1 credit. ```python import os import requests URL = "https://api.perceptlayer.com/v1/duckduckgo/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def search(q, pages=3, kl="us-en"): results, start = [], 0 for _ in range(pages): r = requests.get(URL, headers=HEADERS, params={"q": q, "kl": kl, "start": start}, timeout=60) r.raise_for_status() data = r.json()["data"] results.extend(data.get("organic_results", [])) page = data.get("pagination", {}) if not page.get("has_more"): break start = page["next_start"] return results for row in search("laravel taylor otwell", pages=2): print(row["position"], row["link"]) ``` This code follows the recorded response shape; we haven't run it against the live API for this article. The recording doesn't show whether `position` restarts on page two, so sort by page and position together. For retries and loop safety, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## How do DuckDuckGo results differ from Bing's? Expect overlap, not identity. DuckDuckGo says it runs its own crawler and indexes, and that most of its traditional links and images come from Bing ( [DuckDuckGo Help Pages](https://duckduckgo.com/duckduckgo-help-pages/results/sources), 2026). It also says it doesn't use Google's results. Instant Answers draw on other sources such as Wikipedia. So DuckDuckGo is a reasonable second opinion on Bing-like results, with its own ranking and answer boxes on top. If you're replacing Microsoft's retired Bing Search API, the [Bing Search API alternative guide](https://perceptlayer.com/blog/bing-search-api-alternative-json) compares the Bing, Brave and DuckDuckGo endpoints side by side, so this article doesn't repeat it. For Google results instead, see the [Google Search API guide](https://perceptlayer.com/blog/google-search-api-json). ## What does a DuckDuckGo query cost? Each successful query costs 1 credit; failed calls cost nothing and return `X-Credits-Used: 0`. Every success returns `X-Credits-Used` and `X-Credits-Remaining`, so you can watch the balance from the response headers. The [credits docs](https://docs.perceptlayer.com/credits) explain how billing works. | Job | Calls | Credits | | --- | --- | --- | | One query, first page | 1 | 1 | | One query, three pages | 3 | 3 | | 100 keywords daily, first page, 30 days | 3,000 | 3,000 | | An agent answering 500 questions, 2 searches each | 1,000 | 1,000 | The 100 free credits you get on signup after verifying an email address cover 100 queries, once. Daily tracking of 100 keywords, 3,000 credits a month, needs a pack: a Starter pack of 10,000 credits covers three months and a bit, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Free accounts run at 1 request a second; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list paid rates. ## Can an AI agent use DuckDuckGo search? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints` and `get_endpoint`, which are free catalogue lookups, and `call_endpoint`, which runs `/v1/duckduckgo/search` with the agent's query and spends 1 credit on success. The result comes back as JSON, so the agent reads titles, links and snippets instead of a page of HTML. Two habits keep an agent's searches useful. Pass `kl` so results match the user's region. And for time-sensitive questions, add `df=d` or `df=w` so stale pages drop out. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents); errors return an HTTP status and a JSON `code`, listed in the [errors docs](https://docs.perceptlayer.com/errors). For a pattern that checks agent answers against search results, see [grounding LLM answers with live search](https://perceptlayer.com/blog/ground-agent-answers-live-search). To try a query, [get a free API key](https://perceptlayer.com/signup) and run it in the playground on the [DuckDuckGo API page](https://perceptlayer.com/apis/duckduckgo). ## APIs in this post - [DuckDuckGo **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/duckduckgo) ## Frequently asked questions ### Is the DuckDuckGo Instant Answer API a search API? No. It returns Instant Answers, such as an abstract, a definition or related topics, mostly for well-known entities; specific queries often come back with empty fields. It has no ranked web results or paging. For organic results as JSON, `GET /v1/duckduckgo/search` returns positions, titles, links and snippets at 1 credit per query. ### How much does the DuckDuckGo search endpoint cost? 1 credit per successful query, and failed calls cost nothing. Each further page is another call. Every account gets 100 free credits after verifying an email address, so your first 100 first-page queries cost no money. Prepaid packs start at 10,000 credits; the [pricing page](https://perceptlayer.com/pricing) has what they cost. ### How do I get the second page of results? Read `pagination.next_start` from the response and send it as `start`. In the recorded first page, `next_start` is 10, so page two is the same request with `start=10`. Keep going while `has_more` is true. Each page costs 1 credit. ### Can I filter DuckDuckGo results by date or region? Yes. `df` takes `d`, `w`, `m` or `y` for the past day, week, month or year, and `kl` takes a region and language code such as `us-en`. `safe` turns safe search on or off. Check `search_parameters` in the response to confirm what was applied. ### What happens if a query fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`, and nothing is debited. A missing `q` returns `invalid_parameters` (422). Rate-limited (429) and temporarily unavailable (503) responses include `Retry-After` with the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. duckduckgo search api serp web search json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Aug 2026 Perceptlayer 8 min read ## [Bing Search API Alternative: Web Results as JSON](https://perceptlayer.com/blog/bing-search-api-alternative-json) Replace Microsoft's retired Bing Search API with three search endpoints at 1 credit per call. Parameters compared, real responses, and where results differ. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Aug 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Brave Search API: Official Plans or One Multi-Source Key](https://perceptlayer.com/blog/brave-search-api-results-json) Brave's official Search API has freshness, country and Goggles filters. When it fits, and when one key for Brave, Google and Bing at 1 credit a query wins. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Aug 2026 Perceptlayer 7 min read ## [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json) Call GET /v1/google-search/search for organic results as JSON at 1 credit a call. Parameters, a real recorded response and the cost in credits. --- title: "Used Car Listing Data: Fields for Price Analysis" description: "Which fields a used-car price model needs (mileage, year, trim, seller type, days listed) and how AutoScout24, CarGurus and AutoTrader UK return them." url: https://perceptlayer.com/blog/used-car-listing-data-price-analysis --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Used Car Listing Data: Fields for Price Analysis 21 Aug 2026 Perceptlayer 7 min read A used-car price model needs a target and six candidate features from every listing. The target is the advertised price. The features are mileage, first-registration year, make with model and trim, power or engine, seller type (dealer or private) and how long the car has been listed. The AutoScout24, CarGurus and AutoTrader UK search endpoints return most of these as named JSON fields. None returns all of them in the same shape, so the real work is normalising them. ## Key takeaways - Price is the target. Mileage, year, trim, power and seller type are the candidate features; `days_on_market` (CarGurus) is the only listing-age field in the recorded search responses. - AutoScout24 reports mileage as `mileage.value_km`, CarGurus as `mileage.value` with a `MILES` unit, and the recorded AutoTrader UK search results carry no mileage at all. - Prices come in three currencies ( `EUR`, `USD`, `GBP`). Don't compare them without converting. The recorded responses have a single price field and no sale-price field. - Each marketplace returns its own deal-rating field ( `evaluation`, `rating`, `price_indicator`) with its own values, so use them as features inside one market, never across markets. - Pulling the 193 BMW 316 listings matching `market=de`, `model_id=1639` and EUR 5,000 to 20,000 in the recorded AutoScout24 search takes 10 calls at 1 credit each: 10 credits. ## Which listing fields matter for a used-car price model? The advertised price is the target. The candidate features are mileage, first-registration year, make-model-trim, power or engine, seller type and listing age. Treat listing age as a feature to test rather than assume; your own data will show whether it carries signal. Everything else (colour, photo count, dealer name) is secondary until those six are clean. The table maps the target and those features to what each endpoint returned in the recorded responses. | Feature | AutoScout24 `search` | CarGurus `search` | AutoTrader UK `search` | | --- | --- | --- | --- | | Price | `price.amount`, `price.currency` ( `EUR`) | `price.amount`, `price.currency` ( `USD`) | `price.amount`, `price.currency` ( `GBP`) | | Mileage | `mileage.value_km` | `mileage.value`, `mileage.unit` ( `MILES`) | not in the recorded excerpt | | Year | `first_registration.year`, `.month` | `year` | `tracking_context.year` | | Make, model | `make`, `model`, `model_group` | `make`, `model`, `make_id`, `model_id` | `title`, `tracking_context.make`, `.model` | | Trim | `motor_type` (engine designation); `variant` is the body variant | `trim` | `sub_title` (free text) | | Power | `power.kw`, `power.ps` | `power` (hp), `engine` | no power field in the recorded search record | | Seller type | `seller.type` ( `Dealer`, `PrivateSeller`) | `seller_type` ( `DEALER`) | `seller_type` ( `PRIVATE`) | | Listing age | not in the recorded excerpt | `days_on_market` | not in the recorded excerpt | | Identifier | `listing_id` | `listing_id`, `vin` | `advert_id` | Blank cells in this table mean the field wasn't in the recorded search response. Each marketplace also has a single-listing endpoint ( `listing` with `listing_id` on [AutoScout24](https://perceptlayer.com/apis/autoscout24/listing), `advert_id` on [AutoTrader UK](https://perceptlayer.com/apis/autotrader-uk/listing)). Run one in the playground on the API page to see what the detail view adds before you build around a gap. ## How do you pull comparable listings from AutoScout24? Call `GET /v1/autoscout24/search` with a make, a model and a price band, and page through the results. The endpoint filters on `make_id`, `model_id`, `registration_year_min`, `registration_year_max`, `mileage_min`, `mileage_max` and `seller_type`, so you can cut the sample to the cars you want to compare before any code runs. Each call costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/autoscout24/search?market=de&make_id=13&model_id=1639&price_min=5000&price_max=20000&sort=price&page=2&limit=20" \ -H "X-API-Key: $API_KEY" ``` The `make_id` and `model_id` values come from the [taxonomy endpoint](https://perceptlayer.com/apis/autoscout24/taxonomy) ( `include[]=makes`, `include[]=models`). Here is an excerpt of the recorded response, trimmed: ```json { "price": { "amount": 5800, "currency": "EUR", "evaluation": 1, "is_evaluation_enabled": true }, "mileage": { "value_km": 177000, "unit": "km" }, "first_registration": { "raw": "01/2012", "year": 2012, "month": 1 }, "power": { "kw": 85, "ps": 116 }, "make": "BMW", "model_group": "3er", "variant": "Limousine", "motor_type": "316d", "seller": { "id": "…", "type": "PrivateSeller" }, … } ``` That one record already carries price, mileage, year and month, power, body variant, engine designation and seller type. The pagination block in the same response reports `total: 193` across `total_pages: 10` at `limit: 20`, so the whole sample is 10 calls: 10 × 1 credit = 10 credits. The [pagination guide](https://perceptlayer.com/blog/paginate-web-data-api-python) covers safe page loops. ## What do CarGurus and AutoTrader UK return instead? CarGurus returns the richest record for pricing work in the recorded sample: a VIN, a `trim`, a drivetrain, `days_on_market` and a `seller_type`. AutoTrader UK returns a clean price and year but keeps trim inside a text string. Both are single calls per page at 1 credit, so the difference is in the fields, not the cost. ```bash curl "https://api.perceptlayer.com/v1/cargurus/search?make_model_trim_paths=m26%2Fd126&distance=50000&sort=best_match" \ -H "X-API-Key: $API_KEY" ``` From the recorded CarGurus response: ```json { "listing_title": "1996 GMC Suburban", "vin": "…", "year": 1996, "trim": "K1500 4WD", "price": { "amount": 7995, "currency": "USD", "rating": "NA" }, "mileage": { "value": 175456, "unit": "MILES" }, "days_on_market": 14, "seller_type": "DEALER", … } ``` The [CarGurus search endpoint](https://perceptlayer.com/apis/cargurus/search) takes `make_model_trim_paths` ( `m26/d126` above is a make and model path), `price_min`, `price_max`, `distance`, `sort` and `page`. You can sort by `date` or `deal_score` as well as `price` and `mileage`. The [makes](https://perceptlayer.com/apis/cargurus/makes) and [models](https://perceptlayer.com/apis/cargurus/models) endpoints list the IDs. The [AutoTrader UK search endpoint](https://perceptlayer.com/apis/autotrader-uk/search) requires a `postcode` and filters on `min_mileage`, `max_mileage`, `min_year_manufactured`, `max_year_manufactured` and `seller_type` ( `private` or `trade`). The recorded excerpt looks like this: ```json { "title": "BMW 5 Series", "sub_title": "2.0 518d SE Euro 6 (s/s) 4dr", "price": { "amount": 2200, "currency": "GBP" }, "seller_type": "PRIVATE", "tracking_context": { "make": "BMW", "model": "5 Series", "year": 2014, "price_indicator": "NOANALYSIS" }, … } ``` Mileage isn't in that excerpt. You can still get at it: filter with `min_mileage` and `max_mileage` to build mileage bands, or sort by `mileage`. Set `price_search_type=total` so you collect full prices rather than monthly finance figures. ## Where does cross-market comparison break down? It breaks in five places: currency, mileage units, trim vocabulary, seller-type labels and the marketplace's own deal rating. Each is a mechanical fix, but only if you handle it before pooling the data. Skip any one and a "UK cars are cheaper" result may just be pounds against euros. - **Currency and units.** Prices arrive as `EUR`, `USD` and `GBP`. CarGurus mileage is in miles, AutoScout24 in kilometres. Convert mileage to one unit, and model each market's price in its own currency until you've chosen an exchange-rate source and date. - **Trim.** CarGurus gives `trim` as a field. AutoScout24 has no trim field in the recorded record: `variant` is a body variant ( `Touring`, `Limousine`) and `motor_type` the engine designation. AutoTrader UK embeds trim wording in `sub_title`. Matching "the same car" across markets means parsing, and some parsing will fail. - **Seller type.** `Dealer` or `PrivateSeller` on AutoScout24, `DEALER` on CarGurus, `PRIVATE` on AutoTrader UK. Map them to one vocabulary. Keep the flag as a feature and let your data show whether it matters. - **Deal ratings.** AutoScout24 has `price.evaluation`, CarGurus `price.rating`, AutoTrader UK `price_indicator`. They are separate fields with different values ( `1` and `2`, `NA`, `NOANALYSIS` in the recorded responses), and the responses don't say how each is computed. Don't pool them, and don't use one as your target if you're predicting price. - **Localised text.** The recorded AutoScout24 `transmission` value is `Schaltgetriebe`, not "manual". Filter with the coded values from the taxonomy endpoint and normalise display text yourself. One caveat applies everywhere: the price in each record is the advertised price as found at the time of the call. The recorded responses carry no sale-price field, and a negotiated sale can land away from the ask. If you need mileage you can trust, official records beat adverts: in the UK, the [GOV.UK MOT history service](https://www.gov.uk/check-mot-history) shows the mileage recorded at each test. For decoding a CarGurus `vin` into factory specs, the [NHTSA vPIC API](https://vpic.nhtsa.dot.gov/api/) decodes a VIN into key-value pairs. ## How do you normalise three marketplaces into one table? Write one small mapper per marketplace that outputs the same keys, and keep the currency as a column. The script below fetches one page from each source and prints a pooled table; the AutoTrader UK mileage stays `None` because the search record doesn't carry it. ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} KM_PER_MILE = 1.609344 def listings(path, **params): r = requests.get(BASE + path, headers=HEADERS, params=params, timeout=30) r.raise_for_status() return r.json()["data"]["listings"] def from_autoscout24(l): return { "source": "autoscout24", "currency": l["price"]["currency"], "price": l["price"]["amount"], "km": (l.get("mileage") or {}).get("value_km"), "year": (l.get("first_registration") or {}).get("year"), "trim": f'{l.get("variant", "")} {l.get("motor_type", "")}'.strip(), "seller": "dealer" if l["seller"]["type"] == "Dealer" else "private", "days_listed": None, } def from_cargurus(l): m = l.get("mileage") or {} km = m["value"] * KM_PER_MILE if m.get("unit") == "MILES" else None return { "source": "cargurus", "currency": l["price"]["currency"], "price": l["price"]["amount"], "km": km, "year": l.get("year"), "trim": l.get("trim"), "seller": l["seller_type"].lower(), "days_listed": l.get("days_on_market"), } def from_autotrader_uk(l): return { "source": "autotrader-uk", "currency": l["price"]["currency"], "price": l["price"]["amount"], "km": None, "year": (l.get("tracking_context") or {}).get("year"), "trim": l.get("sub_title"), "seller": l["seller_type"].lower(), "days_listed": None, } rows = [ *map(from_autoscout24, listings("/v1/autoscout24/search", market="de", make_id=13, model_id=1639, limit=20)), *map(from_cargurus, listings("/v1/cargurus/search", make_model_trim_paths="m26/d126", distance=50000)), *map(from_autotrader_uk, listings("/v1/autotrader-uk/search", postcode="SW1A1AA", price_search_type="total", make="BMW")), ] for row in rows: print(row) ``` That's 3 calls × 1 credit = 3 credits. Add `page` loops to build a real sample, and keep a `collected_at` timestamp on each row so repeat pulls become a price history. ## What does a monthly price snapshot cost? A repeatable snapshot is the pages in your sample times the number of pulls. Using the recorded AutoScout24 search, 193 listings at 20 per page is 10 calls. Pulled weekly for a year, that's 52 × 10 = 520 credits. The free tier's 100 credits on signup cover the first 10 weekly pulls; the rest of the year needs a pack. Failed calls cost nothing. Add a second marketplace and the arithmetic stays visible: 10 pages from each of three sources is 30 credits per snapshot. Credits come in prepaid packs that last 12 months; the [pricing page](https://perceptlayer.com/pricing) has what credits cost, and [credits in the docs](https://docs.perceptlayer.com/credits) explains debits. If a snapshot job runs unattended, read the [rate limit headers](https://docs.perceptlayer.com/rate-limits) and wait on a 429 for the `Retry-After` seconds. Next step: [get a free API key](https://perceptlayer.com/signup), run the AutoScout24 call above in the playground on its [API page](https://perceptlayer.com/apis/autoscout24), and check which fields come back for the make you care about. For the same field-by-field approach on property data, see [real estate listing data for valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields). ## APIs in this post - [AutoScout24 **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/autoscout24) - [CarGurus **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/cargurus) - [AutoTrader UK **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/autotrader-uk) ## Frequently asked questions ### Which field matters most for predicting a used car's price? Mileage and first-registration year are the first features to test, alongside make, model and trim; your own data will show their weights. In the recorded AutoScout24 results, a 316d Touring from a dealer (215,000 km, first registered 06/2013) asks EUR 5,700, while a 316d Limousine from a private seller (177,000 km, 01/2012) asks EUR 5,800. A 38,000 km gap moved the ask by only EUR 100 because body, seller and age differ too, which is why you test fields together. ### Do these endpoints return the price a car actually sold for? Not in the recorded responses. Each has one price field, `price.amount`, with no separate sale-price field, and data is returned as found at the time of the call. Treat listing data as a view of advertised levels, and confirm any sale-price need in the playground before you build around it. ### How do I get listing age for AutoScout24 or AutoTrader UK? The recorded search responses for those two don't include a listing-age field; CarGurus returns `days_on_market`. For the others you can sort by `age` (AutoScout24) or `most_recent` (AutoTrader UK) to order by recency, or record the first date you see each `listing_id` or `advert_id` in repeated pulls and compute age yourself. ### Can I cover several countries with one key? Yes. One key works across the whole catalogue, including these three marketplaces. AutoScout24 takes a `market` parameter with values `de`, `at`, `be`, `it`, `fr`, `nl`, `es`, `com` and `pl`. Each call costs 1 credit. Keep the currency and mileage unit per row, since they differ by market. ### What happens if a call fails? A failed call costs nothing and returns `X-Credits-Used: 0`. Errors come back as an HTTP status with a JSON body holding `code`, `message` and `request_id`, such as `rate_limited` (429) or `invalid_parameters` (422). A client timeout is the exception: the request may have succeeded and been billed. The [errors docs](https://docs.perceptlayer.com/errors) list every code. used cars car listings price analysis autoscout24 cargurus autotrader uk ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [AutoScout24 API: Search European Car Listings as JSON](https://perceptlayer.com/blog/autoscout24-api-car-listings-json) Search AutoScout24 listings as JSON: make\_id and price filters, a recorded BMW response, and what a monthly price sweep costs in credits. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. --- title: "Google Events API: Find Local Events as JSON | Perceptlayer" description: "Search Google Events as JSON with one GET: q, hl, gl, location and start parameters, a recorded London response, and 1 credit per call." url: https://perceptlayer.com/blog/google-events-api-local-events --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Events API: Find Local Events as JSON 19 Aug 2026 Updated 6 Nov 2026 Perceptlayer 8 min read Send a `GET` to `/v1/google-events/search` with a query such as `concerts in austin`, and you get Google's event listings back as JSON: title, date, address, venue, ticket links and a thumbnail. The call costs 1 credit, and a failed call costs nothing. This guide covers the parameters, a recorded response, an honest look at the date and location filters, and a small script that builds a city events feed. ## Key takeaways - The [Google Events API](https://perceptlayer.com/apis/google-events) has two endpoints: `GET /v1/google-events/search`, covered here, and `details`, which takes an `event_token`. For search, only `q` is required; `hl`, `gl`, `location`, `uule`, `htichips` and `start` are optional. - Each successful call costs 1 credit. A 50-city feed that runs three queries per city costs 150 credits per refresh. - There is no date parameter you can rely on. Put the timeframe in `q` ("this weekend"), then filter on `date.start_time`, which is in UTC. - Location comes from the wording of `q`, `location`, `uule` and `gl`. Treat them as hints and check `address` in the results. - Free accounts get 100 credits on signup, so you can build and test a feed before buying anything. ## What does the Google Events API return? The endpoint returns the event cards Google shows for a search such as "events in london this weekend", as structured JSON. Each item in `events_results` has a `position`, `title`, a `date` object, an `address` array, a `link`, a `venue` object, `ticket_info` entries and a `thumbnail`. The response also echoes your inputs in `search_parameters` and includes a `pagination` object. That makes it a fit for city guides, "what's on" widgets, newsletters and agents that answer "what can I do this weekend". It isn't a catalogue of every event in a city. You get what Google ranks for the query you send, and the data is collected from publicly available sources and returned as found at the time of the call. If you need ticketing, inventory or on-sale data from a single organiser, that organiser's own API usually fits better. Ticketmaster, for example, publishes its own [Discovery API](https://developer.ticketmaster.com/products-and-docs/apis/discovery-api/v2/) for its events. For breadth across venues and organisers in one query, a search-based endpoint is the more practical route. ## How do you make your first request? Send the key in the `X-API-Key` header and put the search in `q`. Keys start with `sk_live_`, and you get one free by [signing up](https://perceptlayer.com/signup) and verifying an email address. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the `api_key` query parameter for places where headers aren't possible. ```bash curl "https://api.perceptlayer.com/v1/google-events/search?q=concerts+in+austin&hl=en&gl=us" \ -H "X-API-Key: $API_KEY" ``` Every successful response carries `X-Credits-Used` and `X-Credits-Remaining` headers, so you can check what the call cost without parsing the body. You can also run the same call from the playground on the [Google Events search endpoint page](https://perceptlayer.com/apis/google-events/search) before writing any code. ## Which parameters does the search endpoint take? The endpoint takes one required parameter, `q`, and six optional ones. Types and length limits are the only documented constraints, so the table sticks to those and adds notes on how each one is meant to be used. | Parameter | Type | Required | Limit | Notes | | --- | --- | --- | --- | --- | | `q` | string | yes | 255 characters | The search text, such as `events in london this weekend`. | | `hl` | string | no | none documented | Interface language, for example `en`. | | `gl` | string | no | 2 characters | Country code, for example `us`. | | `location` | string | no | 255 characters | A place name to anchor the search. | | `uule` | string | no | 500 characters | Google's encoded location value, for when you already have one. | | `htichips` | string | no | 200 characters | A filter chip value. Allowed values aren't documented here. | | `start` | integer | no | none documented | Result offset, for paging. | Defaults and page sizes aren't documented, so don't hard-code either. Read `events_results` and `pagination` in the response instead. Invalid input returns `invalid_parameters` (422), for example a `q` over 255 characters. The [errors docs](https://docs.perceptlayer.com/errors) list every code, and since a failed call costs nothing, a bad request is only a lost minute. ## What does a real response look like? Here is a recorded response for `q=events in london this weekend` with `hl=en` and `gl=uk`. The excerpt is trimmed with `…` and shows the first event only. ```bash curl "https://api.perceptlayer.com/v1/google-events/search?q=events+in+london+this+weekend&hl=en&gl=uk" \ -H "X-API-Key: $API_KEY" ``` ```json { "search_parameters": { "engine": "google_events", "q": "events in london this weekend", "gl": "uk", "hl": "en", "start": 0 }, "search_information": { "events_results_state": "Results for exact spelling" }, "events_results": [ { "position": 1, "title": "Halloween River Cruise", "date": { "when": "Sat, 24 Oct 2026, 19:00", "start_time": "2026-10-24T18:00:00Z", "end_time": "2026-10-24T19:00:00Z" }, "address": [ "Riverside Building, London Eye, County Hall, Westminster Bridge Rd, London SE1 7PB" ], "description": "A 60-minute London Eye River Cruise along the Thames with live actors telling ghost stories of Jack the Ripper, the ghost of Captain Kidd and the haunted cries …", "ticket_info": [ { "source": "Mato Events", "link": "https://ma.to/event/london-eye-halloween-river-cruise-2026-10-24", "link_type": "tickets" }, { "source": "londoneye.com", "link": "https://www.londoneye.com/", "link_type": "more info" } ], "venue": { "name": "London Eye", "rating": 4.5, "reviews": 206031, "link": "https://www.google.com/search?q=London+Eye&ludocid=4796882358840715922" }, "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSIyGJkdedlIlKt-RDN0ud-FP177CCvK_cM-VDPtGilIsEngLzXTMXfTGmHpgIvc6S0f3hXZaJaUcgcI3w" } ], "pagination": { "current_page": 1, "start": 0 } } ``` A few details in the recording matter when you build on it: - `date.when` is display text in local time ("Sat, 24 Oct 2026, 19:00"), while `start_time` is UTC. The 19:00 event has a `start_time` of `18:00:00Z` because London was on summer time that day. - The second event in the recording, a ghost walk, has `when` set to "Sun, 25 Oct 2026" with no clock time. Its `start_time` and `end_time` are both `2026-10-24T23:00:00Z`. Date-only events can have identical start and end times, so don't treat the pair as a duration. - `description` is cut off with an ellipsis and the same event shows `?` where the source text had other characters. Show it as a teaser, and link to the event instead of republishing it. - `ticket_info` mixes `tickets` and `more info` links, distinguished by `link_type`. ## How reliable are the date and location filters? There is no `date` or `from`/ `to` parameter. The timeframe lives in the wording of `q` ("tonight", "this weekend", "in november") and possibly in `htichips`, whose accepted values aren't documented here. Both steer Google's ranking. Neither guarantees every result falls inside your window, so filter again on your side. The recorded call above is a fair example: it asked for "this weekend" and the events it holds fall on 24 and 25 October 2026. That is what you'd hope for, but it comes from Google's interpretation of the phrase, and "weekend" depends on the day you run the query. Location works the same way: - **In `q`**: "concerts in austin" carries the city in the text, as in the first example. - **`location`**: a free-text place name up to 255 characters, for when you'd rather keep the city out of the query. - **`uule`**: Google's encoded location string, useful if you already generate them. - **`gl`**: a two-character country bias. The recorded call used `gl=uk`, and it returned London events. Google's own code for the United Kingdom is usually `gb`, and we haven't documented the accepted `gl` values, so try `gb` if `uk` doesn't bias results the way you expect. Compare `address` against the city you asked for and drop mismatches. Run a few queries in the playground before choosing between `location` and a city in `q`, because we haven't documented which wins when they disagree. ## How do you build a city events feed? A city feed is a handful of query phrasings per city, a page or two of each, merged and deduplicated, then filtered to a time window. The script below does that with `requests`. It pages by advancing `start` by the number of events it just received, which assumes `start` is a plain offset. Confirm that in the playground before relying on it. ```python import os import time from datetime import datetime, timedelta, timezone from zoneinfo import ZoneInfo import requests URL = "https://api.perceptlayer.com/v1/google-events/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def fetch(q, gl, start=0): for _ in range(3): r = requests.get( URL, params={"q": q, "hl": "en", "gl": gl, "start": start}, headers=HEADERS, timeout=30, ) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json() raise RuntimeError(f"gave up on {q!r}") def city_feed(city, gl, tz, days=7, pages=2): phrasings = [f"events in {city} this weekend", f"concerts in {city}", f"things to do in {city}"] now = datetime.now(timezone.utc) cutoff = now + timedelta(days=days) seen = {} for q in phrasings: start = 0 for _ in range(pages): events = fetch(q, gl, start).get("events_results", []) if not events: break for e in events: when = e.get("date", {}).get("start_time") if not when: continue begins = datetime.fromisoformat(when.replace("Z", "+00:00")) if not now <= begins <= cutoff: continue key = (e["title"].lower(), when, e.get("venue", {}).get("name")) seen.setdefault(key, { "title": e["title"], "starts_local": begins.astimezone(ZoneInfo(tz)).isoformat(), "venue": e.get("venue", {}).get("name"), "address": ", ".join(e.get("address", [])), "tickets": [t["link"] for t in e.get("ticket_info", []) if t.get("link_type") == "tickets"], }) start += len(events) return sorted(seen.values(), key=lambda e: e["starts_local"]) if __name__ == "__main__": for event in city_feed("london", "uk", "Europe/London"): print(event["starts_local"], event["title"], "-", event["venue"]) ``` Three details in that script come straight from the recorded response. It filters on `start_time` because that field is machine-readable UTC. It converts to the city's time zone for display. And it deduplicates on title, start time and venue, because the same event can surface under more than one query. The same idea at larger scale is in [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources). The script retries `429` and `503` after the `Retry-After` seconds. One caution: requests have no idempotency key, so a call that timed out on your side may still have succeeded and been billed. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the per-minute counts, and free accounts get 1 request a second. ## What does an events feed cost per refresh? Every successful call costs 1 credit, so a refresh costs queries × pages × cities, in credits. Failed calls cost nothing and return `X-Credits-Used: 0`. The script above runs 3 phrasings with up to 2 pages each, so one city costs at most 6 credits per refresh. | Setup | Calls | Credits | | --- | --- | --- | | 1 city, 3 phrasings, 2 pages | 6 | 6 | | 50 cities, 3 phrasings, 1 page | 150 | 150 | | 50 cities, 3 phrasings, 2 pages, daily for 30 days | 9,000 | 9,000 | The last row is 50 × 3 × 2 = 300 calls a day, and 300 calls × 30 days × 1 credit = 9,000 credits. That fits inside the Starter pack's 10,000 credits, and purchased credits last 12 months. The 100 free credits on signup don't cover a day of that feed, but they cover a full test of 16 cities at 6 credits each. See [pricing](https://perceptlayer.com/pricing) for what credits cost and [how credits are counted](https://docs.perceptlayer.com/credits) for the details. Cutting cost is mostly a question of calls you don't make. Most event lists don't change by the hour, so a daily or twice-daily refresh is enough for a guide or a newsletter. If you need to schedule the pulls, [cron, queues or workflows](https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue) compares the options. ## When should you use this instead of another source? Use the endpoint when you want what people see in a Google events search, across many venues, without scraping it yourself. Use your own pipeline, or an organiser's API, when you need complete inventory for one venue or one ticketing platform. The endpoint returns ranked search results, not a database of everything on sale. If you publish events on your own site, Google documents how to mark them up in its [event structured data guide](https://developers.google.com/search/docs/appearance/structured-data/event). That is the reverse direction: it helps your events appear in Google, while this endpoint reads what Google shows. Both are useful if you run a venue and also want to track what's listed around you. For agents, the same endpoint is available through the MCP server, so an assistant can answer "what's on in Lisbon on Saturday" with a live call. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show how to add it. For related Google endpoints, [Google Hotels](https://perceptlayer.com/blog/google-hotels-api) pairs naturally with an events feed for trip planning, and the [Google Places alternative](https://perceptlayer.com/blog/google-maps-places-api-alternative) covers venue data. Your next step: [get a free API key](https://perceptlayer.com/signup), then run `concerts in austin` from the playground on the [Google Events search page](https://perceptlayer.com/apis/google-events/search) and compare the `address` fields with the city you asked for. ## APIs in this post - [Google Events **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/google-events) ## Frequently asked questions ### How much does a Google Events API call cost? A successful call to `/v1/google-events/search` costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. Free accounts get 100 credits after verifying an email address, with no credit card. That's 100 calls before you buy anything. The [pricing page](https://perceptlayer.com/pricing) shows what credit packs cost. ### Can I filter Google events by date? There's no date parameter. Put the timeframe in `q`, such as "this weekend" or "tonight", and then filter the results on `date.start_time`, which is in UTC. `htichips` also accepts a filter string, but its allowed values aren't documented, so test any value in the playground first. ### How do I get events for a specific city? Include the city in `q`, as in `concerts in austin`, or pass a place name in `location`. You can also add `gl` for the country. Then check each result's `address` array against your city, because these inputs steer the ranking and don't guarantee that every result matches. ### What happens when I hit the rate limit? You get a `429` response with a `Retry-After` header giving the seconds to wait. Free accounts get 1 request a second, and paid accounts run at the rate of the credits they're using, at least 5 a second. Wait the stated time and retry. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) have the details. ### Is there a way to call it from an AI agent? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing. `call_endpoint` runs the Google Events search and spends 1 credit on success. See the [AI agents docs](https://docs.perceptlayer.com/ai-agents). google events local events events api search json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Sept 2026 Updated 22 Oct 2026 Perceptlayer 7 min read ## [Google News API: Search News Articles as JSON](https://perceptlayer.com/blog/google-news-api) One GET call to /v1/google-news/news returns articles with title, link, source and ISO date as JSON for 1 credit. Parameters, a real response, cost. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Sept 2026 Perceptlayer 6 min read ## [Google Patents API: Search Patents and Get Details](https://perceptlayer.com/blog/google-patents-api-search-details) Search Google Patents by keyword, inventor or assignee with one GET call, then fetch full details by patent\_id. Both endpoints cost 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Aug 2026 Updated 26 Oct 2026 Perceptlayer 6 min read ## [Yelp Reviews API: Business Search and Reviews as JSON](https://perceptlayer.com/blog/yelp-reviews-api-json) Three Yelp endpoints return search results, business details and reviews as JSON, 1 credit per call. Parameters, a real response and a cost example. --- title: "Google Flights API: Fares, Date Ranges and Airports" description: "Get Google Flights fares as JSON: one-way, round-trip and date-range calls, a recorded JFK to LAX response, and the credit cost of a daily fare check." url: https://perceptlayer.com/blog/google-flights-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Flights API: Fares, Date Ranges and Airports 19 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read Google retired its flight-fare API, QPX Express, in 2018, so to get Google Flights fares in code you call an API that returns them as JSON, as found at the time of the call. Perceptlayer's Google Flights API has nine endpoints: one-way, round-trip, date-range, calendar, deals, booking details, airports, airlines and autocomplete. Each successful call costs 1 credit, failed calls cost nothing, and every account gets 100 free credits on signup. One limit up front: we recorded a response only for `one-way`. That is the only response shown in this article. For the other endpoints we list the parameters and link their pages, where the playground runs a real call. ## Key takeaways - Google shut down its QPX Express flights API in April 2018. The Google Flights API here offers 9 endpoints for fares as JSON. - `GET /v1/google-flights/one-way` needs only `origin`, `destination` and `departure_date`. It returns itineraries with `price`, `stops`, `legs` and `emissions`. - `round-trip` adds `return_date`, and `date-range` takes `from_date` and `to_date` instead of a single date. - Every endpoint costs 1 credit per successful call. A daily check of one route is 30 credits a month, so the 100 free credits on signup cover the first 3 months. - Each flight carries a `booking_token` you can pass to `booking-details`. ## Is there an official Google Flights API? No public one. Google's own flight-fare API was QPX Express, and Google said in 2017 that it would shut off access on April 10, 2018 ( [Engadget](https://www.engadget.com/2017-11-01-google-flight-data-api-shutdown.html), 2017). The Points Guy quotes a Google spokesperson giving the reason as low interest among its travel partners ( [The Points Guy](https://thepointsguy.com/2017/11/google-stop-flight-data-travel), 2017). Engadget adds that Google kept a separate enterprise QPX offering. What exists today is partner-only. Google's [Flights Search developer page](https://developers.google.com/travel/flights) (2026) describes onboarding for airlines and online travel agencies, and says its materials are shared under NDA with select, invite-only partners. It describes Google Flights as a metasearch engine that links out to those partners. That is a feed for companies selling tickets, not a self-serve fare API for developers. If you want Google Flights fares in code, you need another route. That leaves two options: build and maintain a scraper for the Google Flights page, or call an API that returns the page's fares as JSON. If you only need a few lookups, the website is fine. If you need fares in a script, an agent or a dashboard, the endpoints below are the shorter path. For the maintenance side of that trade-off, see [what maintaining a scraper really involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost). ## Which endpoints does the Google Flights API have? The [Google Flights API](https://perceptlayer.com/apis/google-flights) has 9 endpoints, all `GET`, all 1 credit per successful call. Three are search endpoints (one-way, round-trip, date-range), two are `calendar` and `deals`, one takes a booking token from a search, and three are lookups for airports, airlines and place names. They sit under the [Travel](https://perceptlayer.com/verticals/travel) area of the catalogue. | Endpoint | Returns | Required parameters | | --- | --- | --- | | [`/v1/google-flights/one-way`](https://perceptlayer.com/apis/google-flights/one-way) | One Way | `origin`, `destination`, `departure_date` | | [`/v1/google-flights/round-trip`](https://perceptlayer.com/apis/google-flights/round-trip) | Round Trip | `origin`, `destination`, `departure_date`, `return_date` | | [`/v1/google-flights/date-range`](https://perceptlayer.com/apis/google-flights/date-range) | Date Range | `origin`, `destination`, `from_date`, `to_date` | | [`/v1/google-flights/booking-details`](https://perceptlayer.com/apis/google-flights/booking-details) | Booking Details | `booking_token`, `origin`, `destination`, `departure_date`, `airline`, `flight_number` | | [`/v1/google-flights/airports`](https://perceptlayer.com/apis/google-flights/airports) | Airports | none | | [`/v1/google-flights/airlines`](https://perceptlayer.com/apis/google-flights/airlines) | Airlines | none | | [`/v1/google-flights/autocomplete`](https://perceptlayer.com/apis/google-flights/autocomplete) | Autocomplete | `q` | You can try any of them in the playground on the API page before writing code. ## How do you search one-way fares? Send `origin`, `destination` and `departure_date` to `GET /v1/google-flights/one-way` with your key in the `X-API-Key` header. The response lists flights with a price, stop count, airline and per-leg times. This call asks for JFK to LAX on 15 December 2026: ```bash curl "https://api.perceptlayer.com/v1/google-flights/one-way?origin=JFK&destination=LAX&departure_date=2026-12-15" \ -H "X-API-Key: $API_KEY" ``` You don't have a key yet? [Get a free API key](https://perceptlayer.com/signup); the [quick start](https://docs.perceptlayer.com/quickstart) covers the first call and [authentication](https://docs.perceptlayer.com/authentication) covers the header. Here is an excerpt of the recorded response, trimmed with `…`: ```json { "flights": [ { "price": 179, "currency": "USD", "total_duration_minutes": 384, "stops": 0, "airline_name": "JetBlue", "emissions": { "co2_kilograms": 426, "typical_co2_kilograms": 344, "difference_percent": 24 }, "booking_token": "CjRISVFvemhYdy1QZTBBQTR3SXdCRy0tLS0tLS0tLWVqY3J5N0FBQUFBR3JhOFJBQUFyOGdBEgZCNjIyMjMaCwiwiwEQAhoDVVNEOBxwsIsB", "legs": [ { "airline": "B6", "flight_number": "2223", "departure_airport": "JFK", "arrival_airport": "LAX", "departure_time": "2026-12-15T08:01:00", "arrival_time": "2026-12-15T11:25:00", "duration_minutes": 384 } ] }, … ], "search_metadata": { "origin": "JFK", "destination": "LAX", "departure_date": "2026-12-15", "cabin_class": "Economy", "sort_by": "Top Flights", "currency": "USD", … } } ``` The second recorded itinerary was a nonstop Delta flight, number 773, at 189 USD and 378 minutes. Its `emissions.difference_percent` was -29, against 24 for the JetBlue flight above. `search_metadata` echoes the search, including the `sort_by` and `cabin_class` it applied. ### Which one-way parameters narrow the results? The optional parameters filter and sort the list. Allowed values below are the ones the endpoint documents. | Parameter | Type | Notes | | --- | --- | --- | | `adults`, `children`, `infants_in_seat`, `infants_on_lap` | integer | Passenger counts | | `cabin_class` | string | `economy`, `premium_economy`, `business`, `first` | | `max_stops` | string | `any`, `nonstop`, `one_or_fewer`, `two_or_fewer` | | `sort_by` | string | `top_flights`, `cheapest`, `departure_time`, `arrival_time`, `duration`, `emissions` | | `airlines[]` | list of string | Airline codes, up to 2 characters each | | `max_price` | integer | Price ceiling | | `max_duration_minutes` | integer | Duration ceiling | | `exclude_basic`, `include_baggage` | boolean | Fare-type and baggage options | | `departure_time_min`, `departure_time_max`, `arrival_time_min`, `arrival_time_max` | integer | Time windows | | `currency`, `hl`, `gl` | string | Currency (up to 3 characters), language and country | For a price-first view, add `sort_by=cheapest&max_stops=nonstop`. ## How do you search round trips? Use `GET /v1/google-flights/round-trip` with the same three parameters as one-way plus `return_date`. It accepts the same passenger, cabin, stop, sort and filter parameters, plus `api_version` (documented value: 2) and `departure_token`, a string of up to 16,384 characters. ```bash curl "https://api.perceptlayer.com/v1/google-flights/round-trip?origin=JFK&destination=LAX&departure_date=2026-12-15&return_date=2026-12-22&sort_by=cheapest" \ -H "X-API-Key: $API_KEY" ``` We have no recorded `round-trip` response either, so this section stops at the request. The [Round Trip page](https://perceptlayer.com/apis/google-flights/round-trip) lists every parameter and has the playground for a real call. The call costs 1 credit, the same as one-way. ## How do you search a range of dates in one call? `GET /v1/google-flights/date-range` takes `from_date` and `to_date` along with `origin` and `destination`, in place of a single `departure_date`. An optional `trip_duration` integer is also accepted. Each successful call costs 1 credit. We have no recorded `date-range` response, so we won't describe what it returns here; the playground on its page runs a real call. The cost angle is documented, though. Covering December with `one-way` takes one call per departure date, so 31 credits. One `date-range` call over the same window is 1 credit. Whether its output fits your use is something to check in the playground before you rely on it. ```bash curl "https://api.perceptlayer.com/v1/google-flights/date-range?origin=JFK&destination=LAX&from_date=2026-12-01&to_date=2026-12-31" \ -H "X-API-Key: $API_KEY" ``` It also accepts passengers, `cabin_class`, `exclude_basic`, `max_stops`, `currency`, `outbound_times`, `bags` and `api_version`. The [Date Range page](https://perceptlayer.com/apis/google-flights/date-range) shows what a call returns when you run it in the playground. ## How do you look up airports, airlines and booking details? The lookup endpoints take little or no input. `GET /v1/google-flights/airports` and `GET /v1/google-flights/airlines` take no parameters and return the airports and airlines lists. `GET /v1/google-flights/autocomplete` takes `q` (up to 255 characters) with optional `hl` and `gl`, and takes free text; its page shows the output. ```bash curl "https://api.perceptlayer.com/v1/google-flights/airlines" \ -H "X-API-Key: $API_KEY" ``` `booking-details` is the follow-up to a search. Every flight in the one-way response carries a `booking_token`. Pass it with `origin`, `destination`, `departure_date`, `airline` (a 2-character code like `B6`) and `flight_number` (like `2223`), all of which appear in the recorded flight above. What the call returns is on the [Booking Details page](https://perceptlayer.com/apis/google-flights/booking-details). ## When does another source fit better? This API returns fares as found at the time of the call, and they may differ when you book. Treat a price as a snapshot for tracking, comparison or an agent's answer, not as a quote. If you need a bookable, ticketable fare, or you sell tickets yourself, an airline's own API or a booking-grade source is the better fit. For a handful of one-off lookups, the Google Flights website is enough. ## What does a daily fare check cost? A daily fare check costs 1 credit per route per day, because every successful call costs 1 credit. Tracking one route for 30 days is 30 × 1 = 30 credits, inside the 100 free credits you get once, on signup, after verifying an email; they cover 3 months of it. No credit card is needed. Here is the arithmetic for larger watches: | Watch (30 days) | Calls | Credits per month | Covered by | | --- | --- | --- | --- | | 1 route, one-way | 30 | 30 | free credits for the first 3 months, then a pack | | 1 route, one-way + round-trip | 60 | 60 | free credits for the first month, then a pack | | 20 routes, one call a day | 600 | 600 | free credits for the first 5 days, then a pack | | 100 routes, one call a day | 3,000 | 3,000 | free credits for the first day, then a pack | The 100-route watch is 100 routes × 30 daily calls. The 100 free credits cover the first 100 calls, one day of it. For the rest of the month you buy a Starter pack of 10,000 credits. Packs are sold whole, so 2,900 calls × 1 credit = 2,900 credits used, and the unused 7,100 credits last 12 months and cover the next two months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Failed calls return `X-Credits-Used: 0`, and each success reports `X-Credits-Remaining`. See [credits](https://docs.perceptlayer.com/credits). A minimal Python check that prints the cheapest nonstop and your balance: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/google-flights/one-way", params={ "origin": "JFK", "destination": "LAX", "departure_date": "2026-12-15", "sort_by": "cheapest", "max_stops": "nonstop", }, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) resp.raise_for_status() flights = resp.json()["flights"] best = flights[0] print(best["airline_name"], best["price"], best["currency"]) print("credits left:", resp.headers["X-Credits-Remaining"]) ``` Run it from a scheduler once a day and store the price. To avoid repeat charges on identical lookups, see [caching API responses](https://perceptlayer.com/blog/cache-web-data-api-responses). ## How do you handle errors and retries? Errors return an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. The ones you'll meet are `invalid_parameters` (422) for a bad airport code or date, `rate_limited` (429) and `temporarily_unavailable` (503), which both carry a `Retry-After` header with the seconds to wait. See [errors](https://docs.perceptlayer.com/errors) and [rate limits](https://docs.perceptlayer.com/rate-limits). Requests have no idempotency key, so a call that timed out on your side may still have succeeded and been billed. Read how to [retry without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) before you wrap these calls in a loop. For agents, the same endpoints are available through the [MCP server](https://docs.perceptlayer.com/ai-agents). Next step: run the JFK to LAX call above in the [playground](https://perceptlayer.com/apis/google-flights), then move it into a daily job. ## APIs in this post - [Google Flights **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-flights) ## Frequently asked questions ### Does Google have an official Flights API? No public one. Google's QPX Express API was announced for shutdown in 2017, with access ending on April 10, 2018 ( [Engadget](https://www.engadget.com/2017-11-01-google-flight-data-api-shutdown.html), 2017). Google's [Flights Search developer page](https://developers.google.com/travel/flights) (2026) now describes a program for airlines and online travel agencies, shared under NDA with select, invite-only partners. Perceptlayer's Google Flights API returns fares as JSON from publicly available sources, as found at the time of the call. ### How much does a Google Flights API call cost? Each successful call to any of the 9 endpoints costs 1 credit. Failed calls cost nothing. You get 100 free credits after verifying an email, with no credit card. After that, credits come in prepaid packs from 10,000 to 5,000,000 credits, so 20,000 calls × 1 credit = 20,000 credits. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Can I search a range of dates in one call? `GET /v1/google-flights/date-range` takes `origin`, `destination`, `from_date` and `to_date`, and costs 1 credit per successful call. It also accepts an optional integer `trip_duration`. Run it in the playground on the [Date Range page](https://perceptlayer.com/apis/google-flights/date-range) to see what it returns. ### Do I need an airport code or can I search by city name? The `origin` and `destination` parameters accept up to 3 characters, so send IATA airport codes such as `JFK` or `LAX`. If you only have free text, call `autocomplete` with `q` to resolve it, or use `airports` to get the full list. ### Can an AI agent call the Google Flights API? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only read the catalogue and cost nothing. `call_endpoint` runs a flights endpoint with its parameters and spends 1 credit on success. See the [MCP docs](https://docs.perceptlayer.com/ai-agents). travel flights google flights fares airports ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Sept 2026 Perceptlayer 6 min read ## [Kiwi.com API: Search Fares and Cheapest Dates as JSON](https://perceptlayer.com/blog/kiwi-flights-api-cheapest-dates) Search Kiwi.com fares by origin, destination and date, then scan a window with calendar-cheapest-dates. A recorded London–Barcelona response and costs. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Nov 2026 Perceptlayer 9 min read ## [Google Flights Scraper or API: What You Get](https://perceptlayer.com/blog/google-flights-scraper-vs-api) Compare a Google Flights scraper with 9 endpoints at 1 credit a call: a recorded JFK to LAX search with price, stops, CO2 and a booking\_token per flight. --- title: "Build an AI Property Research Agent with Live Listings" description: "A Python agent that pulls Redfin and Zillow data for one home, compares list price, Zestimate, last sale and tax value, and caps each question at 4 credits." url: https://perceptlayer.com/blog/ai-property-research-agent --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Build an AI Property Research Agent with Live Listings 17 Aug 2026 Perceptlayer 7 min read An AI real estate research tool needs two things: live listing and valuation data from more than one source, and a model that explains the numbers without inventing any. This tutorial builds one in Python. Given a Redfin property ID, it pulls the listing and valuation from Redfin and the matching Zillow listing nearby, reconciles list price, Zestimate, last sale and tax assessment, and has Claude explain the gaps. A question costs 3 credits, capped at 4. ## Key takeaways - Three calls answer one question: `GET /v1/redfin/property`, `GET /v1/redfin/valuation` and `GET /v1/zillow/search` around the home's coordinates, at 1 credit each. - Code chooses the calls and the model only explains the result, so the cost per question is fixed at 3 credits, with a hard cap of 4. - Estimates are often missing: the recorded Redfin valuation returns `sectionPreviewText: "Estimate Not Available"`, and one of two recorded Zillow listings has no `zestimate`, only a tax assessment. - Zillow and Redfin don't share IDs, so the agent matches on a normalised street address plus ZIP code, and says so when nothing matches. - The data steps were tested on recorded responses with mocked HTTP calls; the full script hasn't been run against the live API or a model. ## What does the agent do, step by step? It turns one property into a short, sourced explanation of what it's worth on paper. The plan is fixed, which keeps the cost predictable: code makes three calls, builds a facts object, and hands it to the model with instructions to use only those numbers. The model never decides which endpoints to call. 1. Fetch the home from the [Redfin Property endpoint](https://perceptlayer.com/apis/redfin/property): address, beds, baths, square feet, year built and coordinates. 2. Fetch its valuation from the [Redfin Valuation endpoint](https://perceptlayer.com/apis/redfin/valuation): list price, last sale price and date, and whether a Redfin Estimate is available. 3. Search Zillow within a quarter mile of the coordinates with the [Zillow API](https://perceptlayer.com/apis/zillow), and keep the listing whose street address and ZIP match. 4. Build the facts: every number with its source, and `null` for anything missing. 5. Ask Claude to compare the list price with each estimate that exists and to name what's missing. You need Python 3.10 or later, a Perceptlayer API key and an Anthropic API key. [Get a free API key](https://perceptlayer.com/signup); verified accounts get 100 free credits once, enough for 33 questions. Install `pip install anthropic requests` and export `PERCEPTLAYER_API_KEY` and `ANTHROPIC_API_KEY`. ## Why compare Redfin and Zillow at all? Because automated valuations disagree, and each is only as good as the data behind it. Both companies publish their own accuracy: Zillow reports a nationwide median error of about 2% for homes on the market and about 7% for off-market homes ( [Zillow](https://www.zillow.com/how-much-is-my-home-worth/), 2026), and Redfin reports similar figures for the Redfin Estimate ( [Redfin](https://www.redfin.com/redfin-estimate), 2026). A median error means half of estimates miss the sale price by more than that. Both report much smaller errors for homes on the market, where a current listing's details are available, so an estimate close to the list price on a listed home is less independent than it looks. The useful signals are elsewhere: a large gap between list price and an estimate, a last sale far below today's price, or a tax assessment out of line with both. A second source also covers the case where one has no estimate at all, which, as the recordings below show, happens. ## How do you fetch the Redfin side? Call the property and valuation endpoints with the same `property_id`, and the `listing_id` when you have one. Both are in a Redfin search result, and the `property_id` is the number at the end of a Redfin home URL, such as `/home/124182`. These are the exact requests behind the recordings used here: ```bash curl "https://api.perceptlayer.com/v1/redfin/property?property_id=124182&listing_id=224635828" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/redfin/valuation?property_id=124182&listing_id=224635828" \ -H "X-API-Key: $API_KEY" ``` The property response gives the address and coordinates the next step needs. Here's an excerpt, trimmed with `…`: ```json { "data": { "property_id": 124182, "address": "2517 25th Ave W", "city": "Seattle", "state": "WA", "zip": "98199", "price": 2750000, "beds": 3, "baths": 4, "sqft": 3570, "year_built": 2005, "latitude": 47.6416879, "longitude": -122.3893426, … } } ``` The valuation response carries the price history fields. Note the last line of this excerpt: ```json { "data": { "listingPrice": 2750000, "lastSoldPrice": 1050000, "lastSoldDate": 1285830000000, "priceInfo": { "amount": 2750000, "label": "Listed at Price", … }, … "sectionPreviewText": "Estimate Not Available", "propertyId": 124182 } } ``` `lastSoldDate` is milliseconds since the epoch, 30 September 2010. And this home has no Redfin Estimate: `sectionPreviewText` says so. We don't have a recording of a valuation that includes an estimate, so the agent reports this status text rather than reading an estimate field it can't name. The [Redfin API guide](https://perceptlayer.com/blog/redfin-api-property-valuation) covers search, region codes and valuation in more depth. ## How do you find the same home on Zillow? Search Zillow around the Redfin coordinates and match the address. `GET /v1/zillow/search` takes `latitude`, `longitude` and `radius_mi`, plus `listing_category` ( `category1` in the recorded request, which returned homes for sale) and `page_size`. A quarter-mile radius keeps the result set small; the agent then compares each listing's street address and ZIP with Redfin's. ```bash curl "https://api.perceptlayer.com/v1/zillow/search?latitude=47.6416879&longitude=-122.3893426&radius_mi=0.25&listing_category=category1&page_size=50" \ -H "X-API-Key: $API_KEY" ``` We haven't run that request. The recorded Zillow search, a 5-mile radius around downtown Seattle, shows what a match would contribute. Here's an excerpt of its two listings, trimmed with `…`: ```json { "data": { "listings": [ { "zpid": 2068074790, "address": { "streetAddress": "1124 Sunset Avenue SW", "zipcode": "98116", "city": "Seattle", "state": "WA" }, "price": { "value": 14000000, "pricePerSquareFoot": 1779 }, "estimates": { "zestimate": 13068300 }, … }, { "zpid": 49046647, "address": { "streetAddress": "1627 33rd Avenue", "zipcode": "98122", "city": "Seattle", "state": "WA" }, "listing": { "listingStatus": "forSale", "marketingStatus": "comingSoon", … }, "price": { "value": 1050000, "pricePerSquareFoot": 500 }, "taxAssessment": { "taxAssessedValue": 949000, "taxAssessmentYear": "2025" }, … } ], "count": 20, "total_matching_count": 2058, … } } ``` The first listing has a Zestimate 6.7% below its asking price (13,068,300 against 14,000,000). The second has no Zestimate at all, but a 2025 tax assessment of 949,000, 90% of its asking price. Neither is the Redfin home above, so in a test on these recordings the agent correctly reports no Zillow match. Zillow writes "Avenue" where Redfin writes "Ave", which is why the matcher normalises suffixes and directions before comparing. ## What does the complete agent look like? Here's the whole script. `get` counts credits from each response's `X-Credits-Used` header and refuses to call once the cap is reached. `research` makes the three calls and builds the facts. `explain` sends them to Claude with a system prompt that forbids new numbers. Set `CLAUDE_MODEL` to use another model. ```python """Research one US home from Redfin and Zillow data, then have Claude explain the numbers.""" import datetime import json import os import re import sys import anthropic import requests API = "https://api.perceptlayer.com/v1" HEADERS = {"X-API-Key": os.environ["PERCEPTLAYER_API_KEY"]} MODEL = os.environ.get("CLAUDE_MODEL", "claude-opus-5-5") CREDIT_CAP = 4 # a question needs 3 calls; one spare spent = 0 def get(path, **params): """One API call, counted against the cap. Failed calls cost nothing.""" global spent if spent >= CREDIT_CAP: raise RuntimeError(f"credit cap of {CREDIT_CAP} reached") r = requests.get(f"{API}/{path}", headers=HEADERS, params=params, timeout=60) spent += int(r.headers.get("X-Credits-Used", "0")) r.raise_for_status() return r.json()["data"] ABBREV = {"avenue": "ave", "street": "st", "drive": "dr", "road": "rd", "boulevard": "blvd", "place": "pl", "court": "ct", "lane": "ln", "southwest": "sw", "southeast": "se", "northwest": "nw", "northeast": "ne", "north": "n", "south": "s", "east": "e", "west": "w"} def street_key(address, zip_code): words = re.sub(r"[^a-z0-9 ]", " ", address.lower()).split() return " ".join(ABBREV.get(w, w) for w in words) + f" {zip_code}" def ms_to_date(ms): return datetime.datetime.fromtimestamp(ms / 1000, datetime.timezone.utc).date().isoformat() if ms else None def research(property_id, listing_id=None): ids = {"property_id": property_id, **({"listing_id": listing_id} if listing_id else {})} home = get("redfin/property", **ids) value = get("redfin/valuation", **ids) nearby = get("zillow/search", latitude=home["latitude"], longitude=home["longitude"], radius_mi=0.25, listing_category="category1", page_size=50) key = street_key(home["address"], home["zip"]) match = next((z for z in nearby.get("listings", []) if street_key(z["address"]["streetAddress"], z["address"]["zipcode"]) == key), None) facts = { "address": f'{home["address"]}, {home["city"]}, {home["state"]} {home["zip"]}', "beds": home.get("beds"), "baths": home.get("baths"), "sqft": home.get("sqft"), "year_built": home.get("year_built"), "redfin": { "list_price": value.get("listingPrice"), "price_label": value.get("priceInfo", {}).get("label"), "last_sold_price": value.get("lastSoldPrice"), "last_sold_date": ms_to_date(value.get("lastSoldDate")), "estimate_status": value.get("sectionPreviewText"), }, "zillow": None, "credits_used": spent, } if match: tax = match.get("taxAssessment", {}) facts["zillow"] = { "zpid": match["zpid"], "list_price": match.get("price", {}).get("value"), "zestimate": match.get("estimates", {}).get("zestimate"), "tax_assessed_value": tax.get("taxAssessedValue"), "tax_assessment_year": tax.get("taxAssessmentYear"), "status": match.get("listing", {}).get("marketingStatus"), } facts["credits_used"] = spent return facts SYSTEM = """You explain US home valuation data to a buyer. Use only the numbers in the JSON you are given. Never estimate a missing value. Say which values are missing and why that matters. Compare the list price with each estimate that exists, as a percentage. Mention the last sale and its date. Keep it under 200 words and end with what to check next.""" def explain(facts): client = anthropic.Anthropic() response = client.messages.create( model=MODEL, max_tokens=16000, system=SYSTEM, messages=[{"role": "user", "content": json.dumps(facts, indent=2)}], ) if response.stop_reason == "refusal": return "The model declined to answer." return "".join(b.text for b in response.content if b.type == "text") if __name__ == "__main__": pid = int(sys.argv[1]) lid = int(sys.argv[2]) if len(sys.argv) > 2 else None facts = research(pid, lid) print(json.dumps(facts, indent=2)) print(explain(facts)) print(f"\nCredits used: {spent}") ``` Run it with a Redfin property ID and, optionally, a listing ID: `python property_agent.py 124182 224635828`. ## What does the agent return? The facts object is the part we could test. With `requests.get` mocked to return the recorded Redfin property, Redfin valuation and Zillow search responses, `research(124182, 224635828)` made the three calls and returned this: ```json { "address": "2517 25th Ave W, Seattle, WA 98199", "beds": 3, "baths": 4, "sqft": 3570, "year_built": 2005, "redfin": { "list_price": 2750000, "price_label": "Listed at Price", "last_sold_price": 1050000, "last_sold_date": "2010-09-30", "estimate_status": "Estimate Not Available" }, "zillow": null, "credits_used": 3 } ``` That's an honest, if thin, result: a list price of 2,750,000 against a 2010 sale at 1,050,000, no Redfin Estimate and no Zillow match in the recorded search. The model's job is to say exactly that, plus what to check next, such as the [Zillow Property endpoint](https://perceptlayer.com/apis/zillow/property) for a direct lookup by `zpid`. We haven't run the explanation step against a model for this article, so we don't show its output. The fields map to the questions a buyer asks. List price against estimates answers "is it priced like the market thinks?". The last sale answers "what did the owners pay?". The tax assessment is a third, slower-moving reference. For which listing fields matter in valuation models, see [real estate listing data for valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields). ## What does a question cost? Three successful calls at 1 credit each, so 3 credits a question, with the cap at 4 so a retry fits but a loop doesn't. Failed calls cost nothing and return `X-Credits-Used: 0`, which is why `get` reads the header instead of counting calls. The [credits docs](https://docs.perceptlayer.com/credits) explain billing, and the model's tokens are billed separately by Anthropic. | Questions a month | Credits | | --- | --- | | 100 | 300 | | 1,000 | 3,000 | | 10,000 | 30,000 | The 100 free credits cover the first 33 questions once; after that you need a pack. Worked example: an internal tool answering 1,000 property questions a month spends 1,000 × 3 = 3,000 credits; 10,000 questions, 30,000 credits, fit in a Build pack of 50,000 credits. Purchased credits last 12 months; see [pricing](https://perceptlayer.com/pricing) for what credits cost. The free tier runs at 1 request a second, so a question's three calls take about three seconds; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the paid rates. ## How do you make it more robust? Four changes cover most failures. Each is small, and each keeps the fixed-plan design. 1. **Widen the Zillow search on no match.** Retry once at 0.5 miles before giving up; the cap of 4 allows one extra call. 2. **Fall back to a direct Zillow lookup.** If you already know the `zpid`, the Zillow Property endpoint takes `zpid[]` and skips the address match. 3. **Handle units.** Apartments need the unit in the key; Redfin writes it into `address` ("Unit D4" in the recorded search), so keep it rather than stripping it. 4. **Retry the right errors.** Retry `rate_limited` and `temporarily_unavailable` after `Retry-After`; never retry `invalid_parameters`. [Handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) has the pattern, and the [errors docs](https://docs.perceptlayer.com/errors) list the codes. To let a model choose calls itself instead, put the same endpoints behind the MCP server, as in the [AI agents docs](https://docs.perceptlayer.com/ai-agents), and keep a per-question cap. To start, [get a free API key](https://perceptlayer.com/signup) and run the valuation call in the playground on the [Redfin API page](https://perceptlayer.com/apis/redfin). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Zillow **1 credit per call** · 20 endpoints](https://perceptlayer.com/apis/zillow) - [Redfin **1 credit per call** · 14 endpoints](https://perceptlayer.com/apis/redfin) ## Frequently asked questions ### Which data does the property research agent use? Redfin property details and valuation (list price, last sale price and date, estimate status) and a Zillow search around the home's coordinates (list price, Zestimate, tax assessment), all as JSON. The agent matches the Zillow listing to the Redfin home by normalised street address and ZIP code, since the two sites share no IDs. ### How much does each question cost? 3 credits: one call each to `redfin/property`, `redfin/valuation` and `zillow/search`, at 1 credit per successful call. The script caps a question at 4 credits. Failed calls cost nothing. Every account gets 100 free credits once, after verifying an email address, enough for 33 questions. See [pricing](https://perceptlayer.com/pricing). ### Why do some homes have no estimate? Neither site estimates every home. The recorded Redfin valuation for a listed Seattle home returns "Estimate Not Available", and one of two recorded Zillow listings has a tax assessment but no Zestimate. The agent passes the missing values to the model as `null`, and the system prompt tells it to say so, not to guess. ### Can the model make up a valuation? The design makes that harder: code fetches the data, and the system prompt tells the model to use only the numbers in the facts object and never to estimate a missing value. Check its output against the facts before you show it to a user, especially percentages, which the model calculates itself. ### Is this real estate advice? No. The agent restates published list prices, automated estimates, past sales and tax assessments, as found at the time of the call. Automated estimates have known error rates, published by Zillow and Redfin themselves. Use the output as a starting point for an appraisal or an agent's comparable sales, not as a valuation. real estate ai agents redfin zillow property valuation python ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 11 Sept 2026 Perceptlayer 8 min read ## [Build a Price Tracking Agent in Python with Live Data](https://perceptlayer.com/blog/price-tracking-agent-python) A Python price tracker that checks Google Shopping and eBay once per product per run, stores history in SQLite, flags drops and costs 2 credits a product. --- title: "Google Hotels API: Hotel Prices for Your Dates as JSON" description: "One GET to /v1/google-hotels/search returns Paris hotels with nightly rate, total rate and rating for your dates as JSON. Parameters, a response and cost." url: https://perceptlayer.com/blog/google-hotels-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Hotels API: Hotel Prices for Your Dates as JSON 17 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read Google's [Hotel Prices developer guide](https://developers.google.com/hotels/hotel-prices/dev-guide) is about supplying hotel pricing data for Google's search results, and it doesn't present a way to read prices for a city and dates. To read prices for a city and dates, call `GET /v1/google-hotels/search` with a destination and a check-in and check-out date. It returns hotels with nightly rate, total rate, rating and review count as JSON, for 1 credit per call. ## Key takeaways - Google's Hotel Prices developer guide covers supplying pricing data to Google. It doesn't present a way to look up prices for a city and dates. Search results for a destination and dates come from `/v1/google-hotels/search`. - Three parameters are required: `q`, `check_in_date` and `check_out_date`. Everything else, including `currency`, `adults` and `hotel_class`, narrows the results. - Each property in the recorded Paris response carries `rate_per_night`, `total_rate`, `overall_rating` and a `property_token` for the reviews endpoint. - Every call to the five Google Hotels endpoints costs 1 credit, and failed calls cost nothing. A nightly check of 5 destinations uses 150 credits a month. ## Is there an official Google Hotels API for prices? We didn't find one for reading prices back out, and we can't rule out that something exists outside the pages we read. Google's [Hotel Prices developer guide](https://developers.google.com/hotels/hotel-prices/dev-guide) covers how to configure your environment and supply hotel pricing data for Google's search results. It is written for the side of the market that publishes rates, not the side that wants to look them up. That matters if you're the one who needs prices. A travel app, a rate-monitoring script or an agent comparing destinations is a consumer of that data, not a supplier. Google also documents a [Travel Partner API](https://developers.google.com/hotels/hotel-prices/api-reference/rest) for Hotel Center accounts, which sits alongside that supply-side guide. If you are a hotel, use Google's own tooling. If you want what a traveller sees for a given city and dates, that's what the [Google Hotels API](https://perceptlayer.com/apis/google-hotels) returns as JSON: data collected from publicly available sources and returned as found at the time of the call. ## Which endpoints does the Google Hotels API have? The [Google Hotels API](https://perceptlayer.com/apis/google-hotels) has five endpoints: autocomplete, search, reviews, photos and price calendar. All five are `GET` requests, and each costs 1 credit per successful call. Search is the one that returns prices for a destination and dates. The API is part of the [Travel APIs](https://perceptlayer.com/verticals/travel), and the table below lists each path with its required parameters. | Path | Returns | Credits | Required parameters | | --- | --- | --- | --- | | `/v1/google-hotels/autocomplete` | Autocomplete | 1 | `q` | | `/v1/google-hotels/search` | Search | 1 | `q`, `check_in_date`, `check_out_date` | | `/v1/google-hotels/reviews` | Reviews | 1 | `property_token` | The usual flow is search first. Each property in a search response has a `property_token`, and that token is what the reviews endpoint needs. The autocomplete endpoint takes a partial `q` and a `type` of `location`, `hotel` or `all`, which helps when you want to resolve user input into a destination or hotel name before searching. Authentication is one header, `X-API-Key`. The [authentication docs](https://docs.perceptlayer.com/authentication) cover keys and the `api_key` query parameter, and the [quick start](https://docs.perceptlayer.com/quickstart) gets a first call running. ## How do you get hotel prices for specific dates? To get hotel prices for specific dates, send the destination as `q` and the stay as `check_in_date` and `check_out_date` in one `GET` to the search endpoint. Add `currency` for the price format and `gl` for the country. The request below asks for Paris, 15 to 18 December 2026, in euros, and costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/google-hotels/search?q=Paris%2C+France&check_in_date=2026-12-15&check_out_date=2026-12-18¤cy=EUR&gl=fr" \ -H "X-API-Key: $API_KEY" ``` The response echoes your inputs under `search_parameters`, and shows what was applied, including `adults: 2` and `children: 0`. Here's an excerpt of the recorded response, trimmed with `…`: ```json { "search_parameters": { "engine": "google_hotels", "q": "Paris, France", "gl": "fr", "hl": "en", "currency": "EUR", "check_in_date": "2026-12-15", "check_out_date": "2026-12-18", "adults": 2, "children": 0 }, "search_information": { "total_results": 15000, "cached": false }, "properties": [ { "type": "hotel", "name": "Novotel Paris Porte de Versailles", "property_token": "ChkI5rWisq2xuMNRGg0vZy8xMWhfa18xc2w4EAE", "gps_coordinates": { "latitude": 48.8300073, "longitude": 2.2917392999999997 }, "check_in_time": "3:00 PM", "check_out_time": "12:00 PM", "rate_per_night": { "lowest": "€136", "extracted_lowest": 136, "before_taxes_fees": "€136", "extracted_before_taxes_fees": 135.76042 }, "total_rate": { "lowest": "€408", "extracted_lowest": 408, "before_taxes_fees": "€407", "extracted_before_taxes_fees": 407.28126000000003 }, "overall_rating": 4.6, "reviews": 4337, "hotel_class": "4-star hotel", "extracted_hotel_class": 4 }, … ], "pagination": { "current_from": 1, "current_to": 20, "next_page_token": "gho_jRZtj7WKgqLkF8eP.Q0JJPQ", … }, "response_time_ms": 2501 } ``` ### What do the price fields mean? Each property has two price objects. `rate_per_night` is the nightly figure and `total_rate` covers the stay. For the Novotel, the three nights come to `€408` in `total_rate.lowest`, which is 3 × `€136`. Each object has a display string ( `"€136"`) and an `extracted_` number ( `136`) you can sort and sum without parsing currency symbols. The `before_taxes_fees` pair gives the figure before taxes and fees. Use the numeric fields in code and keep the strings for display. The second property in the recording, Hôtel Aramis Saint-Germain Best Western, shows `rate_per_night.lowest` of `€124` and `overall_rating` of `4.4` from `826` reviews. Rate, rating and review count are on the same object, so ranking by value takes no second request. ## Which parameters does the search endpoint take? The search endpoint takes three required parameters, `q`, `check_in_date` and `check_out_date`, and a long list of optional filters for party size, price, star class and more. Only the types and allowed values below are documented, so the table doesn't claim defaults. The recorded response shows `adults: 2` and `children: 0` for a request that set neither. | Parameter | Type | Notes | | --- | --- | --- | | `q` | string, required | Destination, up to 200 characters | | `check_in_date` | string, required | Check-in date | | `check_out_date` | string, required | Check-out date | | `adults`, `children` | integer | Party size | | `children_ages[]` | list of integer | Ages of the children | | `currency` | string | Up to 3 characters | | `gl`, `hl` | string | Country and language, up to 2 characters each | | `sort_by` | integer | One of 3, 8, 13 | | `min_price`, `max_price` | integer | Price bounds | | `hotel_class` | integer | One of 2, 3, 4, 5 | | `rating` | integer | One of 7, 8, 9 | | `free_cancellation` | boolean | Filter | | `amenities[]` | list of integer | Amenity filter | | `property_types[]`, `brands[]` | list of integer | Type and brand filters | | `vacation_rentals`, `eco_certified`, `special_offers` | boolean | Filters | | `bedrooms`, `bathrooms` | integer | Size filters | | `next_page_token` | string | Continues a result set | | `property_token` | string | Targets one property | | `engine` | string | One of `google_hotels` | The response includes a `brands` list with an `id` and `name` for each brand, such as `118` for Park Hyatt and `155` for Best Western in the recording. The `brands[]` filter is a list of integers. The docs don't say where its values come from, so try it in the playground on the [Search endpoint page](https://perceptlayer.com/apis/google-hotels/search). For a filtered search, add parameters to the same call. This one asks for 4-star hotels with free cancellation: ```bash curl "https://api.perceptlayer.com/v1/google-hotels/search?q=Paris%2C+France&check_in_date=2026-12-15&check_out_date=2026-12-18¤cy=EUR&gl=fr&hotel_class=4&free_cancellation=true" \ -H "X-API-Key: $API_KEY" ``` ## How do you page through results and read reviews? The recorded response has `total_results` of 15000 and a `pagination` object showing `current_from: 1` and `current_to: 20`. To get the next page, pass the `next_page_token` from that object back as the `next_page_token` parameter, with the same query. Each page is its own call and its own credit. The [pagination guide](https://perceptlayer.com/blog/paginate-web-data-api-python) covers safe page loops in Python. For reviews, take a property's `property_token` from search and call the reviews endpoint: ```bash curl "https://api.perceptlayer.com/v1/google-hotels/reviews?property_token=ChkI5rWisq2xuMNRGg0vZy8xMWhfa18xc2w4EAE" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Notes | | --- | --- | --- | | `property_token` | string, required | Up to 256 characters | | `hl`, `gl` | string | Language and country, up to 2 characters | | `category_token` | string | Up to 40 characters | | `next_page_token` | string | Up to 256 characters, for more reviews | We haven't recorded a reviews response for this guide, so there's no excerpt here. The [Reviews endpoint page](https://perceptlayer.com/apis/google-hotels/reviews) lists the fields, and the playground runs a real call. Search already gives you a summary per hotel: `overall_rating`, `reviews`, a star `ratings` breakdown and `reviews_breakdown` by topic. The reviews endpoint is for the review entries themselves. For the same pattern on another Google product, see the [Google Maps reviews guide](https://perceptlayer.com/blog/google-maps-reviews-api-parameters). ## How do you run a nightly price check in Python? A nightly price check is a loop over destinations and date windows that stores `extracted_lowest` with a timestamp, so you can compare the same stay from one night to the next. The script below runs one search and prints name, nightly rate, rating and reviews for each property. Set `API_KEY` in your environment first. ```python import os import requests URL = "https://api.perceptlayer.com/v1/google-hotels/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def check(destination, check_in, check_out): params = { "q": destination, "check_in_date": check_in, "check_out_date": check_out, "currency": "EUR", } resp = requests.get(URL, headers=HEADERS, params=params, timeout=30) resp.raise_for_status() print("credits used:", resp.headers.get("X-Credits-Used"), "remaining:", resp.headers.get("X-Credits-Remaining")) return resp.json()["properties"] for p in check("Paris, France", "2026-12-15", "2026-12-18"): rate = p.get("rate_per_night", {}).get("extracted_lowest") print(p["name"], rate, p.get("overall_rating"), p.get("reviews")) ``` Some properties may lack a rate for your dates, so the script reads `rate_per_night` defensively. Don't assume every field exists on every property. Only the fields in the recording are shown here. Errors come back as an HTTP status with a JSON `error` body. Handle `429` and `503` by waiting for the `Retry-After` seconds, as described in the [errors](https://docs.perceptlayer.com/errors) and [rate limit](https://docs.perceptlayer.com/rate-limits) docs. A request that timed out client-side may still have succeeded and been billed, which [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) goes into. Store results, and use the [caching guide](https://perceptlayer.com/blog/cache-web-data-api-responses) so the same query isn't paid for twice in a day. ## What does a nightly hotel price check cost? Each search is 1 credit, so the cost is the number of destination and date combinations times the number of nights you run it. Failed calls cost nothing and return `X-Credits-Used: 0`, and every successful response reports `X-Credits-Remaining`. The [credits docs](https://docs.perceptlayer.com/credits) and [pricing](https://perceptlayer.com/pricing) have the rest. | Check | Calls per night | Credits per 30 nights | Cost | | --- | --- | --- | --- | | 5 destinations, 1 date window each | 5 | 150 | The 100 free credits on signup cover the first 20 nights; the Starter pack's 10,000 covers a year (12 × 150 = 1,800) | | 20 destinations, 3 date windows each | 60 | 1,800 | 60 calls × 30 nights × 1 credit = 1,800 credits, within the Starter pack's 10,000 | The free tier gives 100 credits after you verify an email address, with no credit card. Credits also come in prepaid packs, starting with the 10,000-credit Starter pack, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Paging deeper into a result set adds one credit per extra page, so count pages as calls. The service is prepaid. If the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. Next step: [get a free API key](https://perceptlayer.com/signup) and run the Paris search above in the playground on the [Google Hotels API page](https://perceptlayer.com/apis/google-hotels). If you want an agent to make these calls, the [MCP docs](https://docs.perceptlayer.com/ai-agents) show how. ## APIs in this post - [Google Hotels **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-hotels) ## Frequently asked questions ### Does Google have an API to get hotel prices? We didn't find one. Google's [Hotel Prices developer guide](https://developers.google.com/hotels/hotel-prices/dev-guide) covers supplying pricing data to Google's search results, and the pages we read don't describe reading prices for a city and dates. The Google Hotels API on Perceptlayer returns that search view as JSON from `/v1/google-hotels/search`, for 1 credit per call. ### How much does the Google Hotels API cost? Each successful call to the search, reviews and autocomplete endpoints costs 1 credit. Failed calls cost nothing. You get 100 free credits after verifying an email. Beyond that, prepaid packs run from 10,000 credits (Starter) to 5,000,000 (Volume), and [pricing](https://perceptlayer.com/pricing) has what credits cost. A nightly check of 5 destinations is 150 credits a month. ### What parameters are required for a hotel search? Three: `q` for the destination, `check_in_date` and `check_out_date`. Everything else is optional, including `currency`, `gl`, `hl`, `adults`, `children`, `hotel_class`, `rating`, `min_price`, `max_price` and `free_cancellation`. Check-in and check-out are strings. The recorded request writes them like `2026-12-15`. ### How do I get reviews for a specific hotel? Run a search, copy the `property_token` from the hotel you want, and pass it to `/v1/google-hotels/reviews`. Use `next_page_token` to continue to more reviews and `category_token` to narrow by category. Each reviews call costs 1 credit. The hotel's summary rating and review count are already in the search response. ### What happens if a call fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `request_id`. Failed calls aren't billed and return `X-Credits-Used: 0`. For `429` and `503`, wait the number of seconds in the `Retry-After` header. A call that timed out on your side may have succeeded and been billed. travel hotels google hotels prices reviews ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Aug 2026 Updated 23 Oct 2026 Perceptlayer 8 min read ## [Booking.com Hotel Prices API: Search, Rooms and Reviews](https://perceptlayer.com/blog/booking-com-hotel-prices-api) Eleven Booking.com endpoints as JSON: search, prices, rooms and reviews, with parameters and a 1,000-hotel price check costed in credits. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 24 Jul 2026 Perceptlayer 8 min read ## [Trivago Hotel Prices API: Deals and Search as JSON](https://perceptlayer.com/blog/trivago-api-hotel-prices) Call trivago suggest, search and deals as JSON: 1 credit per call, a recorded Paris search response, and the provider\_count field in a metasearch result. --- title: "Google Shopping API: Product Prices and Offers as JSON" description: "One GET to /v1/google-shopping/search returns product titles, sellers, prices and ratings as JSON. Parameters, a response and the cost of 500 products a day." url: https://perceptlayer.com/blog/google-shopping-api-product-prices --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Shopping API: Product Prices and Offers as JSON 17 Aug 2026 Perceptlayer 7 min read To get Google Shopping prices as JSON, send one GET request to `/v1/google-shopping/search` with a search query in `q`. Each result comes back with a title, a seller, a price as text, the same price as a number, a rating and a product ID. A successful call costs 1 credit, and a failed call costs nothing. This guide covers the request, the parameters, a recorded response and what a daily price check for 500 products costs in credits. ## Key takeaways - The Google Shopping API has one endpoint, `GET /v1/google-shopping/search`. It needs only `q`, and every successful call costs 1 credit. - Each result carries `price` as display text and `extracted_price` as a number, so you can compare prices without parsing currency symbols. - Google's own Merchant API is for managing how a seller's products appear on Google. For price research across sellers, you need a search endpoint like this one. - Tracking 500 products once a day is 500 credits a day, or 15,000 credits over 30 days. The 100 free credits on signup cover a first run on 100 products. - Pass `gl` and `hl` to set the country and language, and `start` to page through results. ## Is there an official Google Shopping API for price research? Google's official option is the Merchant API, and it serves sellers. Google describes it as a way to [manage how your business and products appear on Google](https://developers.google.com/merchant/api/overview). That is a job for the seller who owns the products, not a search over what other sellers charge. If you sell on Google and want to update your own feed, use the Merchant API; it fits that job better than anything here. If you want to know what a product costs across retailers, you need search results, which is what the endpoint below returns. Perceptlayer collects the data from publicly available sources and returns it as found at the time of the call, so a price is a snapshot, not a guarantee. ## How do you request product prices as JSON? You make a GET request with a search query and your key in the `X-API-Key` header. The only required parameter is `q`. Adding `gl` (country) and `hl` (language) keeps results consistent from one run to the next, which matters when you compare prices over time. ```bash curl "https://api.perceptlayer.com/v1/google-shopping/search?q=iphone+15&gl=us&hl=en" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. If you don't have one, [get a free API key](https://perceptlayer.com/signup); the [quick start](https://docs.perceptlayer.com/quickstart) takes you to a first call, and [authentication](https://docs.perceptlayer.com/authentication) covers the header and the `api_key` query parameter for places where headers aren't possible. You can also run the call from the playground on the [Google Shopping API page](https://perceptlayer.com/apis/google-shopping) before writing any code. ## Which parameters does the search endpoint take? The search endpoint takes one required parameter, `q`, and eight optional ones: `gl`, `hl`, `location`, `uule`, `start`, `device`, `small_business` and `shoprs`. Types and limits below are as documented for [`/v1/google-shopping/search`](https://perceptlayer.com/apis/google-shopping/search). Nothing else about defaults or page sizes is documented, so test before you depend on them. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `q` | string | yes | The search query, up to 500 characters | | `gl` | string | no | Country code, up to 2 characters | | `hl` | string | no | Language code, up to 2 characters | | `location` | string | no | Search location, up to 63 characters | | `uule` | string | no | Encoded location, up to 500 characters | | `start` | integer | no | Offset for the next page of results | | `device` | string | no | One of `desktop`, `mobile`, `tablet` | | `small_business` | boolean | no | Small-business filter | | `shoprs` | string | no | Filter token, up to 2000 characters | Prices differ by country, so set `gl` and `hl` deliberately and keep them the same across runs. Use `location` or `uule` when you need a more specific place than a country. The recorded response below echoes the parameters it ran with in `search_parameters`, including `device`, which is worth logging next to every price you store. ## What does the response look like? The response has three parts: `search_parameters`, which echoes the request; a `shopping_results` array with one object per product listing; and a `pagination` object that points to the next page. This is an excerpt of a recorded response for the request above, trimmed with `…`. ```json { "search_parameters": { "q": "iphone 15", "gl": "us", "hl": "en", "start": 0, "device": "desktop" }, "shopping_results": [ { "position": 1, "category": "Popular products", "title": "Apple iPhone 15", "source": "Walmart - Wireless Source", "rating": 4.7, "reviews": 45000, "product_id": "4263606017411565992", "link": "https://www.google.com/shopping/product/4263606017411565992", "price": "$393.73", "extracted_price": 393.73, … }, { "position": 2, "title": "Apple iPhone 15 128GB", "source": "Best Buy", "rating": 4.4, "reviews": 94, "product_id": "4379032623638529631", "price": "$441.00", "extracted_price": 441, … } ], "pagination": { "current_page": 1, "start": 0, "next_start": 10 } } ``` The fields a price pipeline uses are these: | Field | What it holds | | --- | --- | | `title` | The product name as listed | | `source` | The seller the result points to | | `price` | The price as display text, with currency symbol | | `extracted_price` | The same price as a number | | `product_id` | An ID for each product, usable as a key to store it under | | `rating`, `reviews` | Star rating and review count | | `link` | The Google Shopping product page | The full results also carry `product_token`, `thumbnail`, `extensions` and `rank_absolute`; they're cut here for length. Store `extracted_price` for arithmetic and keep `price` only if you need the display string. Note that the two results above come from different sellers, so a price in one row isn't the price of the same offer in the next. ## How do you track prices for 500 products every day? The endpoint answers a search; it doesn't track anything on its own. A price tracker needs a product list, a daily loop, a store for history and a retry rule around it. Run one search per product, pick the matching result, and write `product_id`, `source`, `extracted_price` and the date to a table. This script does that for a list of queries. It keeps the first result as the match, which is a shortcut: for products with common names, match on `title` or a stored `product_id` instead. ```python import os import time import requests API = "https://api.perceptlayer.com/v1/google-shopping/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def fetch(query, tries=3): params = {"q": query, "gl": "us", "hl": "en"} for _ in range(tries): r = requests.get(API, params=params, headers=HEADERS, timeout=30) if r.status_code == 200: return r.json() if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return None def daily_prices(queries): rows = [] for q in queries: data = fetch(q) results = (data or {}).get("shopping_results", []) if not results: continue top = results[0] rows.append((q, top["product_id"], top["source"], top["extracted_price"])) return rows ``` The [requests library](https://requests.readthedocs.io/) handles the HTTP. Rate-limited (429) and temporarily unavailable (503) responses carry a `Retry-After` header with the seconds to wait, and the loop honours it. There is no idempotency key, so a call that timed out on your side may still have been billed; [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers how to handle that. For results beyond the first page, see [paginating a web data API safely](https://perceptlayer.com/blog/paginate-web-data-api-python), using `next_start` from `pagination` as the next `start`. ## What does tracking 500 products a day cost? Tracking 500 products once a day costs 500 credits a day, because each product is one search at 1 credit. Over 30 days that is 500 × 30 = 15,000 credits. The arithmetic scales linearly, so doubling the list or checking twice a day doubles the credits. | Plan of calls | Calls | Credits | | --- | --- | --- | | 500 products, once a day, 1 day | 500 | 500 | | 500 products, once a day, 30 days | 15,000 | 15,000 | | 500 products, once a day, 365 days | 182,500 | 182,500 | | 500 products, twice a day, 30 days | 30,000 | 30,000 | The 100 free credits on signup cover a test run on 100 products. A month of daily checks, 15,000 credits, is more than the 10,000-credit Starter pack and fits inside the 50,000-credit Build pack with 35,000 left over. A full year at 182,500 credits fits inside the 200,000-credit Growth pack. Purchased credits last 12 months, there's no subscription, and [pricing](https://perceptlayer.com/pricing) shows what credits cost. The [credits docs](https://docs.perceptlayer.com/credits) explain how debits work; failed calls return `X-Credits-Used: 0`. Rate limits are per account. Free accounts get 1 request a second, so 500 sequential calls take roughly 500 seconds. Paying accounts run at 5 requests a second at least, which brings the same loop to about 100 seconds. Details are in the [rate limits docs](https://docs.perceptlayer.com/rate-limits). ## What should you check before trusting a price? Treat each stored price as an observation: this query, this country, this device, this moment. It isn't a fixed fact about the product, because sellers, variants and countries change what a search returns. Three habits make the stored history usable for comparison over time. - Log `search_parameters` with every row, so a change in `gl` or `device` isn't mistaken for a price move. - Compare on `product_id` and `source`, not on rank. Position changes without any price change. - Alert on large jumps instead of acting on them. A result can be a different variant, so check `title` when a price moves sharply. Errors arrive as an HTTP status with a JSON body holding `code`, `message` and `request_id`. Handle `invalid_parameters` (422) by fixing the request, and `insufficient_credits` (402) by topping up, since nothing else is debited when the balance reaches zero. The [errors docs](https://docs.perceptlayer.com/errors) list every code. If you're building an agent rather than a pipeline, the same endpoint is available as a tool through the MCP server; see the [AI agents docs](https://docs.perceptlayer.com/ai-agents). For sibling Google endpoints, the guides to [Google Hotels prices](https://perceptlayer.com/blog/google-hotels-api) and [Google Flights fares](https://perceptlayer.com/blog/google-flights-api) follow the same pattern. Next step: run the iPhone query in the [Google Shopping playground](https://perceptlayer.com/apis/google-shopping), then swap in your own first product. ## APIs in this post - [Google Shopping **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/google-shopping) ## Frequently asked questions ### Does the Google Shopping API return prices from several sellers? Each item in `shopping_results` has a `source` field naming the seller and a `price` for that listing. In the recorded response, one result came from Walmart and another from Best Buy. Search for a product and read the results to compare sellers; the endpoint returns what Google Shopping shows for that query at call time. ### How much does one Google Shopping API call cost? A successful call costs 1 credit, and a failed call costs nothing. Every response carries `X-Credits-Used` and `X-Credits-Remaining` headers, so you can track spend per call. Accounts get 100 free credits after verifying an email address, with no credit card. See [pricing](https://perceptlayer.com/pricing) for what credit packs cost. ### Can I get prices for a specific country? Yes. Set `gl` to a two-character country code and `hl` to a language code, and use `location` or `uule` for a more specific place. Keep these the same across runs, because the same product can show different prices and sellers in different countries. The response echoes the values in `search_parameters`. ### How do I get the next page of results? Pass `start` with the `next_start` value from the previous response's `pagination` object. The recorded response ran with `start` 0 and returned `next_start` 10. Page sizes aren't documented, so read `next_start` from each response instead of assuming a step. The [Google Search guide](https://perceptlayer.com/blog/google-search-api-json) shows a similar loop. ### What happens when I hit the rate limit? You get a 429 `rate_limited` response with a `Retry-After` header giving the seconds to wait. Limits are per account and counted per minute: free accounts get 60 requests a minute, and paying accounts at least 300. Wait for `Retry-After`, then retry; a rate-limited call isn't billed. google shopping price monitoring ecommerce product data json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Google Shopping Scraper or API: What You Get](https://perceptlayer.com/blog/google-shopping-scraper-vs-api) A Google Shopping scraper vs one GET at 1 credit: the recorded iphone 15 search with source, extracted\_price and product\_id, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 16 Nov 2026 Perceptlayer 8 min read ## [Shopify Scraper or API: What You Get](https://perceptlayer.com/blog/shopify-scraper-vs-api) A Shopify scraper vs a 1-credit products call: a recorded store page of 30 products with variant SKUs, prices and stock flags, and the cost per product tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Nov 2026 Perceptlayer 7 min read ## [Amazon Product API: Search, Offers and Reviews as JSON](https://perceptlayer.com/blog/amazon-product-api-json) Search Amazon by keyword, then look each asin up with product, offers, rating-summary and customers-say. Domain values per endpoint, 1 credit a call. --- title: "Brave Search API: Official Plans or One Multi-Source Key" description: "Brave's official Search API has freshness, country and Goggles filters. When it fits, and when one key for Brave, Google and Bing at 1 credit a query wins." url: https://perceptlayer.com/blog/brave-search-api-results-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Brave Search API: Official Plans or One Multi-Source Key 15 Aug 2026 Updated 10 Nov 2026 Perceptlayer 7 min read Brave runs its own official Search API on its own index, with published prices, a monthly free allowance and a deep parameter set: freshness, country, language, Goggles re-ranking and extra snippets. If Brave is the only engine you need, use it. `GET /v1/brave/search` is the other option: Brave web results as JSON at 1 credit per query, on the same key and the same MCP server as Google, Bing, DuckDuckGo and the rest of the catalogue, with fewer parameters than Brave's own API. ## Key takeaways - Brave's official Search plan lists $5 per 1,000 requests at up to 50 requests a second, with a $5 monthly allowance on every plan, per its pricing page in 2026. - The official web search endpoint takes `q`, `count` (up to 20), `offset` (0 to 9), `country`, `search_lang`, `freshness` and Goggles; `/v1/brave/search` takes `query`, `language`, `page` and `include_html`. - The recorded `/v1/brave/search` response returns `organic_results`, `related_searches` and `related_questions`, with `results_count: 20`. - Pick Brave's own API for Brave-only products, date filters, country targeting or high request rates; pick the multi-source key when you query several engines or give an agent one MCP server. - Each `/v1/brave/search` call costs 1 credit on success and failed calls cost nothing; the 100 free credits on signup cover the first 100 queries. ## How do the two options compare? They overlap on the core job, ranked Brave web results as JSON, and differ on everything around it. Brave's API is first-party: it has every parameter Brave supports, its own rate tiers and an Answers plan for AI-generated responses. The catalogue endpoint trades depth for breadth: fewer Brave parameters, but one key, one billing balance and one response style across 480 websites. | | Brave Search API (official) | `/v1/brave/search` | | --- | --- | --- | | Who runs it | Brave, on its own index | Perceptlayer, from publicly available Brave results | | Price | Per 1,000 requests (see below) | 1 credit per successful query ( [pricing](https://perceptlayer.com/pricing)) | | Free use | A monthly allowance per plan (see below) | 100 free credits on signup, no card | | Payment | Prepaid, card required | Prepaid credit packs, no card for the free tier | | Query parameter | `q`, up to 600 characters | `query`, up to 500 characters | | Results per call | `count`, up to 20 | Not a parameter; 20 in the recorded call | | Paging | `offset`, 0 to 9 | `page` | | Date filter | `freshness` ( `pd`, `pw`, `pm`, `py` or a range) | None | | Country and language | `country`, `search_lang` | `language` only | | Re-ranking | Goggles | None | | Rate | Up to 50 requests a second on Search | 1 a second free, 5 or more on packs | | Other engines | Brave only | Google, Bing, DuckDuckGo and more on the same key | | MCP | Brave's own server | One server for the whole catalogue | Brave's figures come from its pricing page and API reference ( [Brave Search API pricing](https://api-dashboard.search.brave.com/documentation/pricing) and [web search reference](https://api-dashboard.search.brave.com/api-reference/web/search/get), 2026). Brave's Search plan is listed at $5 per 1,000 requests, and each plan carries a $5 monthly allowance. Brave also lists Spellcheck and Autosuggest plans, and an Answers plan billed per query plus tokens. Check its page before you budget; Brave's launch-era pricing was different. ## What does Brave's official API do better? Filtering and scale. Brave's web search takes `freshness` with past day, week, month, year or a custom date range, so "news about X this week" is one parameter. `country` and `search_lang` target a market; `extra_snippets` returns up to five additional excerpts per result, which helps retrieval for AI answers; and Goggles let you re-rank results with your own rules. None of these exist on `/v1/brave/search`. It also scales further on one engine. The Search plan allows up to 50 requests a second. Brave describes its index as independent, built by its own crawler, and its documentation for AI use (Answers, extra snippets) is first-party. If your product is built on Brave results, you'll want that relationship, its attribution terms and its support. Verdict for Brave-only products, recency-sensitive search, market targeting and high throughput: Brave's own API. ## When does one multi-source key fit better? When Brave is one engine among several. Search results differ by engine, and the [Bing Search API alternative guide](https://perceptlayer.com/blog/bing-search-api-alternative-json) shows a recorded query where the Bing and Brave top results did not overlap. If you compare engines, fall back from one to another, or let an agent pick, you'd otherwise hold a Brave key, a Google results provider, a Bing replacement and separate bills. On one key, those are paths on the same API. [`/v1/brave/search`](https://perceptlayer.com/apis/brave/search), [`/v1/duckduckgo/search`](https://perceptlayer.com/apis/duckduckgo/search), [`/v1/bing/search`](https://perceptlayer.com/apis/bing/search) and [`/v1/google-search/search`](https://perceptlayer.com/apis/google-search/search) cost 1 credit each and draw on one prepaid balance. Errors share one format, and every response reports `X-Credits-Used` and `X-Credits-Remaining`. Agents get one MCP server whose free `search_endpoints` tool finds the right engine, instead of one MCP server per engine. Verdict for multi-engine comparison, fallbacks, SEO checks across engines and agents that need search plus other web data: the multi-source key. If you only need Brave and none of its filters, either works; compare what credits cost on the [pricing page](https://perceptlayer.com/pricing) with Brave's rate. ## How do you call /v1/brave/search? Send `query`. The request below is the exact one behind the recorded response. Put your key in the `X-API-Key` header; keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ```bash curl "https://api.perceptlayer.com/v1/brave/search?query=best+web+scraping+api" \ -H "X-API-Key: $API_KEY" ``` The endpoint takes five parameters. Types and allowed values come from the endpoint definition; nothing else, such as page size, is documented. | Parameter | Type | Allowed values or notes | | --- | --- | --- | | `query` | string, required | Up to 500 characters | | `language` | string | `english`, `deutsch`, `french`, `spanish`, `italian`, `portuguese`, `dutch`, `russian`, `chinese`, `japanese`, `arabic`, `all`, or the codes `en`, `de`, `fr`, `es`, `it`, `pt`, `nl`, `ru`, `zh`, `ja`, `ar` | | `page` | integer | Page number | | `include_html` | boolean | | | `q` | string | Optional; `query` is the required one | `language` takes both names and two-letter codes, so `language=de` and `language=deutsch` both pass validation; pick one form and keep it. ### What does the response look like? The recorded response has `search_information`, `organic_results`, `related_searches` and `related_questions`, then counts and the engine used. Here is an excerpt, trimmed with `…`; the organic results, which name commercial products, are cut: ```json { "search_information": { "query_displayed": "best web scraping api" }, "organic_results": [ … ], "related_searches": [ { "query": "data scraping tools chrome extension", "link": "https://search.brave.com/search?q=data%20scraping%20tools%20chrome%20extension&source=relatedQueries" }, … ], "related_questions": [ … ], "results_count": 20, "engine_used": "brave", "source": "brave", "service_used": "brave" } ``` Each organic result in the recording carries `position`, `title`, `link`, `redirect_link`, `displayed_link`, `snippet` and `source`. Snippets can start with a relative age such as "2 weeks ago -", as found on the page, so strip it before you index text. `related_questions` entries carry a `question`, an `answer`, a `link` and a `title`: the answer is text from the linked page, not a verified fact, so treat it as a claim with a source. ## What does each option cost for common jobs? On the catalogue endpoint, every successful query costs 1 credit and failed calls cost nothing, returning `X-Credits-Used: 0`. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. Brave's own rate is per 1,000 requests; compare its pricing page with ours rather than trusting a converted figure here, since both change. | Job | Queries a month | `/v1/brave/search` credits | | --- | --- | --- | | Prototype an agent | 100, once | 100 (the free credits on signup) | | 100 keywords daily, one engine | 3,000 | 3,000 | | 100 keywords daily on Brave, Google and Bing | 9,000 | 9,000 | | 1,000 agent questions, 2 searches each | 2,000 | 2,000 | Worked example: tracking 100 keywords daily on three engines is 100 × 3 × 30 = 9,000 queries at 1 credit each, so 9,000 credits a month, inside a Starter pack of 10,000 credits. Purchased credits last 12 months, and all engines draw on the same balance. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the request rates that come with each pack. ## Can an AI agent use Brave search through MCP? Both options have an MCP route. Brave publishes its own MCP server for its API. Perceptlayer's server at `https://perceptlayer.com/mcp` exposes three tools for the whole catalogue: `search_endpoints` and `get_endpoint` are free lookups, and `call_endpoint` runs `brave.search` or any other endpoint, spending credits only on success. The difference is how many servers the agent carries. With one server per engine, each adds its own tool definitions to the model's context. With one catalogue server, the agent searches for the engine it needs; our post on [MCP servers with too many tools](https://perceptlayer.com/blog/mcp-too-many-tools-context) explains why that keeps context small. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents), and errors come back with codes from the [errors docs](https://docs.perceptlayer.com/errors). To try the endpoint, [get a free API key](https://perceptlayer.com/signup) and run a query in the playground on the [Brave API page](https://perceptlayer.com/apis/brave). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Brave Search **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/brave) ## Frequently asked questions ### Does Brave have an official search API? Yes. Brave runs the Brave Search API on its own independent index, with a Search plan listed at $5 per 1,000 requests, a $5 monthly allowance per plan, and plans for Answers, Spellcheck and Autosuggest. It needs a card even for the free allowance. Its web search takes freshness, country, language and Goggles parameters. ### When should I use Brave's own API instead? When Brave is the only engine you need, or you need its filters: `freshness` for date ranges, `country` and `search_lang` for market targeting, Goggles for re-ranking, extra snippets for AI retrieval, or up to 50 requests a second. `/v1/brave/search` has none of those, only `query`, `language`, `page` and `include_html`. ### How much does /v1/brave/search cost? 1 credit per successful query, and failed calls cost nothing. Every account gets 100 free credits after verifying an email address, with no card. Prepaid packs start at 10,000 credits and are shared across every endpoint, including Google, Bing and DuckDuckGo search. The [pricing page](https://perceptlayer.com/pricing) has what credits cost. ### Can I filter Brave results by date with /v1/brave/search? No. The endpoint takes `query`, `language`, `page`, `include_html` and an optional `q`, with no date or country filter. For date filtering on Brave results, Brave's own API has `freshness`. On the same key, DuckDuckGo's endpoint takes a `df` filter for the past day, week, month or year. ### What happens if a Brave query fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`, and nothing is debited. A missing `query` or a `language` outside the allowed values returns `invalid_parameters` (422). Rate-limited (429) and temporarily unavailable (503) responses carry `Retry-After` with the seconds to wait. brave search search api serp web search ai agents ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 21 Aug 2026 Updated 6 Nov 2026 Perceptlayer 6 min read ## [DuckDuckGo Search API: Web Results as JSON](https://perceptlayer.com/blog/duckduckgo-search-api-json) DuckDuckGo's Instant Answer API returns topic summaries, not ranked links. GET /v1/duckduckgo/search returns organic results and paging at 1 credit per query. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Nov 2026 Perceptlayer 8 min read ## [Bing Scraper or API: Ten Result Types as JSON](https://perceptlayer.com/blog/bing-scraper-vs-api) A Bing scraper next to 10 Bing endpoints at 1 credit a call: a recorded web search with position, url and domain, and 0.1 credits per ranking tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Aug 2026 Perceptlayer 7 min read ## [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json) Call GET /v1/google-search/search for organic results as JSON at 1 credit a call. Parameters, a real recorded response and the cost in credits. --- title: "Normalise Prices Across Currencies and Sources in Python" description: "Parse '162,90 €' and $89.99 into Decimals, tag each price with its currency, convert with a dated ECB reference rate, and keep the original value for audit." url: https://perceptlayer.com/blog/normalize-prices-multiple-currencies --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Normalise Prices Across Currencies and Sources in Python 15 Aug 2026 Updated 2 Nov 2026 Perceptlayer 7 min read To normalise prices across currencies in Python, store every price as a `Decimal` with its ISO currency code, convert it with a reference rate for the date you collected it, and keep the original amount, currency, rate and rate date next to the converted figure. This guide does that for three recorded responses in three currencies: Idealo in euros, Walmart in US dollars and Mercado Libre in Argentine pesos, with a parser for strings like `162,90 €`. ## Key takeaways - All three recorded responses carry a numeric `price` and a `currency` code ( `EUR`, `USD`, `ARS`), so parse strings only where you must, such as Idealo's `shipping_costs` of `4,99 €`. - Walmart's recorded prices come back as both floats ( `89.99`) and integers ( `79`); convert through `Decimal(str(x))` so every amount has one type and no float error. - The ECB publishes euro reference rates for 29 currencies around 16:00 CET on working days; the Argentine peso isn't among them, so ARS needs a different source, such as the BCRA's reference rate. - Store `amount`, `currency`, `rate`, `rate_date` and the converted amount on every row; a conversion you can't trace can't be corrected. - German consumer prices include VAT by law and US shelf prices usually don't include sales tax, so a converted price comparison across those two still isn't like for like. ## What do the raw prices look like? Each source returns a number and a currency, plus a formatted string in some cases. That's the best starting point: parse the number, not the display text. The excerpts below are trimmed with `…`. The [Idealo search endpoint](https://perceptlayer.com/apis/idealo/search) returned German-formatted strings next to the number: ```json { "results": [ { "id": "203597427", "title": "Ninja AF500", "price": 162.9, "price_formatted": "162,90 €", "currency": "EUR", "offer_count": 80, "cheapest_offer": { "shop_name": "alza.de", "shipping_costs": "4,99 €", "shipping_is_free": false, … }, … }, … ] } ``` The [Walmart search endpoint](https://perceptlayer.com/apis/walmart/search) returns a bare number, and the type changes with the value: ```json { "data": { "results": [ { "us_item_id": "17268119743", "title": "Instant Pot 4QT VORTEX 6-in-1 Mini Air Fryer, …", "price": 89.99, "currency": "USD", … }, …, { "us_item_id": "14140920286", "title": "Thyme & Table 6 Quart Ceramic-Coated Air Fryer, Sand White", "price": 79, "currency": "USD", … } ] } } ``` The [Mercado Libre category products endpoint](https://perceptlayer.com/apis/mercadolibre/category-products) returns whole pesos, with the earlier price and a discount label: ```json { "data": { "site": "MLA", "products": [ { "item_id": "MLA1829410667", "price": 9208, "previous_price": 10963, "currency": "ARS", "discount_label": "16% OFF", … }, … ] } } ``` | Source | Price field | Type in the recording | Currency field | Formatted text | | --- | --- | --- | --- | --- | | Idealo | `price` | float | `currency` ( `EUR`) | `price_formatted`, `shipping_costs` | | Walmart | `price` | float or integer | `currency` ( `USD`) | none | | Mercado Libre | `price`, `previous_price` | integer | `currency` ( `ARS`) | `discount_label` | ## How do you parse price strings like "162,90 €"? Find the decimal separator from the string itself, strip the thousands separators, and return a `Decimal` with the currency the symbol implies. German, French and many other locales write a comma for decimals and a dot for thousands; US and UK formats do the opposite. A string with both marks settles it: whichever comes last is the decimal separator. ```python """Normalise prices from several sources to one currency, keeping the original for audit.""" import re from decimal import ROUND_HALF_EVEN, Decimal CENT = Decimal("0.01") def parse_price(text): """'162,90 €' -> (Decimal('162.90'), 'EUR'); '$1,234.56' -> (Decimal('1234.56'), 'USD').""" symbols = {"€": "EUR", "$": "USD", "£": "GBP"} currency = next((c for s, c in symbols.items() if s in text), None) digits = re.sub(r"[^\d.,]", "", text) if "," in digits and "." in digits: decimal_sep = "," if digits.rfind(",") > digits.rfind(".") else "." elif "," in digits: decimal_sep = "," if len(digits.rsplit(",", 1)[1]) == 2 else None elif "." in digits: decimal_sep = "." if len(digits.rsplit(".", 1)[1]) == 2 else None else: decimal_sep = None thousands = {",", "."} - {decimal_sep} for t in thousands: digits = digits.replace(t, "") if decimal_sep == ",": digits = digits.replace(",", ".") return Decimal(digits), currency ``` We ran it on strings from the recordings and a few of our own. `162,90 €` and `4,99 €` parsed to 162.90 and 4.99 EUR, `1.234,56 €` and `$1,234.56` both to 1234.56, and the Idealo characteristic `2.470` (watts) to 2470 with no currency. With a single separator and three digits after it, the function treats it as a thousands separator; that's right for prices, but `1,234` in a locale that means 1.234 would be misread, so keep the source's locale in mind. Symbols are ambiguous: `$` is used by many currencies, including the Argentine peso. Use the parser's currency only when the source gives no code, and prefer the `currency` field whenever there is one. ## How do you map each source onto one record? Write one small function per source that returns the same fields: source, ID, title, amount as a `Decimal`, ISO currency, shipping if known, and the original value as text. `Decimal(str(x))` matters: `Decimal(89.99)` would carry the float's binary error into every later sum, while `Decimal("89.99")` is exact. ```python def from_idealo(r): return {"source": "idealo", "id": r["id"], "title": r["title"], "amount": Decimal(str(r["price"])), "currency": r["currency"], "shipping": parse_price(r["cheapest_offer"]["shipping_costs"])[0] if r.get("cheapest_offer", {}).get("shipping_costs") else None, "original": r.get("price_formatted")} def from_walmart(r): return {"source": "walmart", "id": r["us_item_id"], "title": r["title"], "amount": Decimal(str(r["price"])), "currency": r["currency"], "shipping": None, "original": str(r["price"])} def from_mercadolibre(r): return {"source": "mercadolibre", "id": r["item_id"], "title": r["title"], "amount": Decimal(str(r["price"])), "currency": r["currency"], "shipping": None, "original": str(r["price"])} ``` Shipping is kept separate rather than added in. Idealo gives the cheapest offer's shipping; the Walmart and Mercado Libre search results don't carry a shipping amount, only, for Mercado Libre, text such as "Envío gratis" with a note that it applies to a first purchase. Comparing item prices plus shipping only where you know shipping would bias the comparison. ## Which exchange rate should you use? A published reference rate, for the date you collected the price, from a source you name. The ECB publishes euro foreign exchange reference rates for 29 currencies, usually around 16:00 CET on working days, and says they're for information purposes only ( [European Central Bank](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html), 2026). That's what price analysis needs: a consistent, citable daily rate, not the rate a bank would charge. The ECB's list doesn't include the Argentine peso. For ARS, the Banco Central de la República Argentina publishes a wholesale reference rate against the US dollar, known by its regulation, Communication A 3500, with historical series to download ( [BCRA](https://www.bcra.gob.ar/en/reference-exchange-rate-communication-a-3500-and-monthly-average-nominal-exchange-rate-tcnpm/), 2026). Convert ARS to USD with that, then USD to EUR with the ECB rate for the same date, and record both rates. ```python def to_eur(row, rates, rate_date): """rates: {(currency, date): units of currency per 1 EUR}, as the ECB publishes them.""" out = dict(row, target="EUR", rate_date=rate_date) if row["currency"] == "EUR": out.update(rate=Decimal(1), amount_eur=row["amount"].quantize(CENT)) return out rate = rates.get((row["currency"], rate_date)) if rate is None: out.update(rate=None, amount_eur=None) # no dated rate: leave it unconverted return out eur = (row["amount"] / rate).quantize(CENT, rounding=ROUND_HALF_EVEN) out.update(rate=rate, amount_eur=eur) return out ``` The function refuses to guess: a currency with no rate for that date stays unconverted, with `amount_eur` set to `None`. Load `rates` from the ECB's daily file or its data API, keyed by currency and date. Use the rate for the collection date, or the last published rate before it on weekends and holidays, and store which one you used. ## What does the normalised output look like? We ran the three mappers and `to_eur` on the recorded responses with one rate: 1.1193 US dollars per euro, the ECB reference rate for 23 October 2026. We read that figure from the ECB's published table through search results, not from its data feed, so check it against the ECB's file before you reuse it. We had no ARS rate loaded, so the Mercado Libre rows stayed unconverted, as designed. | Source | Product | Original | Amount | Currency | EUR | | --- | --- | --- | --- | --- | --- | | idealo | Ninja AF500 | `162,90 €` | 162.9 | EUR | 162.90 | | idealo | Philips NA221/00 | `76,30 €` | 76.3 | EUR | 76.30 | | walmart | Chefman Air Fryer 1500W, 6 Quart | `59.98` | 59.98 | USD | 53.59 | | walmart | Thyme & Table 6 Quart Ceramic-Coated Air Fryer | `79` | 79 | USD | 70.58 | | walmart | Instant Pot 4QT VORTEX Mini Air Fryer | `89.99` | 89.99 | USD | 80.40 | | mercadolibre | Barra Luz Led 50cm Recargable | `9208` | 9208 | ARS | none (no rate) | Every row keeps the original text, the parsed amount, the currency, and, in the full output, the rate and its date. If the rate turns out to be wrong, or you switch to a different rate source, you can recompute every converted figure without calling the APIs again. Load the rows into a table with those columns; [loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres) shows the pattern. ## Why is a converted price still not like for like? Because currency is only one difference. Taxes, shipping, product and market all differ, and none of them is fixed by an exchange rate. Normalise currency first, then decide which of the others your analysis must control for. Taxes are the largest. Germany's price indication rules require prices offered to consumers to be stated as total prices including VAT ( [PAngV § 3](https://www.gesetze-im-internet.de/pangv_2022/__3.html), 2026). US retail prices are usually shown before sales tax, which varies by state and city. So 162.90 EUR on Idealo and 53.59 EUR converted from Walmart differ by tax treatment as well as by product. Products need matching, too: the table compares different air fryers, not one model in two markets. And in a currency with fast-moving rates, converting a month of prices at one rate misstates every day but one, which is why the code keys rates by date. For matching the same product across sources, see [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources). ## What does collecting the prices cost? Each call to these endpoints costs 1 credit on success, and failed calls cost nothing and return `X-Credits-Used: 0`. Normalisation runs locally and costs nothing. The [credits docs](https://docs.perceptlayer.com/credits) explain billing; exchange rate files from the ECB and the BCRA are free. | Job | Calls a day | Credits a month (30 days) | | --- | --- | --- | | 1 query on each of 3 sources | 3 | 90 | | 10 queries on each of 3 sources | 30 | 900 | | 100 queries on each of 3 sources | 300 | 9,000 | Worked example: tracking 10 products on Idealo, Walmart and Mercado Libre daily is 10 × 3 × 30 = 900 credits a month. The 100 free credits cover its first 3 days, and a Starter pack of 10,000 credits covers the next 11 months. A hundred products is 9,000 credits a month, inside a Starter pack of 10,000 credits; purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. The source guides cover each endpoint's parameters: [Idealo](https://perceptlayer.com/blog/idealo-api-price-comparison-json), [Walmart](https://perceptlayer.com/blog/walmart-product-search-api) and [Mercado Libre](https://perceptlayer.com/blog/mercado-libre-api-product-search). To try the endpoints, [get a free API key](https://perceptlayer.com/signup) and run a search in the playground on the [Idealo API page](https://perceptlayer.com/apis/idealo), the [Walmart API page](https://perceptlayer.com/apis/walmart) or the [Mercado Libre API page](https://perceptlayer.com/apis/mercadolibre). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Idealo **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/idealo) - [Mercado Libre **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/mercadolibre) - [Walmart **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/walmart) ## Frequently asked questions ### How do I convert prices in different currencies in Python? Parse each price into a `Decimal`, attach its ISO currency code, and divide by a reference rate for the collection date, such as the ECB's euro rate. Round with `quantize(Decimal("0.01"))`. Keep the original amount, currency, rate and rate date on the row, so any conversion can be checked and recomputed later. ### Why use Decimal instead of float for prices? Floats can't represent most decimal fractions exactly, so sums and conversions drift by small amounts. `Decimal(str(89.99))` is exactly 89.99. Build `Decimal`s from strings, not floats: `Decimal(89.99)` carries the float's binary error into the result. Round only once, when you store or display the converted value. ### Which exchange rate source should I use? A published, dated reference rate you can cite. The ECB's euro reference rates cover 29 currencies on working days and are free; for currencies it doesn't publish, such as the Argentine peso, use that country's central bank, such as the BCRA's Communication A 3500 rate. Record which source and date you used for every row. ### How do I parse prices with commas as decimal separators? Look at the string: if it has both a comma and a dot, the one that comes last is the decimal separator. With only a comma followed by two digits, as in `162,90 €`, the comma is decimal. Remove the other separator, swap a decimal comma for a dot, and build a `Decimal`. ### Can I compare converted prices across countries directly? Not without caveats. German consumer prices include VAT by law, while US shelf prices usually exclude sales tax; shipping and the exact product also differ. Convert currency first, then adjust for tax and shipping where your analysis needs it, and compare matched products rather than similar ones. currency conversion price data python data engineering ecb ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 24 Sept 2026 Perceptlayer 7 min read ## [Fetch Incremental Data From an API: Only New Records](https://perceptlayer.com/blog/incremental-api-data-pulls) Fetch incremental data from an API: sort newest first, keep a high-water mark or seen-ID set per query, and stop paging early. Python, Craigslist and eBay. --- title: "AutoTrader UK API: Get Used Car Listings as JSON" description: "Search UK used car listings by postcode, make and price with one GET call. Real BMW response, 6 endpoints, 1 credit per call, failed calls free." url: https://perceptlayer.com/blog/autotrader-uk-api-listings-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # AutoTrader UK API: Get Used Car Listings as JSON 13 Aug 2026 Updated 10 Nov 2026 Perceptlayer 6 min read You can get AutoTrader UK listings as JSON without writing a scraper: call `GET /v1/autotrader-uk/search` with a UK `postcode` and an `X-API-Key` header, and you get listings with price, title, distance, images and a total result count. Each call costs 1 credit, and failed calls cost nothing. This guide shows the request, the parameters, a recorded response and the cost of paging through a whole search. ## Key takeaways - Reading every page of the recorded BMW search costs 2,146 credits, so filter before you page. - `GET /v1/autotrader-uk/search` needs only `postcode`; add `make`, `model`, price, year and mileage filters to narrow it. - A recorded BMW search returned `total_results` of 42,916 across `page_count` 2,146, so every response tells you how much more there is to fetch. - Six endpoints cover search, a single listing, facets, taxonomy, a dealer and a dealer's stock, all at 1 credit per call. - Failed calls return `X-Credits-Used: 0`, and the free tier gives you 100 credits on signup to try it. ## Is there an official AutoTrader UK API? We can't point you to one. We haven't verified what Auto Trader offers directly, so if you're a dealer managing your own adverts, ask Auto Trader about its partner options. To read public used-car search results for a postcode, the options are writing and maintaining a scraper, or calling an API that returns the listings as JSON. This article covers the second one. ## What does the AutoTrader UK API return? The AutoTrader UK API in the Perceptlayer catalogue has six endpoints, all `GET`, all 1 credit per call. The catalogue holds 480 websites and 2,782 endpoints in total, all returning JSON, and this is the [AutoTrader UK API](https://perceptlayer.com/apis/autotrader-uk) in the [Cars area](https://perceptlayer.com/verticals/cars). | Endpoint | Returns | Required parameters | | --- | --- | --- | | `/v1/autotrader-uk/search` | [Search](https://perceptlayer.com/apis/autotrader-uk/search) results | `postcode` | | `/v1/autotrader-uk/listing` | [One listing](https://perceptlayer.com/apis/autotrader-uk/listing) | `advert_id` | | `/v1/autotrader-uk/facets` | [Facets](https://perceptlayer.com/apis/autotrader-uk/facets) for a search | `postcode` | | `/v1/autotrader-uk/taxonomy` | [Taxonomy](https://perceptlayer.com/apis/autotrader-uk/taxonomy) | `postcode` | | `/v1/autotrader-uk/dealer` | [Dealer](https://perceptlayer.com/apis/autotrader-uk/dealer) details | `retailer_id` | | `/v1/autotrader-uk/dealer-listings` | [A dealer's listings](https://perceptlayer.com/apis/autotrader-uk/dealer-listings) | `postcode`, `retailer_id` | A typical flow: search to find candidates, then `listing` with an `advert_id` for one advert's detail. Use `facets` to see how a search breaks down, and `dealer-listings` to read one dealer's stock. ## How do you run a used car search? Send a `GET` to `/v1/autotrader-uk/search` with a postcode and your key. Keys start with `sk_live_` and go in the `X-API-Key` header; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the query-parameter option. [Get a free API key](https://perceptlayer.com/signup) if you don't have one. ```bash curl "https://api.perceptlayer.com/v1/autotrader-uk/search?postcode=SW1A1AA&price_search_type=total&make=BMW&sort=relevance&page=1" \ -H "X-API-Key: $API_KEY" ``` This searches BMWs around `SW1A1AA` and sorts by relevance. `price_search_type=total` asks for the total price rather than a monthly one. Only `postcode` is required, so you can drop everything else and get an unfiltered search. ### Which parameters does the search endpoint take? The search endpoint takes one required parameter and seventeen optional ones. Types and allowed values below are as documented; nothing else about them is documented, so check the [Search endpoint page](https://perceptlayer.com/apis/autotrader-uk/search) or try values in the playground. | Parameter | Type | Notes | | --- | --- | --- | | `postcode` | string, required | Up to 8 characters | | `price_search_type` | string | `total` or `monthly` | | `make` | string | Up to 100 characters | | `model` | string | Up to 100 characters | | `body_type` | string | Up to 100 characters | | `colour` | string | Up to 100 characters | | `transmission` | string | Up to 100 characters | | `seller_type` | string | `private` or `trade` | | `fuel_type[]` | list of string | Up to 50 characters per value | | `min_price`, `max_price` | integer | | | `min_year_manufactured`, `max_year_manufactured` | integer | | | `min_mileage`, `max_mileage` | integer | | | `distance` | integer | | | `sort` | string | `relevance`, `price_asc`, `price_desc`, `distance`, `mileage`, `year_dsc`, `year_asc`, `most_recent` | | `page` | integer | | `dealer-listings` takes the same filters plus a required `retailer_id`. ## What does a search response look like? A search response has three parts: `data.listings`, an array of adverts; `data.pagination`; and a `meta` block. This is a trimmed excerpt of a real recorded response for the BMW request above, with `…` marking what was cut. ```json { "success": true, "data": { "listings": [ { "advert_id": "202610227244889", "type": "NATURAL_LISTING", "title": "BMW X5", "sub_title": "3.0d SE Exclusive Edition Auto 4WD Euro 4 5dr", "price": { "amount": 2700, "currency": "GBP", "display": "£2,700" }, "vehicle_location": "Crawley (27 miles)", "distance": { "value": 27, "unit": "miles" }, "number_of_images": 16, "seller_type": "PRIVATE", "position": 1, "tracking_context": { "price": 2700, "make": "BMW", "model": "X5", "year": 2005, "condition": "used", "price_indicator": "NOANALYSIS" } }, … ], "pagination": { "page": 1, "page_count": 2146, "total_results": 42916, "has_more": true } }, "meta": { "duration_ms": 1129, "endpoint_family": "search" } } ``` ### What do the main fields mean? The fields you'll use most are in the table below. Meanings are read from the recorded values, not from separate documentation. | Field | Example | Use | | --- | --- | --- | | `advert_id` | `"202610227244889"` | The key for the `listing` endpoint | | `title`, `sub_title` | `"BMW X5"`, `"3.0d SE Exclusive Edition…"` | Model name and trim line | | `price.amount` | `2700` | Numeric price, in `price.currency` ( `GBP`) | | `price.display` | `"£2,700"` | The formatted string | | `distance.value`, `distance.unit` | `27`, `"miles"` | Distance from your postcode | | `seller_type` | `"PRIVATE"` | Private or trade seller | | `tracking_context.year` | `2005` | Year of the car | | `tracking_context.make`, `.model` | `"BMW"`, `"X5"` | Make and model as separate fields | | `images` | URLs containing `{resize}` | Photo URLs; the `{resize}` token is part of the returned string | | `number_of_images` | `16` | How many photos the advert has | | `position` | `1` | Rank within the results | Mileage, fuel type and the like aren't in the excerpt, so this guide doesn't describe them. Run a `listing` call in the playground on the [AutoTrader UK API page](https://perceptlayer.com/apis/autotrader-uk) to see what an individual advert carries. For which fields matter when you analyse prices, see [Used Car Listing Data: Fields for Price Analysis](https://perceptlayer.com/blog/used-car-listing-data-price-analysis). ## How do you narrow a search or list what's available? Add filters to cut a search down, or call `facets` to see how results break down before you filter. Both are the same 1 credit per call, and a narrower search means fewer pages to fetch. Here is a filtered search for automatic cars under £10,000 from trade sellers, newest first. ```bash curl -G "https://api.perceptlayer.com/v1/autotrader-uk/search" \ -d "postcode=SW1A1AA" \ -d "make=BMW" \ -d "transmission=Automatic" \ -d "seller_type=trade" \ -d "max_price=10000" \ -d "sort=most_recent" \ -H "X-API-Key: $API_KEY" ``` `transmission` is a free-text string, so check the accepted values against the facets before relying on one. For the breakdown, `facets` takes a `facets[]` list. Allowed values include `make`, `model`, `body_type`, `colour`, `fuel_type`, `transmission`, `seller_type`, `price`, `mileage` and `year_manufactured`, among others. ```bash curl -G "https://api.perceptlayer.com/v1/autotrader-uk/facets" \ -d "postcode=SW1A1AA" \ -d "facets[]=make" \ -d "facets[]=fuel_type" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a facets response for this article, so it doesn't quote one. The [Facets endpoint page](https://perceptlayer.com/apis/autotrader-uk/facets) has a playground. The `taxonomy` endpoint, which takes `postcode` and an optional `make`, is the place to look when you need valid make and model values. ## How do you page through all the results? Read `data.pagination` on every response and keep going while `has_more` is `true`. In the recorded search, `page_count` was 2,146 and `total_results` 42,916, so one call returns a page of a much larger set. Each page is a separate call at 1 credit. ```python import os import time import requests URL = "https://api.perceptlayer.com/v1/autotrader-uk/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} params = {"postcode": "SW1A1AA", "make": "BMW", "sort": "price_asc", "page": 1} max_pages = 5 # cap spend while you test listings = [] while params["page"] <= max_pages: resp = requests.get(URL, params=params, headers=HEADERS, timeout=30) if resp.status_code in (429, 503): time.sleep(int(resp.headers.get("Retry-After", "5"))) continue resp.raise_for_status() data = resp.json()["data"] listings.extend(data["listings"]) if not data["pagination"]["has_more"]: break params["page"] += 1 print(len(listings), "listings") ``` The `Retry-After` header carries the seconds to wait on a 429 or 503. For safer loops see [Paginate a Web Data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python), and for what a timed-out request can mean for billing, [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice). ## What does it cost? Every endpoint here costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`; every successful response carries `X-Credits-Used` and `X-Credits-Remaining`. The free tier gives you 100 credits once, after you verify an email address, with no credit card. Worked examples, using the recorded search: - Reading all 2,146 pages of that BMW search once: 2,146 pages × 1 credit = 2,146 credits. That is far more than the 100 free credits, so filter first. - Checking 200 adverts with `listing` after a search: 200 calls × 1 credit = 200 credits. - A daily 5-page search for one postcode over 30 days: 30 × 5 × 1 credit = 150 credits. Purchased credits last 12 months, with no subscription. The [credits docs](https://docs.perceptlayer.com/credits) explain billing, and [pricing](https://perceptlayer.com/pricing) shows what credits cost. Rate limits are per account; free accounts get 1 request a second, so a page loop needs the `Retry-After` handling above. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) and [errors docs](https://docs.perceptlayer.com/errors) cover the rest. ## What should you build next? Start with one postcode and one make, store `advert_id` with `price.amount` and a timestamp on each run, and compare runs. That gives you price movement for a model without scraping anything. If you're building an agent instead, the same endpoints are callable as tools over MCP; see the [AI agents docs](https://docs.perceptlayer.com/ai-agents). For other UK listings, see the [Rightmove API guide](https://perceptlayer.com/blog/rightmove-api-property-data). To try this call now, [get a free API key](https://perceptlayer.com/signup) and run the search in the playground on the [AutoTrader UK API page](https://perceptlayer.com/apis/autotrader-uk). ## APIs in this post - [AutoTrader UK **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/autotrader-uk) ## Frequently asked questions ### Does AutoTrader have a public API for listings? We can't confirm one, and we haven't verified what Auto Trader offers directly. To read public search results as JSON without a scraper, call the `search` endpoint described in this guide. ### How much does one AutoTrader UK API call cost? One credit for each of the six endpoints on a successful call. Failed calls cost nothing and return `X-Credits-Used: 0`. Free accounts get 100 credits once, on signup, enough for 100 search pages; 1,000 pages cost 1,000 credits. The [pricing page](https://perceptlayer.com/pricing) shows what credit packs cost. ### Can I get one dealer's stock? Yes. Call `/v1/autotrader-uk/dealer-listings` with a `postcode` and a `retailer_id`; it accepts the same filters as search, such as `make`, `max_price` and `sort`. Use `/v1/autotrader-uk/dealer` with the same `retailer_id` for the dealer's own details. ### What happens when a call fails or I hit the rate limit? Errors return an HTTP status and a JSON body with `error.code`, `message` and `request_id`. A 429 `rate_limited` or 503 `temporarily_unavailable` response includes `Retry-After` with the seconds to wait. A bad parameter returns 422 `invalid_parameters`. See the [errors docs](https://docs.perceptlayer.com/errors). ### Is it legal to use this data? Data is collected from publicly available sources and returned as found at the time of the call. Whether your use is allowed depends on what you do with it and on AutoTrader's terms and UK law, so check those for your case. UK copyright law has a narrow exception: [GOV.UK](https://www.gov.uk/guidance/exceptions-to-copyright) says researchers may copy material for computational analysis "if they already have the right to read the work", which doesn't cover commercial reuse. Perceptlayer can't give you legal advice. autotrader used cars car listings uk cars api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 8 min read ## [Autotrader Scraper or API: What You Get](https://perceptlayer.com/blog/autotrader-scraper-vs-api) An Autotrader UK scraper vs a 1-credit search call: a recorded BMW search near SW1A 1AA with 42,916 results, advert\_id, price.amount and year as JSON. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Oct 2026 Perceptlayer 7 min read ## [Cars.com API: Used Car Listings and Price Evaluations](https://perceptlayer.com/blog/cars-com-api-listings-price-evaluation) Search Cars.com listings with its six required parameters (zip, radius\_miles, stock\_type, sort, page, page\_size), then listing, dealer and price-eval calls. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [AutoScout24 API: Search European Car Listings as JSON](https://perceptlayer.com/blog/autoscout24-api-car-listings-json) Search AutoScout24 listings as JSON: make\_id and price filters, a recorded BMW response, and what a monthly price sweep costs in credits. --- title: "Cache API Responses in Python: TTLs and Credit Savings" description: "A SQLite cache for API responses, keyed on endpoint and parameters, with per-endpoint TTLs and the credits each cache hit saves." url: https://perceptlayer.com/blog/cache-web-data-api-responses --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Cache API Responses in Python: TTLs and Credit Savings 13 Aug 2026 Perceptlayer 10 min read To cache API responses in Python, hash the endpoint path and the normalised parameters into a key, store the JSON body in SQLite with a timestamp, and serve it again until a per-endpoint TTL expires. Only successful responses go in the cache. On a prepaid API where a successful call costs 1 credit, every cache hit is a credit you don't spend. This tutorial builds that cache in a short script, wires it to the Google Search API, and works through the credit arithmetic on a repeated-query workload. ## Key takeaways - Key the cache on the endpoint path plus the sorted, non-empty parameters. Leave the API key out of the key. - Set TTLs per data type, not globally. The values here (24 hours, 6 hours, 1 hour) are our starting choices; tune them to how old an answer can be before it misleads you. - Cache only HTTP 200 responses. Failed calls cost 0 credits and shouldn't be remembered. - In a hypothetical workload of 10,000 requests over 2,000 distinct queries, the cost falls from 10,000 credits to 2,000 (see [pricing](https://perceptlayer.com/pricing) for what credits cost) only if every repeat arrives within one TTL window. That is a best case, not a measured result. - Bypass the cache when the use case is the change itself, such as rank tracking or monitoring. ## Why cache web data API responses at all? Because repeated requests for the same data are the cheapest ones to remove. Each successful call to the [Google Search API](https://perceptlayer.com/apis/google-search) costs 1 credit, so ten identical calls cost 10 credits and return the same answer ten times. A cache turns the second to tenth call into a local read with no network call that costs 0 credits. Caching also protects you from your own code. Agents loop, retry and re-ask. Dashboards refresh. Batch jobs restart after a crash and replay the first half of their input. A cache absorbs all of that without a code change at the call sites. For spend caps on agents specifically, see [AI Agent API Cost Control: Cap Web Data Spend](https://perceptlayer.com/blog/ai-agent-web-data-costs). The idea isn't new. HTTP caching rules in [RFC 9111](https://www.rfc-editor.org/rfc/rfc9111) describe freshness lifetimes and revalidation for exactly this reason. We're building the client-side version of the same contract, with the freshness lifetime decided by you per endpoint. ## What goes into the cache key? The key must identify the request, and nothing else. For a GET API that means the endpoint path and the query parameters, normalised so that the same request always hashes to the same value. Parameter order, unset parameters and the API key shouldn't change the key; any parameter that changes the answer, such as `hl`, `gl` or `page`, must. Three rules cover it: 1. **Sort parameters** by name, so `hl=en&query=x` and `query=x&hl=en` match. 2. **Drop `None` values**, so passing `gl=None` equals omitting `gl`. 3. **Exclude the `X-API-Key` header.** Rotating a key shouldn't empty your cache, and the key must never end up in a database file. The part people get wrong is over-normalising. Lowercasing a query or trimming it usually merges requests that return the same results, but you're asserting that, not the API. Strip surrounding whitespace, which is safe, and decide about case from your own data. The code below leaves case alone. ## How do you pick a TTL for each data type? Set the TTL to how long the answer stays useful to your application, not to how long the source stays the same. The numbers below are our own starting choices for this tutorial, not measurements of how often search results change and not Perceptlayer guarantees. The data is returned as found at the time of the call. | Endpoint | Returns | Starting TTL | Reasoning | | --- | --- | --- | --- | | `/v1/google-search/search-light-autocomplete` | Search Light Autocomplete | 24 hours | Short suggestion lists; a day-old list is usually fine for a research script | | `/v1/google-search/search-light` | Search Light | 6 hours | A few hours of lag is acceptable for most research jobs | | `/v1/google-search/search` | Search | 6 hours | Same choice, richer response | | `/v1/google-search/search-ai-overview` | Search Ai Overview | 1 hour | Shortest TTL, because we'd rather re-check generated answers sooner | Each of these endpoints costs 1 credit per successful call, so the TTL is the only thing that differs between them. Tune it by asking one question per endpoint: what is the cost of showing someone an answer that is this old? If the honest answer is "nothing", lengthen it. If it's "a wrong decision", shorten it or skip the cache, as covered further down. ## How do you build the cache in Python? Use SQLite from the standard library. It gives you a persistent file, atomic writes and no extra service, and it survives restarts, which an in-process dictionary doesn't. The [sqlite3 module documentation](https://docs.python.org/3/library/sqlite3.html) covers everything used here. If you want a drop-in cache for `requests` with no custom code, the [requests-cache](https://github.com/requests-cache/requests-cache) library fits better than writing your own. This version adds what a prepaid API needs on top: credit accounting per hit and miss, and a TTL map keyed on endpoint path with a 200-only write rule. You need the `requests` package and your key in the `API_KEY` environment variable; [get a free API key](https://perceptlayer.com/signup) if you don't have one. ### Step 1: Create the store One table holds the key, the body, the time it was fetched and the credits the call cost. Storing the cost lets the cache report what it saved. ```python import hashlib import json import os import sqlite3 import time import requests BASE_URL = "https://api.perceptlayer.com" API_KEY = os.environ["API_KEY"] TTL_SECONDS = { "/v1/google-search/search-light-autocomplete": 24 * 3600, "/v1/google-search/search-light": 6 * 3600, "/v1/google-search/search": 6 * 3600, "/v1/google-search/search-ai-overview": 3600, } db = sqlite3.connect("api_cache.sqlite") db.execute( """CREATE TABLE IF NOT EXISTS cache ( key TEXT PRIMARY KEY, body TEXT NOT NULL, fetched_at REAL NOT NULL, credits INTEGER NOT NULL )""" ) stats = {"hits": 0, "misses": 0, "credits_spent": 0, "credits_saved": 0} ``` ### Step 2: Build the key The key hashes the path and the cleaned parameters. A fixed JSON encoding with sorted keys keeps it stable. ```python def cache_key(path, params): clean = {k: str(v).strip() for k, v in params.items() if v is not None} raw = json.dumps([path, sorted(clean.items())], separators=(",", ":")) return hashlib.sha256(raw.encode()).hexdigest() ``` ### Step 3: Read, call, write The function checks the cache first, calls the API on a miss, and stores the body only when the status is exactly 200. Errors raise, which keeps them out of the cache and costs nothing: failed calls return `X-Credits-Used: 0`. Any other 2xx status is returned to the caller but not cached. The `fresh=True` flag skips the read but still writes, so a forced refresh updates the entry. ```python def cached_get(path, fresh=False, **params): ttl = TTL_SECONDS.get(path, 0) key = cache_key(path, params) if ttl and not fresh: row = db.execute( "SELECT body, fetched_at, credits FROM cache WHERE key = ?", (key,) ).fetchone() if row and time.time() - row[1] < ttl: stats["hits"] += 1 stats["credits_saved"] += row[2] return json.loads(row[0]) resp = requests.get( BASE_URL + path, params={k: v for k, v in params.items() if v is not None}, headers={"X-API-Key": API_KEY}, timeout=30, ) resp.raise_for_status() credits = int(resp.headers.get("X-Credits-Used", 1)) stats["misses"] += 1 stats["credits_spent"] += credits if ttl and resp.status_code == 200: db.execute( "INSERT OR REPLACE INTO cache VALUES (?, ?, ?, ?)", (key, resp.text, time.time(), credits), ) db.commit() return resp.json() ``` Endpoints missing from `TTL_SECONDS` get a TTL of 0 and are never cached, which is a safe default for anything you haven't thought about yet. ### Step 4: Call it Use it exactly like the plain request. This is the recorded request from our [Search endpoint](https://perceptlayer.com/apis/google-search/search) page, now going through the cache. ```python data = cached_get( "/v1/google-search/search", query="best restaurants in Berlin", hl="en", safe="off", ) print(data["search_information"]["organic_results_count"]) print(stats) ``` The response is the same JSON you'd get without the cache. A trimmed excerpt of the recorded response: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", … ``` Run the script twice and `stats` shows one miss on the first run. On the second run, in a new process, the call is a hit, because the file persists. The `X-Credits-Remaining` header on your first call lets you confirm that the second one didn't move your balance. ## How much does caching actually save? Savings are the number of requests you no longer send, multiplied by the credits per call. With a successful call at 1 credit, you can work it out before writing any code. The workload below is a hypothetical we chose to show the arithmetic, not a measurement. Say a job makes 10,000 requests spread over 2,000 distinct queries, so each query is asked five times on average. The last row assumes every repeat of a query arrives within one TTL window of its first call, which makes it a best case and an upper bound on the saving. A job spread over a month with a 6-hour TTL would land between the last two rows or worse. The "40% of repeats expire" row is an assumption to show the effect of a short TTL, not an observed rate. | Scenario | Calls that reach the API | Credits | | --- | --- | --- | | No cache | 10,000 | 10,000 × 1 = 10,000 | | Cache, TTL too short (40% of repeats expire) | 2,000 + 0.4 × 8,000 = 5,200 | 5,200 × 1 = 5,200 | | Cache, every repeat within one TTL window (best case) | 2,000 | 2,000 × 1 = 2,000 | The last row saves 8,000 credits. The best case uses 2,000 credits, which fits inside the Starter pack of 10,000 credits; the uncached run uses all of it. The credits you keep are the same whichever pack you buy, and [pricing](https://perceptlayer.com/pricing) shows what each pack costs. The middle row is the one to watch. A TTL that expires before the next repeat arrives behaves like no cache for those requests. Log the gap between repeats of the same key for a week, then set the TTL just above the typical gap. For plan sizing, the free allowance is 100 credits, granted once at signup; see [pricing](https://perceptlayer.com/pricing) and the [credits section of the docs](https://docs.perceptlayer.com/credits). ## When is stale data the wrong trade? Stale data is the wrong trade whenever the change is the thing you are measuring, or whenever a decision depends on the current state. A cache that serves a six-hour-old results page is correct for a research script and wrong for a rank tracker, which exists to notice that a result moved. Skip or shorten the cache in these cases: - **Monitoring and alerting.** If you compare today's results to yesterday's, a cache hit makes them identical and hides the change. Pass `fresh=True`. - **Time-sensitive queries.** News, prices and availability go out of date faster than a generic TTL assumes. - **Agent answers shown to a user as current.** Cache the lookup if you like, but pass the age along so the answer can say how old it is. - **After a known change.** If you know the underlying data moved, evict the entry instead of waiting out the TTL. Eviction is a single DELETE. Remove one entry by its key, and purge every row older than its TTL so the file doesn't grow without bound: ```python def evict(path, **params): db.execute("DELETE FROM cache WHERE key = ?", (cache_key(path, params),)) db.commit() def purge_expired(): # Keys are hashes, so rows don't record their path. The longest TTL is # the cutoff: anything older is expired for every endpoint. cutoff = time.time() - max(TTL_SECONDS.values()) db.execute("DELETE FROM cache WHERE fetched_at < ?", (cutoff,)) db.commit() ``` Rows younger than the longest TTL but older than their own endpoint's TTL stay in the file until a lookup finds them expired and `INSERT OR REPLACE` overwrites them, so the purge is a size control, not a freshness check. A middle path is storing `fetched_at` with every hit and exposing it. A caller who sees "fetched 5 hours ago" can choose to refresh. That costs one extra field in your return value and avoids silent staleness. ## What should the cache never store? Never store errors, and never let the cache hide an error from your caller. Failures come back as an HTTP status with a JSON body of the form `{"error": {"code", "message", "request_id"}}`, and they cost nothing. The code above raises on any non-2xx status before reaching the write, so a 429 or a 503 can't poison the cache for six hours. Handle those errors where the call is made. A 429 or 503 carries a `Retry-After` header with the seconds to wait, and an `insufficient_credits` (402) means the balance is empty and nothing is debited. The [errors section of the docs](https://docs.perceptlayer.com/errors) lists every code. One more trap: a request whose reply was lost, such as a client timeout, may have succeeded and been billed, because requests carry no idempotency key. A cache gives you a partial fix for free. If the retry happens after a successful write for the same key, the retry is a hit. But when the original reply never arrived, nothing was written, and the retry pays again. [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers that case. Caching also pairs with paging. Each page is its own key because `page` is part of the parameters, so a restarted crawl skips pages it already holds. See [Paginate a Web Data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## How do you check the cache is working? Read the counters, then read the balance. `stats` tells you hits, misses and the credits saved per run, and a hit rate that is lower than your repeat rate means the TTL is too short or your key includes something that varies. Compare against the `X-Credits-Remaining` header on a miss to confirm the balance moves only when a call reaches the API. A short report at the end of a job is enough: ```python total = stats["hits"] + stats["misses"] rate = stats["hits"] / total if total else 0 print(f"hit rate {rate:.0%}, spent {stats['credits_spent']} credits, " f"saved {stats['credits_saved']}") ``` If the hit rate is near zero on a workload you know repeats, print `cache_key(path, params)` for two requests that should match. A stray timestamp or request ID in the parameters is the usual cause. Next step: run your own repeated-query job through `cached_get`, log the gap between repeats, and set each TTL just above it. The [Google Search API page](https://perceptlayer.com/apis/google-search) has a playground for trying parameters before you hard-code them, and the [data engineering category](https://perceptlayer.com/blog/category/data-engineering) has more on running pipelines on web data. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How long should I cache Google Search API responses? It depends on the endpoint and the use. Our starting choices in this tutorial are 24 hours for autocomplete, 6 hours for search results and 1 hour for AI overviews; they are defaults to adjust, not measured figures. Measure the gap between repeats of the same query and set the TTL just above it. Data is returned as found at the time of the call, so the TTL is your freshness decision. ### Do cache hits cost credits? No. A hit is served from your own SQLite file and never reaches the API, so nothing is debited. Only a successful call costs the credits shown on its endpoint, which is 1 credit for the Google Search endpoints. Failed calls cost nothing and return `X-Credits-Used: 0`, so neither a miss that errors nor a hit adds to your bill. ### Should I cache error responses? No. Errors such as `rate_limited` (429) or `temporarily_unavailable` (503) are temporary, and caching one would repeat the failure until the TTL ran out. The code here writes to the cache only after a successful response. Let the caller see the error and retry using the `Retry-After` header. ### Is a SQLite file enough, or do I need Redis? SQLite fits a single script or one worker, and it persists across restarts with no service to run. If several machines share one cache, or you want automatic eviction, use a shared store such as Redis. The key design and TTL logic stay the same; only the read and write calls change. caching python ttl cost control google search ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 5 Oct 2026 Perceptlayer 8 min read ## [Concurrent API Requests in Python: Asyncio Under Rate Limits](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) A Python asyncio fetcher that paces calls to your per-second limit, honours Retry-After and prices a 20,000-call batch at 20,000 credits. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "Walmart Product Search API: Prices and Product Data" description: "Search Walmart by keyword and get price, rating, seller and stock as JSON with GET /v1/walmart/search. Parameters, a real response and a credit count." url: https://perceptlayer.com/blog/walmart-product-search-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Walmart Product Search API: Prices and Product Data 13 Aug 2026 Updated 26 Oct 2026 Perceptlayer 7 min read Call `GET /v1/walmart/search` with a `query` and you get Walmart search results as JSON: item ID, title, price, rating, review count, seller and stock status. Call `GET /v1/walmart/product` with a `us_item_id` to look up one item. Each successful call costs 1 credit, and failed calls cost nothing. This guide covers both endpoints, every parameter, a recorded response and the credit cost of a 10,000-product pass. ## Key takeaways - `GET /v1/walmart/search` needs only `query`; `page`, `sort`, `min_price`, `max_price`, `cat_id` and `facet_filter` are optional. - `GET /v1/walmart/product` takes one required parameter, `us_item_id`, which is the `us_item_id` field every search result carries. - Both endpoints cost 1 credit per successful call, so a detail lookup for 10,000 products costs 10,000 credits. - The search response already includes `price`, `rating`, `reviews`, `seller_name` and `availability_status`, so many price-monitoring jobs never need the detail call. - Failed calls return `X-Credits-Used: 0`, and the free tier gives 100 credits on signup with no credit card. ## Why is there a gap between Walmart's own APIs and a product search API? Walmart's [affiliate programme](https://affiliates.walmart.com/) is built for publishers: it lets them "earn commission by connecting your audience to products they love", with link generation and data feeds in its Affiliate Member Center (Walmart, 2026). Walmart's [developer portal](https://developer.walmart.com/) is aimed at marketplace sellers, solutions providers, first-party suppliers, carriers and advertising partners, to manage items, prices, orders and ads (Walmart, 2026). Both are built for partners, not for someone who just wants search results with prices and stock as JSON. If you are a publisher earning commission, start with the affiliate programme. If you sell on Walmart, the developer portal is the place. If you are a data team or agent builder who needs search results across a catalogue, that is the job of the [Walmart API](https://perceptlayer.com/apis/walmart): two endpoints, a free key, and JSON back. It is part of the [Marketplaces APIs](https://perceptlayer.com/verticals/marketplaces). Data is collected from publicly available sources and returned as found at the time of the call. ## How do you search Walmart products with one request? Send a GET request to `/v1/walmart/search` with the `query` parameter and your key in the `X-API-Key` header. The response is JSON with a `results` array, a `search_metadata` object and a `pagination` object. `query` can be up to 500 characters. Everything else is optional. ```bash curl "https://api.perceptlayer.com/v1/walmart/search?query=coffee+maker" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. If a header isn't possible, the `api_key` query parameter works too. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both, and the [quick start](https://docs.perceptlayer.com/quickstart) takes you from sign-up to a first call. You can also run the call in the playground on the [Walmart search endpoint page](https://perceptlayer.com/apis/walmart/search) before writing code. ## Which parameters does the search endpoint take? The search endpoint takes one required parameter, `query`, and six optional ones for paging, sorting, price bounds, category and facet filters. Types and limits below are the only ones documented, so this guide doesn't state defaults or page sizes. If you need a page size, read it from a real response rather than assuming. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | Up to 500 characters | | `page` | integer | no | Page of results to return | | `sort` | string | no | One of `best_match`, `price_low`, `price_high`, `rating_high`, `new` | | `min_price` | integer | no | Lower price bound | | `max_price` | integer | no | Upper price bound | | `cat_id` | string | no | Category ID, up to 64 characters | | `facet_filter` | string | no | Up to 2,000 characters | A price-bounded, cheapest-first search looks like this: ```bash curl "https://api.perceptlayer.com/v1/walmart/search?query=air+fryer&sort=price_low&min_price=20&max_price=80" \ -H "X-API-Key: $API_KEY" ``` Bad values come back as `invalid_parameters` (422), with a `request_id` you can quote. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does a search response look like? A successful search returns `success: true`, a `data` object and a `meta` object. Inside `data`, `search_metadata` echoes your query, page and sort and reports `total_items`; `results` holds one object per product; `pagination` tells you whether to keep going. This excerpt is from a recorded call for `query=air+fryer`, trimmed to the first result with its `thumbnail` URL shortened ( `…` marks each cut): ```json { "success": true, "data": { "search_metadata": { "query": "air fryer", "page": 1, "sort": "best_match", "total_items": 72 }, "results": [ { "us_item_id": "17268119743", "title": "Instant Pot 4QT VORTEX 6-in-1 Mini Air Fryer, Air fry, Bake, Roast, Broil, Dehydrate or Reheat, Black, 4 Quarts", "price": 89.99, "currency": "USD", "rating": 4.4, "reviews": 87, "seller_name": "Walmart.com", "availability_status": "IN_STOCK", "thumbnail": "https://i5.walmartimages.com/seo/Instant-Pot-4QT-VORTEX-6-in-1-Mini-Air-Fryer-…", "product_page_url": "https://www.walmart.com/ip/17268119743", "out_of_stock": false, "sponsored": true }, … ], "pagination": { "current_page": 1, "max_page": 13, "has_more": true } }, "meta": { "endpoint_family": "search", "duration_ms": 4134, "attempts": 2 } } ``` Two fields are worth checking before you rely on the data. Both recorded results show `sponsored: true`, so look at that flag before treating the order as organic ranking. `seller_name` is `Walmart.com` in both. Check it across your own queries to see what other values appear. The `thumbnail` field is an image URL. ## How do you look up a single Walmart product? Pass the `us_item_id` from a search result to `GET /v1/walmart/product`. It's the only parameter, it's required, and it can be up to 32 characters. The call returns the Product record for that item and costs 1 credit, the same as a search page. ```bash curl "https://api.perceptlayer.com/v1/walmart/product?us_item_id=17268119743" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a product response for this guide, so we won't show one here. The [Walmart product endpoint page](https://perceptlayer.com/apis/walmart/product) lists what it returns, and the playground there runs a real call with your key. In the recorded results, the `us_item_id` is also the last part of each `product_page_url` ( `https://www.walmart.com/ip/`), which helps if you already hold product links and want to skip search. ## What is the search-then-detail pattern? Run a search to discover item IDs and headline fields, then call the product endpoint only for items you need more about. A search page costs 1 credit and a detail lookup costs 1 credit for a single item, so search is cheaper per product only if a page holds more than one item. The page size isn't documented, and the recorded excerpt shows only two results, so measure items per page on your own queries before you decide how much to lean on search. Here is a Python loop that walks every page of a search using the `has_more` flag from the response, collecting item IDs: ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def search_all(query, **filters): page, items = 1, [] while True: r = requests.get( f"{BASE}/v1/walmart/search", headers=HEADERS, params={"query": query, "page": page, **filters}, timeout=60, ) r.raise_for_status() data = r.json()["data"] items.extend(data["results"]) if not data["pagination"]["has_more"]: return items page += 1 items = search_all("air fryer", sort="price_low") organic = [i for i in items if not i["sponsored"]] print(len(items), len(organic)) ``` For retries and page-loop safety, see [safe page loops in Python](https://perceptlayer.com/blog/paginate-web-data-api-python) and [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice). A timed-out request may have succeeded and been billed, because requests have no idempotency key. ## What does a 10,000-product catalogue pass cost? A detail lookup for 10,000 products costs 10,000 calls × 1 credit = 10,000 credits, which equals the Starter pack exactly. The discovery step is extra: every search page is 1 credit. The recorded `air fryer` search reported `max_page` 13, so walking that one query end to end costs 13 credits. | Step | Calls | Credits per call | Credits | | --- | --- | --- | --- | | Walk one query (the recorded example, 13 pages) | 13 | 1 | 13 | | Detail lookup for 10,000 items | 10,000 | 1 | 10,000 | | Search-only refresh of 10,000 items | ⌈10,000 ÷ items per page⌉ | 1 | the same number, measured on your own queries | The third row is a formula, not a figure. Items per page isn't documented, so count it in a real response and divide 10,000 by that number to get the credits for a search-only refresh. A single query also reports only so many items (72 in the recorded call), so reaching 10,000 products takes many queries, and the same product can appear in more than one. Search results already carry `price`, `availability_status`, `rating` and `reviews`, so a price monitor can refresh from search pages and call the product endpoint only when a field you need is missing. The [credits docs](https://docs.perceptlayer.com/credits) explain billing, and [pricing](https://perceptlayer.com/pricing) shows what credits cost. Purchased credits last 12 months, with no subscription. At 1 request a second on the free tier, 10,000 sequential detail calls take about 10,000 seconds, so plan for the [rate limits](https://docs.perceptlayer.com/rate-limits). Paid packs include higher rates. A 429 carries a `Retry-After` header, and you should wait that many seconds. ## Can an AI agent call the Walmart endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. An agent finds the Walmart endpoints in the catalogue for free, then calls them with the same parameters as above. Only a successful `call_endpoint` spends credits, and the result reports credits used and remaining. In Claude Code, add it with one command: ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` A shopping agent can then search, filter out `sponsored` items and fetch one product for a final check. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup. For the same pattern on a different source, see [eBay search results as JSON](https://perceptlayer.com/blog/ebay-item-search-data-json). Next step: [get a free API key](https://perceptlayer.com/signup), run `query=coffee+maker` in the playground on the [Walmart API page](https://perceptlayer.com/apis/walmart), then copy the cURL call into your own code. ## APIs in this post - [Walmart **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/walmart) ## Frequently asked questions ### How many credits does a Walmart search cost? A successful call to `GET /v1/walmart/search` costs 1 credit, and so does `GET /v1/walmart/product`. A failed call costs nothing and returns `X-Credits-Used: 0`. Every successful response also carries `X-Credits-Remaining`, so you can track your balance. The free tier gives 100 credits on signup. ### Does the API return Walmart prices in dollars? Each search result carries a numeric `price` and a `currency` field; the recorded sample shows `USD`. Prices are returned as found at the time of the call, so they can change between a search and a later product lookup. Store the call time next to the price if you track history. ### How do I get the next page of Walmart results? Check `data.pagination.has_more`. When it is true, repeat the same request with `page` increased by one. The response also gives `current_page` and `max_page`, and the recorded example reported 13 pages. Each page is a separate call that costs 1 credit. ### What happens if I run out of credits mid-run? The service is prepaid, so calls return `insufficient_credits` (402) once the balance is gone, and nothing more is debited. There's no automatic top-up. Check `X-Credits-Remaining` during long loops and stop cleanly; the [errors docs](https://docs.perceptlayer.com/errors) list the codes to handle. ### Can I use this instead of Walmart's official API? It depends on your use. If you earn commission through Walmart links, start with Walmart's own [affiliate programme](https://affiliates.walmart.com/). If you sell on Walmart, see its [developer portal](https://developer.walmart.com/). If you need product data for analysis, monitoring or an agent, a keyed JSON endpoint is the more direct path. ### Should I build a Walmart scraper instead? A Walmart scraper means maintaining selectors for product and search pages, handling blocks, and following Walmart's terms. The search endpoint returns price, rating, seller and stock as named JSON fields for 1 credit per successful call, with nothing charged for failures. Build your own only for a page the endpoints don't cover, and check the response in the playground first. walmart product search ecommerce pricing data marketplaces ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 8 min read ## [AliExpress Scraper or API: What You Get](https://perceptlayer.com/blog/aliexpress-scraper-vs-api) An AliExpress scraper vs 1-credit endpoints: a recorded search with 60 products a page, price.amount, sold\_count and is\_sponsored, and cost per product. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Oct 2026 Perceptlayer 9 min read ## [Walmart Scraper or API: Price, Stock and Seller Data](https://perceptlayer.com/blog/walmart-scraper-vs-api) Compare a Walmart scraper with Walmart search and product calls at 1 credit each: a recorded air fryer search with price, seller\_name and availability\_status. --- title: "Google Maps Business Data API: Search Places as JSON" description: "One GET to simple-search returns places as JSON: name, rating, review_count, address, phone and business_id. Parameters, a real response, 1 credit per call." url: https://perceptlayer.com/blog/google-maps-business-data-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Maps Business Data API: Search Places as JSON 10 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read To get Google Maps business data as JSON, call `GET /v1/google-maps/simple-search` with a `query` such as `restaurants in new york`. You get back an `items` array where each place carries its name, rating, review count, address, phone numbers, coordinates and a `business_id`. One successful call costs 1 credit, and a failed call costs nothing. ## Key takeaways - `simple-search` has one required parameter, `query`, and returns each place with fields like `name`, `rating`, `review_count`, `full_address`, `phone_numbers` and `business_id`. - Pass a place's `business_id` to `business-details`, `photos` or `reviews` to go from a search hit to the full record. - The Google Maps API has 12 endpoints. Each costs 1 credit per successful call, except `reviews`, which costs 1 per page fetched. - 10,000 search calls × 1 credit = 10,000 credits, which is the size of the Starter pack; [pricing](https://perceptlayer.com/pricing) shows what credits cost. - Every account gets 100 free credits after email verification, with no credit card. ## How do you search Google Maps places as JSON? Send a GET request to `/v1/google-maps/simple-search` with your key in the `X-API-Key` header and a `query` parameter. The query is free text, the same words you'd type into the Maps search box. The response is JSON with a top-level `items` array, one object per place. Here is the call we recorded: ```bash curl "https://api.perceptlayer.com/v1/google-maps/simple-search?query=restaurants+in+new+york" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. If you don't have one yet, [get a free API key](https://perceptlayer.com/signup); the [quick start](https://docs.perceptlayer.com/quickstart) covers the first call, and [authentication](https://docs.perceptlayer.com/authentication) covers the header and the `api_key` query parameter for places where you can't set headers. The same request in Python: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/google-maps/simple-search", params={"query": "restaurants in new york"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) resp.raise_for_status() for place in resp.json()["items"]: print(place["name"], place["business_id"], place.get("rating"), place.get("review_count")) print("credits used:", resp.headers["X-Credits-Used"]) print("credits left:", resp.headers["X-Credits-Remaining"]) ``` The two credit headers come back on every successful response, so you can track spend without a separate call. You can also run the same request without writing code in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps). ## Which parameters does the search endpoint take? `simple-search` takes one required parameter, `query`, and six optional ones: `hl`, `gl`, `google_domain`, `limit`, `page` and `fields`. The table below lists all of them with the types from the endpoint's documentation. Nothing else is documented about them, so we don't state defaults or page sizes here. The response's `pagination` block, covered below, tells you where you are in the results; check `limit` in the playground on your query. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | What to search for, for example `restaurants in new york` | | `hl` | string | no | | | `gl` | string | no | | | `google_domain` | string | no | Up to 100 characters | | `limit` | integer | no | | | `page` | integer | no | | | `fields` | string | no | | Put the location in the query itself. The recorded call used `restaurants in new york`, and the first two results both came back with `district` set to Manhattan. If you need to search around specific coordinates, the [Advanced Search endpoint](https://perceptlayer.com/apis/google-maps/advanced-search) takes `lat`, `lon` and a required `zoom` alongside `query`. ### Which endpoint should you start with? Start with `simple-search` when you have a text query and want a list of businesses. Use `advanced-search` when your starting point is a map position rather than words. Use [Autocomplete](https://perceptlayer.com/apis/google-maps/autocomplete) when you're building a search box and want suggestions as someone types. All three cost 1 credit per call. ## What does a Google Maps search response look like? Each object in `items` is one business, and the recorded sample carries identity, location, contact and reputation fields in a flat structure. This is a trimmed excerpt of the real response from the call above, with `…` marking what we cut: ```json { "items": [ { "name": "Altair Restaurant NYC", "review_count": 1225, "rating": 4.8, "website": "https://www.altairnyc.com/", "domain": "altairnyc.com", "latitude": 40.7556565, "longitude": -73.9936282, "business_id": "0x89c2591598891521:0x4ebcde18610e64", "subtypes": [ "New American restaurant", "Restaurant" ], "district": "Manhattan", "full_address": "351 W 38th St, New York, NY 10018, United States", "timezone": "America/New_York", … "phone_numbers": [ "+1 929-561-6131" ], "place_id": "ChIJIRWJmBVZwokRZA5hGN68TgA=", … "city": "New York", "zip_code": "10018", "state": "New York", "country_code": "US", … }, … ] } ``` The fields group like this: | Group | Fields in the recorded response | | --- | --- | | Identity | `name`, `business_id`, `place_id`, `google_mid`, `subtypes` | | Reputation | `rating`, `review_count` | | Location | `latitude`, `longitude`, `full_address`, `street_address_full`, `city`, `state`, `zip_code`, `country_code`, `district`, `neighborhood`, `timezone` | | Contact | `website`, `domain`, `phone_numbers`, `order_link` | | Owner | `owner_id`, `owner_name`, `owner_link` | | Media and attributes | `photos_sample` (with `photo_id`, `photo_url`, `photo_url_large`), `attributes` | The second result in the same recording, Lulla NYC, has the same shape: an Italian restaurant with 1,571 reviews and a 4.8 rating. Both items carry `photos_sample` and an `attributes` object (in the recording, an `accessibility` group of wheelchair-access flags). Still, treat anything outside `name` and `business_id` as optional in your parser. ### How does pagination work? After `items`, the recorded response ends with a `pagination` object: ```json "pagination": { "current_page": 0, "total_results": 173, "has_more": false } ``` The recording shows `current_page` as 0, `total_results` as 173 and `has_more` as `false`. We haven't documented what each field means, so confirm them in the playground before you rely on them. For a business-list collector, a page loop that stops when `has_more` is `false` is the natural design, but cap the loop so a bug can't spend credits unchecked. Each page is one call, so it's 1 credit. We haven't documented what `limit` caps or the default page size, so check both in the playground. The recording includes `owner_id`, `owner_name` and a link in `owner_link`, so handle them as personal data. Only collect and store them if you have a lawful basis, and don't use them to contact the people behind a listing. ## How do you go from a search hit to full details? Take the `business_id` from a search result and pass it to the endpoint that answers your next question. A search gives you the summary; the other endpoints take one business and go deeper. `business_id` is required by Business Details, Photos, Reviews and Review, so it's the key you carry between calls. ```bash curl "https://api.perceptlayer.com/v1/google-maps/business-details?business_id=0x89c2591598891521:0x4ebcde18610e64" \ -H "X-API-Key: $API_KEY" ``` That's a real endpoint and a real `business_id` from the recorded search. We haven't recorded a `business-details` response, so check its fields in the playground rather than assuming them. A common pipeline looks like this: run a handful of searches, dedupe on `business_id`, then call details only for the places that pass your filter, for example `rating` above a threshold or a particular entry in `subtypes`. Filtering on search fields first keeps the second stage small, and every call you skip is a credit you keep. If reviews are what you're after, the `reviews` endpoint takes the same `business_id`; its parameters are listed on the [Google Maps API page](https://perceptlayer.com/apis/google-maps), and [Google Maps Reviews API: Parameters, Requests and Cost](https://perceptlayer.com/blog/google-maps-reviews-api-parameters) covers it in full. ## What are the other eleven Google Maps endpoints? The Google Maps API has 12 endpoints, all `GET`. Besides `simple-search`, they cover advanced search, autocomplete, business details, photos, photo metadata, posts, popular times, reviews, a single review, a contributor's reviews and directions. Each costs 1 credit per successful call, except `reviews`, which costs 1 per page fetched. The table has the required parameters for each. | Endpoint | Returns | Required parameters | | --- | --- | --- | | `/v1/google-maps/simple-search` | Simple Search | `query` | | [`/v1/google-maps/advanced-search`](https://perceptlayer.com/apis/google-maps/advanced-search) | Advanced Search | `query`, `zoom` | | [`/v1/google-maps/autocomplete`](https://perceptlayer.com/apis/google-maps/autocomplete) | Autocomplete | none | | [`/v1/google-maps/business-details`](https://perceptlayer.com/apis/google-maps/business-details) | Business Details | `business_id` | | [`/v1/google-maps/photos`](https://perceptlayer.com/apis/google-maps/photos) | Photos | `business_id` | | [`/v1/google-maps/posts`](https://perceptlayer.com/apis/google-maps/posts) | Posts | `data_id` | | `/v1/google-maps/reviews` | Reviews | `business_id` | | [`/v1/google-maps/review`](https://perceptlayer.com/apis/google-maps/review) | Review | `review_id`, `business_id` | | [`/v1/google-maps/contributor-reviews`](https://perceptlayer.com/apis/google-maps/contributor-reviews) | Contributor Reviews | `contributor_id` | | [`/v1/google-maps/directions`](https://perceptlayer.com/apis/google-maps/directions) | Directions | `origin`, `destination` | Directions also takes an optional `mode` with the values `driving`, `walking`, `bicycling` or `transit`. Photos takes optional `page` and `limit`. Posts is keyed by `data_id` rather than `business_id`, and pages with `next_page_token`. Autocomplete has no required parameter; it accepts `query` or `q`, each up to 255 characters. ## How much does a Google Maps data call cost? Every Google Maps endpoint costs 1 credit per successful call, so the cost of a run is simply the number of calls. A failed call costs nothing and returns `X-Credits-Used: 0`. The free tier gives you 100 credits after you verify an email address, with no credit card. | Pack | Credits | | --- | --- | | Free | 100, once, after email verification | | Starter | 10,000 | | Build | 50,000 | | Growth | 200,000 | | Pro | 500,000 | | Scale | 1,000,000 | | Volume | 5,000,000 | Purchased credits last 12 months, and there's no subscription and no seats. The service is prepaid, so when the balance hits zero calls return `insufficient_credits` (402) and nothing more is debited. There's no automatic top-up. [Pricing](https://perceptlayer.com/pricing) shows what each pack costs. A worked example: 200 searches plus a `business-details` call for each of 1,000 places is 1,200 calls × 1 credit = 1,200 credits. That's 1,100 more than the 100 free credits on signup, so a run that size needs a pack. A bigger run of 10,000 calls × 1 credit = 10,000 credits, which is exactly the Starter pack. See [how credits work](https://docs.perceptlayer.com/credits) for the full rules. ## What happens when a call fails? A failed call returns an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`, and it costs 0 credits. For a search workflow, the codes you'll meet most are `invalid_parameters` (422) when a required parameter is missing or invalid, `rate_limited` (429) when you're sending too fast, and `source_error` (502) or `temporarily_unavailable` (503) when the source side fails. Retry 429, 502 and 503. For 429 and 503, wait the number of seconds in the `Retry-After` header rather than guessing a backoff. Don't retry 422 or 401 without changing the request. A response that returns an error isn't billed, but requests have no idempotency key: if the reply is lost, for example when the 30-second client timeout in the Python example fires, the call may have succeeded and been billed. A retry then spends a second credit, so cap your retries. The [errors reference](https://docs.perceptlayer.com/errors) lists every code, and [rate limits](https://docs.perceptlayer.com/rate-limits) explains 429. ## When is Google's own Places API the better choice? If you're building an app on Google's own platform, look at Google's official [Places API](https://developers.google.com/maps/documentation/places/web-service/overview) and check its [billing and pricing](https://developers.google.com/maps/billing-and-pricing/pricing) for your volume. Read Google's terms for your use case before you choose. This API fits when you want flat JSON, one key across many sources and a fixed 1 credit per call. [Google Places API Alternative: Place Data Priced per Call](https://perceptlayer.com/blog/google-maps-places-api-alternative) compares the two approaches in more detail. Data here is collected from publicly available sources and returned as found at the time of the call. We don't promise completeness or freshness beyond that, so if you depend on a field, check it in the playground first. Agents can reach the same endpoints through the [MCP server](https://docs.perceptlayer.com/ai-agents), where `search_endpoints` and `get_endpoint` are free lookups and `call_endpoint` spends credits only on success. Next step: open the [Google Maps API page](https://perceptlayer.com/apis/google-maps), pick `simple-search` in the playground and run your own query. If you're comparing how other listing sources look as JSON, the [Zillow listings guide](https://perceptlayer.com/blog/zillow-listings-api-json) and the [API guides category](https://perceptlayer.com/blog/category/api-guides) follow the same format. ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### What does a Google Maps search return for each business? Each item in `items` carries `name`, `rating`, `review_count`, `full_address`, `latitude`, `longitude`, `phone_numbers`, `website`, `subtypes` and a `business_id`, plus address parts such as `city`, `state`, `zip_code` and `country_code`. Both recorded items also have `photos_sample` and `attributes`, and the response ends with a `pagination` object ( `current_page`, `total_results`, `has_more`). Treat fields beyond the name and ID as optional. ### How many credits does one Google Maps call use? One for most endpoints. `reviews` costs 1 credit per page of reviews it fetches; every other Google Maps endpoint costs 1 credit per successful call, and failed calls cost nothing. The response carries `X-Credits-Used` and `X-Credits-Remaining`, so you can log what each call cost and what's left. A run of 1,000 calls is 1,000 credits; see [pricing](https://perceptlayer.com/pricing) for what credits cost. ### How do I get reviews or photos for a place I found? Copy the `business_id` from the search result and pass it to `/v1/google-maps/photos` or `/v1/google-maps/reviews`. Both take `business_id` as their only required parameter. Photos accepts optional `page` and `limit`, and reviews accepts `page`, `pages`, `search`, `sort`, `limit`, `hl` and `gl`. Each call is 1 credit. ### Can I try it before paying? Yes. Verify an email address and you get 100 free credits on signup, with no credit card. That's 100 `simple-search` calls at 1 credit each. The playground on each API page runs real calls with your key, so you can see a response for your own query before you write any code. google maps places local business search business data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Aug 2026 Updated 26 Oct 2026 Perceptlayer 6 min read ## [Yelp Reviews API: Business Search and Reviews as JSON](https://perceptlayer.com/blog/yelp-reviews-api-json) Three Yelp endpoints return search results, business details and reviews as JSON, 1 credit per call. Parameters, a real response and a cost example. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Jul 2026 Updated 7 Nov 2026 Perceptlayer 8 min read ## [Google Maps Reviews API: Parameters, Requests and Cost](https://perceptlayer.com/blog/google-maps-reviews-api-parameters) Call GET /v1/google-maps/reviews with a business\_id from Simple Search. Every parameter, the sort values 1 to 4, and the cost: 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 9 min read ## [Google Reviews Scraper or API: What You Get](https://perceptlayer.com/blog/google-reviews-scraper-vs-api) A Google reviews scraper versus the reviews endpoint: rating, timestamp, review\_text and a nextPage token per call, at 1 credit per business checked. --- title: "Web Data to a Warehouse: Loading API JSON into Postgres" description: "Land AutoScout24 search JSON in a Postgres JSONB table, flatten it with a view, then upsert on listing_id. Code and credit cost per refresh." url: https://perceptlayer.com/blog/load-web-data-json-into-postgres --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Web Data to a Warehouse: Loading API JSON into Postgres 10 Aug 2026 Perceptlayer 7 min read To load API JSON into Postgres, store each response untouched in a `jsonb` column, expose the fields you need through a view, and upsert into a typed table keyed on the record's own ID. This tutorial does that with the AutoScout24 search endpoint: raw pages in, a flat `listings` table out, and re-runs that never create duplicates. ## Key takeaways - Land every page as one `jsonb` row first. A parsing bug or a new field then costs a replay from your own table, not another API call. - A view over `jsonb_array_elements(payload #> '{data,listings}')` turns one response into one row per listing. - `INSERT … ON CONFLICT (listing_id) DO UPDATE` makes the load idempotent; `SELECT DISTINCT ON` stops one batch from touching a row twice. - In the recorded search, 193 results at 20 per page is 10 pages, so a full refresh is 10 credits at 1 credit per call. ## What does the pipeline look like? The pipeline has three layers: a raw table that holds each API response exactly as received, a view that unpacks the JSON into columns, and a typed table that holds one current row per listing. A small Python script fetches pages, writes the raw rows, then runs one SQL statement to move new rows into the typed table. Each layer can be rebuilt from the one before it. | Layer | Object | Key | Purpose | | --- | --- | --- | --- | | Landing | `raw_autoscout24_search` | `id` (one per page fetched) | Immutable record of what the API returned | | Flattening | `autoscout24_search_listings` (view) | none | One row per listing per page, typed columns | | Current state | `listings` | `listing_id` | Latest values for each listing | | History | `listing_prices` | `listing_id`, `raw_id` | Price at each fetch | You need Python 3.10 or later, the oldest version the current psycopg 3 release supports ( [psycopg 3 installation docs](https://www.psycopg.org/psycopg3/docs/basic/install.html), 2026), a Postgres database, and an API key from [the free tier](https://perceptlayer.com/signup): 100 free credits on signup, no credit card. Install the two libraries with `pip install requests "psycopg[binary]"`. The key goes in the `X-API-Key` header, as described in the [authentication docs](https://docs.perceptlayer.com/authentication). ## Why land the raw JSON in a JSONB column first? Landing the raw response first separates "what the API said" from "what I decided to keep". Postgres stores `jsonb` in a decomposed binary form that supports path operators and indexing ( [PostgreSQL docs: JSON types](https://www.postgresql.org/docs/current/datatype-json.html)), so you can query the payload directly while you are still deciding on columns. If you later add `co2` or `consumption` to the typed table, you re-run the view over rows you already hold. The cost is storage: every page keeps its image URLs and fields you may never read. If you only ever need five fields and never replay, flatten in Python and skip the raw table. For anything that feeds reports, the raw copy is cheap insurance. ## Step 1: How do you create the landing table? Create one table for raw pages, one for current listings and one for price history. The raw table stores the request parameters next to the payload, so any row explains itself. A partial index on unprocessed rows keeps the "what is new" lookup fast however large the table grows. `listing_id` is `text` rather than `uuid` because the endpoint documents it only as a string. ```sql -- schema.sql CREATE TABLE raw_autoscout24_search ( id bigserial PRIMARY KEY, fetched_at timestamptz NOT NULL DEFAULT now(), market text NOT NULL, params jsonb NOT NULL, payload jsonb NOT NULL, processed_at timestamptz ); CREATE INDEX raw_autoscout24_search_unprocessed ON raw_autoscout24_search (id) WHERE processed_at IS NULL; CREATE TABLE listings ( listing_id text PRIMARY KEY, market text NOT NULL, title text, make text, model text, price_amount integer, price_currency text, mileage_km integer, registration_year integer, power_kw integer, fuel text, transmission text, city text, seller_type text, dealer_slug text, first_seen_at timestamptz NOT NULL, last_seen_at timestamptz NOT NULL, last_raw_id bigint NOT NULL ); CREATE TABLE listing_prices ( listing_id text NOT NULL, raw_id bigint NOT NULL REFERENCES raw_autoscout24_search (id), observed_at timestamptz NOT NULL, price_amount integer, price_currency text, PRIMARY KEY (listing_id, raw_id) ); ``` ## Step 2: How do you fetch pages and land them? Loop over `GET /v1/autoscout24/search`, follow `pagination.next_page` until `has_more` is false, and commit each page as soon as it arrives. Committing per page matters because every successful page was already billed: if page 7 fails, pages 1 to 6 stay in your table. The loop below only stores responses that returned HTTP 200, and it logs credit headers, never bodies. ```python # load.py import os from pathlib import Path import psycopg import requests from psycopg.types.json import Jsonb BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PARAMS = { "market": "de", "make_id": "13", "model_id": "1639", "price_min": 5000, "price_max": 20000, "sort": "price", "limit": 20, } def fetch_pages(params, max_pages=50): page = 1 while page <= max_pages: resp = requests.get( f"{BASE}/v1/autoscout24/search", headers=HEADERS, params={**params, "page": page}, timeout=30, ) resp.raise_for_status() print( f"page {page}: used {resp.headers.get('X-Credits-Used')}, " f"remaining {resp.headers.get('X-Credits-Remaining')}" ) body = resp.json() yield page, body pagination = body["data"]["pagination"] if not pagination["has_more"]: break page = pagination["next_page"] def land(conn, params, page, body): conn.execute( "INSERT INTO raw_autoscout24_search (market, params, payload) " "VALUES (%s, %s, %s)", (params["market"], Jsonb({**params, "page": page}), Jsonb(body)), ) conn.commit() ``` `max_pages` is a guard so a bad cursor can't loop forever. For pacing, retries and timeouts, see [safe page loops in Python](https://perceptlayer.com/blog/paginate-web-data-api-python), [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) and the [error codes](https://docs.perceptlayer.com/errors). ## Step 3: How do you flatten the JSON into a view? Use `jsonb_array_elements` in a lateral join to turn `data.listings` into one row per listing, and `#>>` to pull nested values out as text before casting. The paths below match the recorded response: `price.amount`, `mileage.value_km`, `first_registration.year`, `power.kw`, `location.city` and `seller.type` ( [PostgreSQL docs: JSON functions](https://www.postgresql.org/docs/current/functions-json.html)). ```sql -- view.sql CREATE VIEW autoscout24_search_listings AS SELECT r.id AS raw_id, r.fetched_at, r.market, l ->> 'listing_id' AS listing_id, l ->> 'title' AS title, l ->> 'make' AS make, l ->> 'model' AS model, (l #>> '{price,amount}')::integer AS price_amount, l #>> '{price,currency}' AS price_currency, (l #>> '{mileage,value_km}')::integer AS mileage_km, (l #>> '{first_registration,year}')::integer AS registration_year, (l #>> '{power,kw}')::integer AS power_kw, l ->> 'fuel' AS fuel, l ->> 'transmission' AS transmission, l #>> '{location,city}' AS city, l #>> '{seller,type}' AS seller_type, l #>> '{seller,dealer_slug}' AS dealer_slug FROM raw_autoscout24_search AS r CROSS JOIN LATERAL jsonb_array_elements(r.payload #> '{data,listings}') AS l; ``` Applied to the two listings in the recorded response, the view gives: | listing\_id | price\_amount | mileage\_km | registration\_year | power\_kw | city | seller\_type | dealer\_slug | | --- | --- | --- | --- | --- | --- | --- | --- | | `f81b29b2-…` | 5700 | 215000 | 2013 | 85 | Mainz-Kastel | Dealer | `rheinkastelautomobile` | | `2a852a90-…` | 5800 | 177000 | 2012 | 85 | Berlin | PrivateSeller | NULL | The private seller has no `dealer_slug`, because its `seller` object holds only `id` and `type`. Path operators return NULL for missing keys instead of raising, which is why this works for optional fields. Text values such as `Schaltgetriebe` come back as found, so map them yourself if you mix markets. ## Step 4: How do you upsert on listing ID? Key the typed table on `listing_id` and use `INSERT … ON CONFLICT DO UPDATE` ( [PostgreSQL docs: INSERT](https://www.postgresql.org/docs/current/sql-insert.html)). Two details make it safe. First, `DISTINCT ON (listing_id)` keeps one row per listing per batch, because Postgres raises an error if one statement tries to update the same row twice. Second, the `WHERE` guard stops an older batch from overwriting newer values. ```sql -- upsert.sql WITH batch AS ( SELECT v.* FROM autoscout24_search_listings AS v JOIN raw_autoscout24_search AS r ON r.id = v.raw_id WHERE r.processed_at IS NULL AND r.id <= %(max_id)s ), prices AS ( INSERT INTO listing_prices (listing_id, raw_id, observed_at, price_amount, price_currency) SELECT listing_id, raw_id, fetched_at, price_amount, price_currency FROM batch ON CONFLICT (listing_id, raw_id) DO NOTHING ), latest AS ( SELECT DISTINCT ON (listing_id) batch.*, min(fetched_at) OVER (PARTITION BY listing_id) AS first_fetched FROM batch ORDER BY listing_id, fetched_at DESC, raw_id DESC ) INSERT INTO listings ( listing_id, market, title, make, model, price_amount, price_currency, mileage_km, registration_year, power_kw, fuel, transmission, city, seller_type, dealer_slug, first_seen_at, last_seen_at, last_raw_id ) SELECT listing_id, market, title, make, model, price_amount, price_currency, mileage_km, registration_year, power_kw, fuel, transmission, city, seller_type, dealer_slug, first_fetched, fetched_at, raw_id FROM latest ON CONFLICT (listing_id) DO UPDATE SET title = EXCLUDED.title, price_amount = EXCLUDED.price_amount, price_currency = EXCLUDED.price_currency, mileage_km = EXCLUDED.mileage_km, registration_year = EXCLUDED.registration_year, power_kw = EXCLUDED.power_kw, fuel = EXCLUDED.fuel, transmission = EXCLUDED.transmission, city = EXCLUDED.city, seller_type = EXCLUDED.seller_type, dealer_slug = EXCLUDED.dealer_slug, last_seen_at = EXCLUDED.last_seen_at, last_raw_id = EXCLUDED.last_raw_id WHERE listings.last_raw_id <= EXCLUDED.last_raw_id; ``` The `<=` lets you replay a raw row after fixing the view, while still refusing older data. `first_seen_at` is left out of the update list, so it keeps the value from the first insert. The script below runs this statement and marks the rows processed in the same transaction. Add it to `load.py`: ```python UPSERT_SQL = Path("upsert.sql").read_text() def transform(conn): max_id = conn.execute( "SELECT max(id) FROM raw_autoscout24_search WHERE processed_at IS NULL" ).fetchone()[0] if max_id is None: return conn.execute(UPSERT_SQL, {"max_id": max_id}) conn.execute( "UPDATE raw_autoscout24_search SET processed_at = now() " "WHERE processed_at IS NULL AND id <= %(max_id)s", {"max_id": max_id}, ) conn.commit() def main(): with psycopg.connect(os.environ["DATABASE_URL"]) as conn: for page, body in fetch_pages(PARAMS): land(conn, PARAMS, page, body) transform(conn) if __name__ == "__main__": main() ``` Capturing `max_id` first means pages that land while the transform runs wait for the next run instead of being marked processed unseen. ## Step 5: How do you run it and check the result? Create the objects once, then run the script as often as you like: ```bash psql "$DATABASE_URL" -f schema.sql -f view.sql API_KEY=sk_live_... DATABASE_URL=postgresql://localhost/cars python load.py ``` Run it twice and compare `SELECT count(*) FROM listings`. The second run adds raw rows and price observations, but `listings` only grows by listings that are new. Then query it like any table: ```sql SELECT registration_year, count(*) AS listings, percentile_cont(0.5) WITHIN GROUP (ORDER BY price_amount) AS median_price FROM listings WHERE price_currency = 'EUR' GROUP BY registration_year ORDER BY registration_year; ``` To see price movement, compare each observation to the previous one for the same listing: ```sql SELECT * FROM ( SELECT listing_id, observed_at, price_amount, price_amount - lag(price_amount) OVER ( PARTITION BY listing_id ORDER BY observed_at ) AS change FROM listing_prices ) AS p WHERE change <> 0; ``` For which fields to model next, see [used car listing data for price analysis](https://perceptlayer.com/blog/used-car-listing-data-price-analysis). ## What does a refresh cost in credits? A successful call costs 1 credit, so a refresh costs one credit per page. The recorded response reports `total: 193`, `limit: 20` and `total_pages: 10`, so that search needs 10 pages: 10 pages × 1 credit = 10 credits. A daily refresh for 30 days is 30 × 10 = 300 credits. The 100 free credits on signup cover the first 10 refreshes; after that, the Starter pack's 10,000 credits cover a year of daily refreshes (12 × 300 = 3,600). Failed calls cost nothing and return `X-Credits-Used: 0`. The total changes as listings come and go, so read `pagination.total_pages` from your own run. Because the raw table keeps every page, reprocessing never spends credits. See [credits](https://docs.perceptlayer.com/credits) for how billing works, [rate limits](https://docs.perceptlayer.com/rate-limits) for pacing, and [pricing](https://perceptlayer.com/pricing) for what credits cost. ## Where does this design break? It breaks in three places. Pages are fetched one at a time, so if listings change between requests, one can appear on two pages or be missed. The upsert absorbs duplicates, but a missed listing only shows up in the next run. A listing that disappears is never deleted, so use `last_seen_at` to find the ones that stopped appearing. Finally, fetching a page and storing it are not one transaction. A timed-out request may have succeeded and been billed, which the [retry guide](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers. Raw rows also grow without limit. Once the typed tables are trusted, archive or drop old `payload` values. If your warehouse is BigQuery or Snowflake, the same layers apply with their own JSON types and `MERGE` in place of `ON CONFLICT`. Next step: [get a free API key](https://perceptlayer.com/signup), try the call in the playground on the [AutoScout24 Search page](https://perceptlayer.com/apis/autoscout24/search), then run `load.py`. For the endpoint's fields and filters, read [AutoScout24 API: Search European Car Listings as JSON](https://perceptlayer.com/blog/autoscout24-api-car-listings-json), and find more pipeline guides in the [data engineering category](https://perceptlayer.com/blog/category/data-engineering). ## APIs in this post - [AutoScout24 **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/autoscout24) ## Frequently asked questions ### Should I store the raw JSON or flatten it before inserting? Store the raw JSON when the data feeds anything you will need to rebuild. A parsing bug or a new column then costs a replay from your own table, not new API calls. Flatten before inserting only when you need a handful of fields and will never replay. A view over `jsonb` costs nothing to change later. ### How do I avoid duplicate rows when I re-run the load? Key the typed table on the record's own ID, here `listing_id`, and write with `INSERT … ON CONFLICT DO UPDATE`. Re-running then updates existing rows instead of adding new ones. Deduplicate inside each batch with `DISTINCT ON`, because one statement can't update the same row twice. The history table's `(listing_id, raw_id)` key keeps replays from duplicating observations. ### What happens if a page request fails halfway through a run? Pages already committed stay in the raw table, and failed calls cost nothing. Run the script again: it fetches from page 1 and lands a second copy of the earlier pages, which the upsert handles without duplicates. If you want to avoid paying twice for those pages, store the last completed page and resume from it. The [error handling guide](https://perceptlayer.com/blog/handle-web-data-api-errors-python) covers which errors are worth retrying. ### Can I use the same pattern for other endpoints? Yes. Any endpoint returns JSON, so the layers stay the same: one raw table per endpoint family, a view with that response's paths, and an upsert keyed on the ID the response provides. Check the [API reference for the endpoint](https://perceptlayer.com/apis) for the field names, and take the response shape only from a real call, not from guesswork. ### Is the data in my table current? It is as found at the time of each call. The API doesn't promise freshness beyond that, so `fetched_at` and `last_seen_at` in your tables are the record of when you saw each listing. If you refresh often, [caching responses](https://perceptlayer.com/blog/cache-web-data-api-responses) can avoid repeating identical calls. postgres jsonb data pipeline upsert autoscout24 etl ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 13 Oct 2026 Updated 25 Oct 2026 Perceptlayer 6 min read ## [Build an ETL Pipeline in Python for Web Data](https://perceptlayer.com/blog/etl-pipeline-python-web-data) An ETL pipeline in Python for web data: extract Google Shopping prices with retries, transform to typed rows, load into SQLite idempotently, run daily. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 31 Oct 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Extract Data From a Website: Pages, Sites and APIs](https://perceptlayer.com/blog/extract-data-from-website) Three ways to extract data from a website: one page as markdown or JSON, every URL on a site with map, or structured records. 1 credit per call. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. --- title: "Mercado Libre API: Category Prices and Reviews as JSON" description: "Pull Mercado Libre best sellers and offers by category as JSON: price, previous price, shipping and reviews, at 1 credit per call." url: https://perceptlayer.com/blog/mercado-libre-api-product-search --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Mercado Libre API: Category Prices and Reviews as JSON 8 Aug 2026 Perceptlayer 7 min read The [Mercado Libre API](https://perceptlayer.com/apis/mercadolibre) returns product data for Latin American marketplaces as JSON, with one key and no scraper. Call `/v1/mercadolibre/category-products` with a `site` and a `category_id` and you get the category's best sellers and offers, each with price, previous price, currency, discount label and shipping text. Every call costs 1 credit. ## Key takeaways - `GET /v1/mercadolibre/category-products` takes `site` and `category_id` and returns products with `price`, `previous_price`, `currency` and `discount_label`. - There's no free-text product search endpoint in the list. Use `category-discovery` to turn a query into a category, then pull that category. - `reviews` and `review-summary` take a `site` and an `id`, and `id_type` switches between `item` and `product`. - Tracking one category daily for 30 days costs 30 credits. Adding weekly review summaries for 33 products brings it to 162 credits a month. The 100 free credits on signup cover the first two weeks. - Failed calls cost nothing and return `X-Credits-Used: 0`. ## Which Mercado Libre endpoints return product data? Eleven endpoints cover the marketplace, and each costs 1 credit per successful call. Four of them matter for price and review tracking: `categories` for category data, `category-products` for the products in a category, `reviews` for individual reviews and `review-summary` for the rating overview. The rest cover discovery, shipping, stores and suggestions. | Endpoint | Returns | Required parameters | | --- | --- | --- | | `/v1/mercadolibre/categories` | Categories | none | | `/v1/mercadolibre/category-discovery` | Category Discovery | `site`, `q` | | `/v1/mercadolibre/category-products` | Category Products | `site`, `category_id` | | `/v1/mercadolibre/reviews` | Reviews | `site`, `id` | | `/v1/mercadolibre/review-summary` | Review Summary | `site`, `id` | | `/v1/mercadolibre/shipping-options` | Shipping Options | `item_id`, `zip_code` | Related Products, Suggestions, Category Attributes, Store and Stores round out the set. All of them sit on the [Mercado Libre API page](https://perceptlayer.com/apis/mercadolibre), part of the [Marketplaces APIs](https://perceptlayer.com/verticals/marketplaces). ## How do you get a key and make the first call? Sign up, verify an email address and you get 100 free credits on signup, with no credit card. Send the key in the `X-API-Key` header. Keys start with `sk_live_`. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the `api_key` query parameter for places where headers aren't possible, and the [quick start](https://docs.perceptlayer.com/quickstart) walks through a first call. [Get a free API key](https://perceptlayer.com/signup), then call `categories` for a category: ```bash curl "https://api.perceptlayer.com/v1/mercadolibre/categories?site=MLA&category_id=MLA1574" \ -H "X-API-Key: $API_KEY" ``` `site` and `category_id` are both optional on this endpoint. The `site` values are MLA, MLB, MLM, MLC, MCO, MPE, MLU, MEC and MLV, one per country marketplace. The recorded sample below is MLA, which resolves to `mercadolibre.com.ar` and prices in `ARS`. ## How do you find the category you want to track? Start from a keyword and let `category-discovery` map it to categories, because the API has no free-text item search. It takes `site` and `q` (up to 200 characters) and an optional `limit`. It returns matching categories (the [Category Discovery page](https://perceptlayer.com/apis/mercadolibre/category-discovery) lists the fields); pass a category's ID to `category-products`. `suggestions` takes `site`, `q` (up to 100 characters) and `limit`. ```bash curl "https://api.perceptlayer.com/v1/mercadolibre/category-discovery?site=MLA&q=camara%20de%20seguridad&limit=5" \ -H "X-API-Key: $API_KEY" ``` Do this once per category and store the IDs. Category discovery is a setup step, not part of the tracking loop, so it costs you a handful of credits in total rather than per run. If you need the fields a category's items must carry, [Category Attributes](https://perceptlayer.com/apis/mercadolibre/category-attributes) takes only a `category_id`. ## Which parameters does Category Products take? `category-products` takes two required parameters and nothing else. The [Category Products](https://perceptlayer.com/apis/mercadolibre/category-products) page has the playground if you'd rather try it in the browser first. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `site` | string | yes | One of MLA, MLB, MLM, MLC, MCO, MPE, MLU, MEC, MLV | | `category_id` | string | yes | For example `MLA1574` | Here's the call behind the recorded response: ```bash curl "https://api.perceptlayer.com/v1/mercadolibre/category-products?site=MLA&category_id=MLA1574" \ -H "X-API-Key: $API_KEY" ``` There's no `limit` or `offset` on this endpoint, so one call returns whatever the category's lists hold at that moment. ## What does a price record look like? Each product carries the current `price`, the `previous_price`, the `currency` and a `discount_label`, plus shipping text and a `fulfilled_by_mercado_libre` flag. That's enough to build a price history without opening a single product page. This is an excerpt of the recorded response for category `MLA1574` on `MLA`: ```json { "success": true, "data": { "site": "MLA", "category_id": "MLA1574", "products": [ { "position": 2, "tab": "affiliate-profile-best-sellers", "item_id": "MLA1550818153", "product_id": "MLA43779215", "title": "Camara Seguridad Geotek 3mp Ip Wifi Exterior Full Hd Domo Vision Nocturna …", "brand": "GEOTEK", "official_store": true, "highlight": "MÁS VENDIDO", "price": 46567, "previous_price": 74999, "currency": "ARS", "discount_label": "37% OFF", "shipping_text": "Envío gratis", "shipping_note": "por ser tu primera compra", "fulfilled_by_mercado_libre": true } ], "total": 33, "source_tabs": [ { "id": "affiliate-profile-best-sellers", "title": "Más vendidos", "count": 18 }, { "id": "affiliate-profile-offers", "title": "Ofertas", "count": 15 } ] }, "meta": { "endpoint_family": "category_products", "billable": true, "duration_ms": 764 } } ``` Three things worth knowing. `tab` says which list a product came from, and `source_tabs` counts them: 18 best sellers and 15 offers make the `total` of 33. `item_id` identifies the listing, while `product_id` is only present on some products, so don't treat it as always there. And `previous_price` is a single value per product, not a series. Your own stored snapshots are the history. ## How do you turn this into a price tracker? Call the endpoint on a schedule, key each product by `item_id`, and store `price`, `previous_price` and `currency` with a timestamp. Compare today's price to the last stored one, not to `previous_price`. The script below does the first half: it pulls the category and prints the products whose listed discount is deepest. ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} resp = requests.get( f"{BASE}/v1/mercadolibre/category-products", headers=HEADERS, params={"site": "MLA", "category_id": "MLA1574"}, timeout=30, ) resp.raise_for_status() print("credits used:", resp.headers.get("X-Credits-Used")) rows = [] for p in resp.json()["data"]["products"]: old, new = p.get("previous_price"), p.get("price") if old and new: rows.append((round(100 * (old - new) / old), p["item_id"], new, p["currency"])) for pct, item_id, price, currency in sorted(rows, reverse=True)[:10]: print(f"{pct}% off {item_id} {price} {currency}") ``` Writing each run to a database table keyed by `item_id` and date gives you the history. Handle failures as covered in [Docs: Errors](https://docs.perceptlayer.com/errors): a 429 or 503 carries a `Retry-After` header. ## How do you pull reviews and rating summaries? Use `review-summary` for the overview and `reviews` for the individual entries, both keyed by `site` and `id`. Set `id_type` to `item` or `product` to say what the `id` is. `reviews` also accepts `limit`, `offset`, `rating` (an integer filter) and `order` ( `relevance` or `date`). We don't have a recorded response for these two, so check the [Review Summary](https://perceptlayer.com/apis/mercadolibre/review-summary) and [Reviews](https://perceptlayer.com/apis/mercadolibre/reviews) pages for the returned fields. ```bash curl "https://api.perceptlayer.com/v1/mercadolibre/review-summary?site=MLA&id=MLA43779215&id_type=product" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/mercadolibre/reviews?site=MLA&id=MLA43779215&id_type=product&order=date&limit=20" \ -H "X-API-Key: $API_KEY" ``` The `product_id` from the category response is the natural `id` here, with `id_type=product`. Where a product has no `product_id`, use its `item_id` with `id_type=item`. A sensible pattern is to poll `review-summary` for every tracked product and fetch `reviews` only when the summary changes. ## What does tracking one category cost? Tracking one category daily costs 30 credits a month, and adding review summaries for its 33 products once a week brings it to 162. All of these endpoints cost 1 credit per successful call, so the arithmetic is a count of calls. The [credits docs](https://docs.perceptlayer.com/credits) explain how debits work. | Task | Calls | Credits | | --- | --- | --- | | `category-products`, once a day for 30 days | 30 | 30 | | `review-summary`, 33 products × 4 weekly runs | 132 | 132 | | Total for one category | 162 | 162 | The 100 free credits on signup cover the first two weeks of that (14 daily pulls plus 2 weekly review runs is 14 + 66 = 80 credits); after that it needs a pack. Scale it out: 10 categories pulled 4 times a day for 30 days is 10 × 4 × 30 = 1,200 calls × 1 credit = 1,200 credits for the price pulls alone. Paid credits come in prepaid packs starting at 10,000 credits, last 12 months, and have no subscription. [Pricing](https://perceptlayer.com/pricing) has what credits cost. Failed calls return `X-Credits-Used: 0`, and the [rate limits](https://docs.perceptlayer.com/rate-limits) are per account. ## When is the official API a better fit? If you sell on the marketplace and need to create listings or manage orders, use Mercado Libre's own [developer platform](https://developers.mercadolibre.com.ar/en_us/register-your-application). You register an application, and calls on behalf of a seller authenticate through [OAuth 2.0 access tokens](https://developers.mercadolibre.com.ar/en_us/identity-and-access-management-oauth-and-tokens), so it's built around a seller's own account: listings, orders and similar seller data. That's the right fit for running a store, but it means registering an app and running the token flow before you read anything. This API is the other trade-off. It only reads public market data and never touches a seller account, so it can't create or change anything. For read-only data across a category, such as best sellers, offers, prices and reviews, with one key and a `site` parameter that switches between the nine country sites, it's the shorter path. Browse the storefront itself, for example [mercadolibre.com.ar](https://www.mercadolibre.com.ar/), to check any value against what a shopper sees. Data is collected from publicly available sources and returned as found at the time of the call, so a price you pull is the price shown then. For the same workflow on other stores see the [Walmart product search API](https://perceptlayer.com/blog/walmart-product-search-api) and the [Google Shopping API](https://perceptlayer.com/blog/google-shopping-api-product-prices). Your next step: open the [Mercado Libre API page](https://perceptlayer.com/apis/mercadolibre), pick `category-products`, enter `MLA` and `MLA1574` in the playground and run the call with your key. ## APIs in this post - [Mercado Libre **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/mercadolibre) ## Frequently asked questions ### Is there a Mercado Libre product search endpoint? Not for free-text queries. `category-discovery` takes a `site` and a `q` and returns matching categories, and `category-products` then returns the best sellers and offers in a category. `suggestions` takes a `site`, a `q` and an optional `limit`; its response is on the [Mercado Libre API page](https://perceptlayer.com/apis/mercadolibre). Together they cover finding a category and reading its products. ### How much does it cost to monitor Mercado Libre prices? Each call costs 1 credit, whether it's `category-products`, `reviews` or `review-summary`. One category pulled daily for 30 days is 30 calls × 1 credit = 30 credits. Free accounts get 100 credits on signup, and [pricing](https://perceptlayer.com/pricing) lists what larger packs cost. ### Which Mercado Libre countries can I query? Nine site codes are accepted: MLA, MLB, MLM, MLC, MCO, MPE, MLU, MEC and MLV. Pass one as `site` on most endpoints. Every product carries a `currency` field ( `ARS` for MLA in the recorded sample), so read it from each row and don't compare prices across sites until the currencies match. ### What happens when a call fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. Failed calls aren't billed and return `X-Credits-Used: 0`. A 429 or 503 includes `Retry-After` with the seconds to wait. See [Docs: Errors](https://docs.perceptlayer.com/errors) for every code. ### Can an AI agent call these endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. Lookups cost nothing, and `call_endpoint` spends credits on success only. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show how to add it to Claude Code. mercado libre ecommerce price tracking latin america reviews ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 8 min read ## [Etsy Scraper or API: What You Get](https://perceptlayer.com/blog/etsy-scraper-vs-api) An Etsy scraper vs one 10-credit product endpoint: a recorded listing with price, discount, quantity, variations and favorites, and the cost per item tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Nov 2026 Perceptlayer 8 min read ## [Amazon Scraper or API: Search, Offers and Reviews](https://perceptlayer.com/blog/amazon-scraper-vs-api) An Amazon scraper vs 18 endpoints at 1 credit a call: a recorded laptop stand search with asin, price.amount and rating, and the domains each call takes. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Sept 2026 Perceptlayer 6 min read ## [AliExpress Product API: Search, Reviews and Shipping](https://perceptlayer.com/blog/aliexpress-api-product-search-reviews) Chain AliExpress search, product, product-reviews and product-shipping, with every required parameter, at 1 credit per call, and cost a 100-product review pull. --- title: "News Data for Event Detection: Signals and Noise" description: "Turn news search results into event signals: drop duplicate URLs, cluster syndicated titles, count distinct sources in a window, and compare with a baseline." url: https://perceptlayer.com/blog/news-data-event-detection --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # News Data for Event Detection: Signals and Noise 8 Aug 2026 Updated 2 Nov 2026 Perceptlayer 7 min read News data detects events when you count independent coverage, not articles. One story syndicated to forty sites is one source repeated; three unrelated outlets writing about the same thing within hours is a signal. So event detection on news search results comes down to four steps: drop duplicate URLs, cluster articles that tell the same story, count distinct sources per cluster in a time window, and compare that count with a baseline. ## Key takeaways - Count distinct `source.name` values per story cluster, not articles: syndication and rewrites inflate article counts without adding evidence. - Use `iso_date` for windows; the relative `date` ("2 days ago") changes meaning every day. - Cluster by title similarity; in the recorded Google News response, the three titles share almost no words (Jaccard similarity 0 to 0.083), so they form three separate clusters. - A fixed threshold, such as 3 distinct sources in 24 hours, is a starting point; compare with each query's own baseline so busy topics don't fire constantly. - One `GET /v1/google-news/news` call costs 1 credit; checking 50 queries hourly is 36,000 credits a month, every 6 hours 6,000. ## What counts as an event in news data? A change in coverage that's larger than normal for that topic. Researchers have formalised this for decades: Jon Kleinberg's burst detection model treats a stream of documents as switching between a baseline state and bursty states, so an event is a period when arrivals come faster than usual ( [Kleinberg, Bursty and Hierarchical Structure in Streams](https://www.cs.cornell.edu/home/kleinber/bhs.pdf), 2002). The working version for a monitoring job is simpler: more independent sources than usual, about the same thing, in a short window. Every part of that sentence filters noise. "Independent" removes syndication. "The same thing" needs clustering. "Short window" needs exact timestamps. "Than usual" needs a baseline per query, because ten articles a day about a large company is quiet, while ten about a small one is news. ## What does a news search result give you to work with? Each result has the fields the four steps need: a link to dedupe on, a title to cluster on, a source name to count, and an exact timestamp to place it in a window. Nothing else is required, which keeps the detector independent of any one source's extras. The [Google News endpoint](https://perceptlayer.com/apis/google-news/news) returned this for `q=technology`, trimmed with `…`: ```json { "news_results": [ { "position": 1, "title": "Top Strategic Technology Trends for 2027", "link": "https://www.gartner.com/en/articles/top-technology-trends-2027", "type": "article", "iso_date": "2026-10-20T15:59:45+00:00", "date": "2 days ago", "source": { "name": "Gartner", … }, "story_token": "CBMib0FVX3lxTE1zMGNNN1p0UTdtOXV0U3RoU2JvSGlYUXpQYTZIeEFvcHZGZVpiazBjZ2UyZ0ZhVzZ6NUl3c3Y3LTdCWUVfYVd1YnZuMFdtVElGcHlsR3IwM1BnYXBQNGZueEdldUZJOWM0UnRTQ3Y0WQ", "related_publications": [ { "title": "Gartner", "publication_token": "CAAqJQgKIh9DQklTRVFnTWFnMEtDMmRoY25SdVpYSXVZMjl0S0FBUAE", … } ] }, { "position": 2, "title": "How did AI discover the internet's massive cyber-security risk?", "link": "https://www.bbc.com/news/videos/cq0ld7e0jg2eo", "iso_date": "2026-10-22T12:17:44+00:00", "date": "today", "source": { "name": "BBC", … }, … }, … ] } ``` | Field | Use in event detection | | --- | --- | | `link` | Duplicate removal, after stripping query strings | | `title` | Clustering articles about the same story | | `source.name` | Counting independent coverage | | `iso_date` | Placing an article in a time window | | `story_token` | Different on every recorded result, so it identifies the article, not a shared story | | `date` | Display only: "today" and "2 days ago" are relative to the day of the call | The [Google News API guide](https://perceptlayer.com/blog/google-news-api) covers the endpoint's parameters, including `gl` and `hl` for market and language. ## How do you separate the signal from the noise? Apply the four steps in order, each in plain code. Cheap rules catch most noise: duplicate links and syndicated copies are mechanical problems with mechanical fixes, and only the clustering step involves any judgment. You don't need a language model until then, and often not at all. The functions below were run on the recorded response. ### Step 1: Drop duplicate URLs The same article comes back on consecutive runs and sometimes with tracking parameters. Key each one by host and path, without `www.` or the query string. In our test, appending `?utm_source=x` to the first recorded link produced the same key, and the article was counted once. ### Step 2: Cluster articles that tell the same story Group articles whose titles share most of their words. A Jaccard similarity of title words (shared words divided by all words, after dropping stopwords) is crude but transparent; 0.5 is a reasonable first threshold. On the recording, the three pairs scored 0, 0.083 and 0, so each article is its own cluster: a Gartner trends article, a BBC video on a security risk and a university building ceremony are three stories, not one. ```python import re from datetime import datetime, timedelta from urllib.parse import urlsplit STOP = {"the", "a", "an", "of", "to", "in", "for", "and", "on", "at", "with", "how", "did", "is", "s"} def canonical(url): p = urlsplit(url) return p.netloc.lower().removeprefix("www.") + p.path.rstrip("/") def words(title): return {w for w in re.findall(r"[a-z0-9]+", title.lower()) if w not in STOP} def similar(a, b): """Jaccard similarity of title words.""" wa, wb = words(a), words(b) return len(wa & wb) / len(wa | wb) if wa | wb else 0.0 def clusters(articles, threshold=0.5): """Greedy clustering: an article joins the first cluster whose lead title is similar enough.""" seen, groups = set(), [] for a in sorted(articles, key=lambda x: x["iso_date"]): key = canonical(a["link"]) if key in seen: continue # same article twice seen.add(key) for g in groups: if similar(g[0]["title"], a["title"]) >= threshold: g.append(a) break else: groups.append([a]) return groups ``` Title matching misses rewrites with different headlines and can merge unrelated stories with formulaic titles. When that matters, compare embeddings of title plus snippet instead; the structure of the job stays the same. ### Step 3: Count distinct sources in a window For each cluster, count the distinct `source.name` values among articles whose `iso_date` falls inside the window. Distinct sources, not articles: a wire story republished by many outlets often keeps its headline, so it lands in one cluster, but if it was carried under one source name it still counts once. ```python def signals(articles, now, window=timedelta(hours=24), min_sources=3): """A cluster is an event when enough distinct sources covered it inside the window.""" out = [] for g in clusters(articles): recent = [a for a in g if now - datetime.fromisoformat(a["iso_date"]) <= window] sources = {a["source"]["name"] for a in recent} out.append({"lead": g[0]["title"], "articles": len(g), "sources_in_window": len(sources), "event": len(sources) >= min_sources}) return out ``` ### Step 4: Compare with a baseline A fixed `min_sources` works for narrow queries. For broad ones, keep each query's daily count of distinct sources and flag a day only when it's well above that query's recent norm, for example at least three times the median of the previous 14 days, with a floor of 3. That's a rough version of the baseline-versus-burst idea; it needs a couple of weeks of history before it says anything. ## What does the worked example show? We ran `signals` on the recorded response with the clock set to 18:00 UTC on 22 October 2026, the day of the BBC article, a 24-hour window and a threshold of 3 distinct sources. It returned three clusters of one article each, none of them an event, which is what a broad query over unrelated stories should produce: | Lead title | Articles | Distinct sources in last 24 h | Event | | --- | --- | --- | --- | | Top Strategic Technology Trends for 2027 | 1 | 0 | No | | Ohio State holds groundbreaking ceremony for Timashev Technology Tower | 1 | 0 | No | | How did AI discover the internet's massive cyber-security risk? | 1 | 1 | No | That's the right answer for a broad query like "technology": unrelated stories, one source each, two of them outside the 24-hour window. The recorded sample has three results, so it can show the mechanics but not a burst; a real event would show up as one cluster with several sources inside the window. The example also shows why the query matters more than the threshold. "technology" matches everything, so no single story stands out. Event detection works on narrow queries: a company, a product, a place, a regulation. Those have a low, stable baseline that a real event clearly exceeds. ## When is a larger news dataset a better fit? When you need global coverage rather than a watch list. The GDELT Project monitors print, broadcast and web news in over 100 languages and updates its event data every 15 minutes, free ( [GDELT](https://gdeltproject.org/about.html), 2026). For research across all world news, or for event types rather than named entities, that's a better starting point than running thousands of searches. A search endpoint fits the opposite case: a defined list of companies, products or places you care about, checked on a schedule, with results you can act on and link to. For a weekly digest built on the same results, see our [AI competitor monitoring agent](https://perceptlayer.com/blog/ai-competitor-monitoring-agent). ## What does an event detector cost to run? One call per query per check, at 1 credit per successful call; failed calls cost nothing and return `X-Credits-Used: 0`. The cost is set by how many queries you watch and how often. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Watch list | Every 6 hours | Hourly | | --- | --- | --- | | 10 queries | 1,200 credits a month | 7,200 credits a month | | 50 queries | 6,000 credits a month | 36,000 credits a month | Worked example: 50 queries every 6 hours is 50 × 4 × 30 = 6,000 credits a month, inside a Starter pack of 10,000 credits; hourly, it's 36,000, inside a Build pack of 50,000 credits. Ten queries checked twice a day is 600 credits a month; the 100 free credits on signup cover its first 5 days. See [pricing](https://perceptlayer.com/pricing) for what credits cost; for running the checks on a timer, see [scheduling web data pulls](https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue). To try a query, [get a free API key](https://perceptlayer.com/signup) and run it in the playground on the [Google News API page](https://perceptlayer.com/apis/google-news). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Google News **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-news) ## Frequently asked questions ### How do you detect events from news data? Remove duplicate URLs, cluster articles that cover the same story, count distinct sources per cluster within a time window, and flag clusters whose count is well above that query's normal level. Distinct sources matter more than article counts, because syndication and rewrites multiply articles without adding independent evidence. ### Why count sources instead of articles? Because one story can appear dozens of times. Wire copy is republished, outlets rewrite each other, and the same article comes back on every run. Counting distinct `source.name` values per story cluster measures how many independent outlets picked it up, which is a better sign that something actually happened. ### What threshold should I use? Start with a fixed floor, such as 3 distinct sources within 24 hours, for narrow queries. For broader ones, compare each day's count with that query's own recent median, for example flagging three times the median of the previous 14 days. Tune on a few weeks of history before alerting anyone. ### Which date field should I use? `iso_date`, an ISO 8601 timestamp with an offset, such as `2026-10-20T15:59:45+00:00`. The `date` field is relative to the day of the call, such as "today" or "2 days ago", so it can't place an article in a window you'll compare across runs. ### How much does news monitoring cost? One Google News call per query per check, at 1 credit per successful call; failed calls cost nothing. Fifty queries every six hours is 6,000 credits a month. Every account gets 100 free credits after verifying an email address. The [pricing page](https://perceptlayer.com/pricing) has what credits cost. event detection news data google news monitoring python ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 31 Oct 2026 Perceptlayer 9 min read ## [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 3 Sept 2026 Perceptlayer 8 min read ## [Search Result Data for SEO Monitoring: Fields to Track](https://perceptlayer.com/blog/search-result-data-seo-monitoring) Which search result fields to store per keyword per day, from position to snippet, and what 200 keywords tracked daily cost in credits. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. --- title: "Scraper or API: What Maintaining a Scraper Really Involves" description: "What a scraper costs to keep running: selector fixes, proxies, retries and monitoring, set against an API at 1 credit per successful call." url: https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Scraper or API: What Maintaining a Scraper Really Involves 8 Aug 2026 Updated 10 Nov 2026 Perceptlayer 11 min read A scraper is cheap to write and expensive to keep alive. The first version takes an afternoon; the upkeep is a recurring tax of selector repairs, blocked requests, retry logic and monitoring that never reaches zero. An API replaces that tax with a per-call price. For most teams who need data from many websites, the API is cheaper once you count engineer hours. A scraper still wins in a few specific cases, listed below. ## Key takeaways - A scraper's real cost is recurring work: fixing selectors after layout changes, handling blocks and proxies, writing retries, and monitoring for silent breakage. - Price the upkeep in engineer hours. At an assumed $100 an hour, 8 hours a month is $800 of upkeep. Count your API usage separately in credits, at 1 credit per call, and check [pricing](https://perceptlayer.com/pricing) for what they cost. - Perceptlayer covers 480 websites and 2,782 endpoints with one key, and failed calls cost nothing and return `X-Credits-Used: 0`. - Build a scraper when the source isn't in any catalogue, when you need fields an API doesn't return, or when volume is so high that per-call pricing exceeds upkeep. - Moving off a scraper is low risk: run both for a week, diff the fields, then switch. ## What does maintaining a scraper involve week to week? A scraper breaks in four recurring ways: the page layout changes and your selectors stop matching, the site starts rejecting your requests, transient errors need retries, and nobody notices a partial failure until a downstream report looks wrong. Each is small on its own. Together they become a standing job that belongs to someone, whether or not it's on their title. ### Selector breakage Your scraper reads a page by pointing at structure: a CSS selector, an XPath, a position in the DOM. The site owner never agreed to keep that structure stable, and a redesign, an A/B test or a renamed class takes your parser down. The failure is often quiet. The request returns 200, the selector matches nothing, and you store an empty field. That quiet part is what costs time. A loud crash gets fixed the same day. An empty `price` column gets found when someone asks why the dashboard dropped. ### Blocks, proxies and rate limits Sites limit how fast one client can read them. Once you scale past a few requests a minute you meet 429 responses, CAPTCHAs and IP-based limits. Teams respond with proxy pools, request pacing and header tuning, and each of those has its own bill and its own failure modes. Respect the site's rules while you do this. The [Robots Exclusion Protocol (RFC 9309)](https://www.rfc-editor.org/rfc/rfc9309) is the baseline for what a crawler should read, and a site's terms can add limits on top. Engineering around a site's protections is a legal and ethical question as much as a technical one, and it's the part of scraper upkeep that gets least attention in estimates. ### Retries and error handling Every network call fails sometimes. A scraper needs a policy: which statuses to retry, how long to wait, when to stop, and how to avoid hammering a site that is already struggling. The HTTP spec defines [`Retry-After`](https://www.rfc-editor.org/rfc/rfc9110#field.retry-after) for exactly this, but a scraper only sees it if the site sends it. Our guide to [retrying web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers the pattern in detail. ### Monitoring You can't maintain what you can't see. A scraper in production needs a success rate per site, a check that each field is populated, an alert when output volume drops, and a way to replay a failed job. Building that is real work, and it has to be maintained too. ## Where does the engineering time actually go? The time goes to recurring tasks, not to the original build. Count the tasks per site, because they multiply with every source you add: ten sites means ten sets of selectors, ten sets of block behaviour and ten places for a silent failure. The table lists what each task costs you in practice. | Recurring task | What triggers it | How it shows up | Scales with | | --- | --- | --- | --- | | Fix selectors | Layout change, A/B test, renamed class | Empty or wrong fields, often with HTTP 200 | Number of sites | | Handle blocks | Request rate, repeated patterns | 403, 429, CAPTCHAs, timeouts | Request volume | | Run proxies | Blocks, geo targeting | A separate vendor bill and a new failure source | Request volume | | Write retries | Transient errors, rate limits | Duplicate work or gaps in the data | Number of sites | | Monitor output | Silent breakage | A report that looks wrong days later | Number of sites | | Handle pagination | Cursor or page changes | Missing or repeated pages | Number of endpoints | None of this is exotic. It's ordinary engineering, and the issue is that it never finishes. If you run pagination loops against anything, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python) for the safe version. ## How does the cost compare with per-call pricing? Price a scraper by multiplying hours by your loaded hourly rate, then compare it with calls times the per-call price. The only figure you need from us is the credits per call. Perceptlayer gives 100 free credits once, after you verify an email address, and sells prepaid packs with no subscription and no seats. The [pricing](https://perceptlayer.com/pricing) page shows what credits cost. | Pack | Credits | Included rate (requests a second) | | --- | --- | --- | | Starter | 10,000 | 5 | | Build | 50,000 | 5 | | Growth | 200,000 | 5 | | Pro | 500,000 | 5 | | Scale | 1,000,000 | 10 | | Volume | 5,000,000 | 20 | | Volume 10M | 10,000,000 | 25 | | Volume 25M | 25,000,000 | 25 | | Volume 50M | 50,000,000 | 50 | A successful call costs the credits shown on its endpoint, which is 1 credit for nearly all of them. Failed calls cost nothing. Purchased credits last 12 months. ### A worked example Take 100,000 calls a month at 1 credit each: 100,000 calls × 1 credit = 100,000 credits a month. That fits inside one Growth pack of 200,000 credits, which lasts about two months at that rate. Now the scraper side. The hours below are an assumption, not a measurement; replace them with your own. Say one engineer spends 8 hours a month on selector fixes, block handling and monitoring, at an assumed $100 an hour. That's $800 a month, before proxy fees and servers. To decide which is cheaper, use the break-even form: monthly calls × 1 credit = credits a month; price those credits on the pricing page and compare with monthly upkeep Work in credits first. At 1 credit per call, your monthly calls are your monthly credits. Then check the [pricing](https://perceptlayer.com/pricing) page for what that many credits cost in the pack you'd buy. Set that against your upkeep, which is $800 in this example. If the credits come to less than the upkeep, the API is cheaper. If they come to more, the scraper is cheaper, as long as upkeep stays where it is. The comparison flips when volume is very high and upkeep is low, because per-call cost grows with volume and upkeep mostly doesn't. Do the sum with your own numbers. ## Scraper vs API: how do they compare side by side? An in-house scraper gives you control over every field and no per-call fee, at the price of owning every failure. An API gives you a stable JSON contract and a predictable bill, at the price of being limited to the endpoints and fields it offers. The table compares the two across the things that decide maintenance. | Concern | In-house scraper | Perceptlayer API | | --- | --- | --- | | Output shape | Whatever your parser extracts | JSON with named fields from every endpoint | | Layout changes | Your selectors break, you fix them | Not your parser | | Blocks and proxies | Yours to manage and pay for | Not part of your code | | Retries | You write and tune the policy | `Retry-After` on 429 and 503; you still write the loop | | Failure signal | Often silent | HTTP status plus `{"error": {"code", "message", "request_id"}}` | | Cost model | Engineer hours, proxies, servers | Credits per successful call; failed calls cost nothing | | Coverage | Any page you can read | 480 websites, 2,782 endpoints | | Custom fields | Anything on the page | Only what the endpoint returns | | Spend visibility | Infrastructure bills | `X-Credits-Used` and `X-Credits-Remaining` on every successful response | An API doesn't remove error handling. You still write a retry loop and decide what to do with a 502 `source_error`. What it removes is the part that depends on someone else's HTML. See the [errors reference](https://docs.perceptlayer.com/errors) and the [rate limits](https://docs.perceptlayer.com/rate-limits) for what to handle. Data is collected from publicly available sources and returned as found at the time of the call. That means you should validate it the way you would any third-party feed. ## Which should your team choose? Choose by team size and by how many sources you need, because maintenance cost scales with sources while an API's cost scales with calls. The verdicts below are plain recommendations, not rules. They assume the data you need is in the catalogue; check the [list of APIs](https://perceptlayer.com/apis) first. | Situation | Verdict | | --- | --- | | Solo developer or small team, a few sources, no one to own upkeep | Use an API. You'd be your own on-call for the scraper. | | Team building an AI agent that needs many sources | Use an API, over HTTP or [MCP](https://docs.perceptlayer.com/ai-agents). One key beats a scraper per site. | | Data team with a stable list of sources and a dedicated engineer | Start with an API and keep a scraper only for gaps. | | Platform team with one source at very high volume | Cost both. A scraper may win if upkeep is low and volume is huge. | | Source isn't in any catalogue | Build a scraper. | ### Small teams If nobody owns the scraper, nobody fixes it. The silent failures arrive at the worst time, and the person who wrote the parser has moved on. A per-call price is easier to defend than an engineer's time spent on selectors. ### Agent builders Agents call many sources, and a scraper per source multiplies upkeep. One key and a catalogue you can search cuts that to a single integration. The MCP server at `https://perceptlayer.com/mcp` has `search_endpoints` and `get_endpoint` (both free) and `call_endpoint`, which spends credits on success only. Cap the spend with the approach in [AI agent API cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs). ### Larger data teams You have the people to run a scraper. The question is whether you should. Put the first few sources on the API, measure the hours you get back, and keep scrapers where the catalogue has no coverage. The [data engineering hub](https://perceptlayer.com/blog/category/data-engineering) has related pipeline guidance. ## When is a scraper the right call? Build a scraper when the data isn't available any other way, when you need fields an API doesn't expose, or when your volume makes per-call pricing the larger cost. Those cases are real, and an article that pretended otherwise wouldn't help you. Each comes with a condition. - **The source isn't covered.** If no catalogue lists the website, you have no choice. Check [the APIs list](https://perceptlayer.com/apis) before you start. - **You need page-specific fields.** An API returns the fields its endpoint defines. If you need something visible on the page but absent from the JSON, a scraper can read it. - **A website offers its own official API that fits.** Use it. An official API is a contract from the site owner, and that's the most stable source you can get. - **Volume dwarfs upkeep.** Once your monthly calls pass the break-even point from the worked example, against one stable page, a scraper's fixed upkeep can undercut per-call pricing. - **You need exact control over timing and raw HTML.** Archiving pages or replaying parsers over stored HTML needs the HTML itself. Even then, keep it small. Scrape only what you're allowed to, keep the parser narrow, and log which fields came back empty. ## How do you move from a scraper to an API? Run both side by side for a week, compare the fields, then switch one source at a time. The comparison tells you whether the API covers the fields you actually use. You need a free key and one call per source to find out. 1. [Get a free API key](https://perceptlayer.com/signup). Keys start with `sk_live_`, and the free tier gives 100 credits on signup with no credit card. 2. Send the key in the `X-API-Key` header, as in [the authentication docs](https://docs.perceptlayer.com/authentication). 3. Pick the endpoint that matches your scraper's output and run it in the playground on that API's page. 4. Diff the fields against your scraper's output for the same inputs. Note which fields are missing. 5. Log `X-Credits-Used` and `X-Credits-Remaining` from each successful response so the cost is visible from day one. 6. Switch the source, then retire its selectors and proxy rules. Here is a copyable call. Replace `ENDPOINT_PATH` with the path shown on the endpoint's page, and add that endpoint's parameters as the page lists them ( [request format](https://docs.perceptlayer.com/requests)): ```bash curl -i "https://api.perceptlayer.com/ENDPOINT_PATH" \ -H "X-API-Key: $API_KEY" ``` The `-i` flag prints the response headers, so you can read `X-Credits-Used` and `X-Credits-Remaining`. The response body shape depends on the endpoint, so check the fields on that endpoint's page before you diff against your scraper. The service is prepaid. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited, and there is no automatic top-up. Read [how credits work](https://docs.perceptlayer.com/credits) before you point a job at it. To see what one call returns, [get a free API key](https://perceptlayer.com/signup) and run an endpoint from your current scraper in the playground. ## Frequently asked questions ### Is a web scraper cheaper than an API? It depends on volume and on how many hours upkeep takes. A scraper has no per-call fee, but you pay for selector fixes, proxies, servers and monitoring. Perceptlayer charges 1 credit per successful call, so 100,000 calls × 1 credit = 100,000 credits. Check [pricing](https://perceptlayer.com/pricing) for what those credits cost, then set that against your upkeep. Eight hours a month at an assumed $100 an hour is $800. Run the sum with your own figures. ### How often does a scraper break? There's no fixed rate, because it depends on how often each site changes its markup. What matters is that breakage is unscheduled and often silent: the request succeeds but a selector returns nothing. Plan for it by checking that key fields are populated on every run and alerting when output volume drops. ### Does an API remove the need for retries? No. You still retry transient failures. Perceptlayer returns `Retry-After` with the seconds to wait on 429 and 503 responses. Requests have no idempotency key, so a call whose reply was lost to a client timeout may have succeeded and been billed. Failed calls cost nothing and return `X-Credits-Used: 0`. ### Can I use both a scraper and an API? Yes. Use the API for sources it covers and keep a scraper for gaps in coverage or fields it doesn't return. Keep the scraper narrow, and treat each remaining scraper as a cost you chose, with an owner and a reason. ### Are scraping and APIs both legal? That depends on the site's terms, the data and your jurisdiction, so this isn't legal advice. Read the terms of any site you scrape and respect its robots rules. Some Perceptlayer endpoints return social, personal or SEO data and need the restricted-endpoint terms accepted in the dashboard first. web scraping scraper vs api maintenance cost data engineering retries monitoring ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 31 Oct 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Extract Data From a Website: Pages, Sites and APIs](https://perceptlayer.com/blog/extract-data-from-website) Three ways to extract data from a website: one page as markdown or JSON, every URL on a site with map, or structured records. 1 credit per call. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "Glassdoor API: Company Reviews and Salaries as JSON" description: "Find a Glassdoor employer ID, then pull reviews and salary percentiles as JSON. Real responses, parameters and 1 credit per call." url: https://perceptlayer.com/blog/glassdoor-salary-data-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Glassdoor API: Company Reviews and Salaries as JSON 6 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read Glassdoor's own API is closed to new developers, so you can't sign up for one. The Perceptlayer Glassdoor API returns the same kind of data as JSON instead: search a company by name, take its `employer_id`, then call the reviews, overview and salaries endpoints. Each successful call costs 1 credit, and failed calls cost nothing. ## Key takeaways - Glassdoor's partner API stopped taking new applications in 2021, so a self-serve key from Glassdoor isn't available. - The flow is two steps: `companies-search` returns an `id` for the employer, and every other company endpoint takes that value as `employer_id`. - `companies-reviews` returns company-level review fields (rating, pros, cons, job title, location) plus paging fields such as `total_pages` and `has_more`. - `salaries` returns `total_pay` percentiles from `p10` to `p90` per employer, and an overall `estimate` block for the job title. - All 13 Glassdoor endpoints cost 1 credit per successful call, and the free tier gives 100 credits on signup. ## Is there an official Glassdoor API you can still use? Not for a new project. Glassdoor's Partner API program was [closed to new applications in 2021](https://providers.apievangelist.com/providers/glassdoor/) (API Evangelist, 2021), and Zuplo's guide to the API says the same: [Glassdoor closed off public access to its API in 2021](https://dev.to/zuplo/what-is-the-glassdoor-api-how-to-use-it-and-alternatives-35d7) (Zuplo, 2024). That leaves no self-serve route where you request a key and start calling. If you hold an existing partner agreement, use it: that's the first-party route and the one with Glassdoor's terms attached. If you don't, the options are scraping the pages yourself or calling an API that returns the public data as JSON. For the maintenance side of the first option, see [what maintaining a scraper really involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost). ## What does the Glassdoor API return? The [Glassdoor API](https://perceptlayer.com/apis/glassdoor) has 13 endpoints in the [Jobs area](https://perceptlayer.com/verticals/jobs). Eight cover companies (search, autocomplete, overview, reviews, benefits, interviews, photos and jobs), two return salaries ( `salaries` and `salaries-estimate`), two cover job listings ( `jobs-search` and `jobs-details`) and one searches locations. Every response is JSON with named fields, and the data is collected from publicly available sources and returned as found at the time of the call. | Endpoint | Returns | Credits | Required | Optional | | --- | --- | --- | --- | --- | | [`/v1/glassdoor/companies-autocomplete`](https://perceptlayer.com/apis/glassdoor/companies-autocomplete) | Companies Autocomplete | 1 | `query` | none | | [`/v1/glassdoor/companies-search`](https://perceptlayer.com/apis/glassdoor/companies-search) | Companies Search | 1 | `query` | `page`, `limit` | | [`/v1/glassdoor/companies-overview`](https://perceptlayer.com/apis/glassdoor/companies-overview) | Companies Overview | 1 | `employer_id` | none | | [`/v1/glassdoor/companies-reviews`](https://perceptlayer.com/apis/glassdoor/companies-reviews) | Companies Reviews | 1 | `employer_id` | `page`, `limit` | | [`/v1/glassdoor/salaries`](https://perceptlayer.com/apis/glassdoor/salaries) | Salaries | 1 | `job_title` | `employer_id`, `page`, `limit` | | [`/v1/glassdoor/jobs-search`](https://perceptlayer.com/apis/glassdoor/jobs-search) | Jobs Search | 1 | `keyword` | `cursor` | The string parameters ( `query`, `job_title`, `keyword`) accept up to 100 characters. `employer_id` and the paging parameters `page` and `limit` are integers. The catalogue doesn't document defaults or page sizes for `page` and `limit`, so read `page`, `total_pages` and `has_more` from each response instead of assuming a size. ## How do you find a company's employer ID? Call `companies-search` with the company name. The response lists matching employers, and each one has an `id` you pass as `employer_id` to the other endpoints. The search can return several employers with similar names, so check the name and `review_count` before you pick one. ```bash curl "https://api.perceptlayer.com/v1/glassdoor/companies-search?query=Stripe" \ -H "X-API-Key: $API_KEY" ``` A recorded response, trimmed: ```json { "success": true, "data": { "query": "Stripe", "companies": [ { "id": 671932, "name": "Stripe", "rating": 3.8, "review_count": 1619, "salary_count": 4702, "job_count": 3 }, { "id": 5554043, "name": "Stripe OLT", "rating": 4, "review_count": 24, "salary_count": 38, "job_count": 0 } ], "page": 1, "total_pages": 5, "has_more": true }, "meta": { "endpoint_family": "company_search", "billable": true } } ``` Two employers match "Stripe". The first, `671932`, has 1,619 reviews; the second has 24. A script that blindly takes `companies[0]` works here, but for ambiguous names it's safer to compare `name` exactly and fall back to the highest `review_count`. For a type-ahead box rather than a full result list, [`companies-autocomplete`](https://perceptlayer.com/apis/glassdoor/companies-autocomplete) takes the same `query` parameter. Use `companies-search` when you need the counts and ratings to disambiguate. ## How do you get company reviews as JSON? Pass the employer ID to `companies-reviews`. The response holds a `company` object, a `reviews` array and paging fields. In the recorded Stripe response, `total_reviews` is 1564 across 157 pages. Reviews are returned as company-level data: a rating, free text, a job title and a location, with no reviewer names. ```bash curl "https://api.perceptlayer.com/v1/glassdoor/companies-reviews?employer_id=671932" \ -H "X-API-Key: $API_KEY" ``` A recorded response, trimmed: ```json { "success": true, "data": { "company": { "id": 671932, "name": "Stripe", … }, "reviews": [ { "id": 106035163, "date": "2026-10-20T11:12:55Z", "summary": "Progressive environment with intense performance expectations", "pros": "Progressive workplace environment\nGood benefits\nGood compensation", "cons": "Intense performance ecosystem\nOffice is moving to less convenient location", "rating": 4, "job_title": "Software Engineer", "is_current_employee": true, "location": "Toronto, ON" }, { "id": 106018689, "rating": 3, "ratings": { "career_opportunities": 3, "compensation_and_benefits": 3, "culture_and_values": 3, "diversity_and_inclusion": 4, "senior_leadership": 3, "work_life_balance": 3 }, … } ], "page": 1, "total_pages": 157, "total_reviews": 1564, "has_more": true }, … } ``` ### Which review fields can you rely on? The excerpt above shows the first review in full and only the rating fields of the second; the full recorded sample has two reviews. Both carry `id`, `date`, `summary`, `pros`, `cons`, `rating`, `job_title`, `is_current_employee` and `location`. Only the second also carries a `ratings` object (shown above) with `career_opportunities`, `compensation_and_benefits`, `culture_and_values`, `diversity_and_inclusion`, `senior_leadership` and `work_life_balance`. Treat `ratings` as optional in your code. `pros` and `cons` are plain strings with line breaks ( `\n`), and some reviewers format them as bullet lists with leading dashes. Split on newlines and strip a leading `- ` if you want one point per row. ### What can you do with review data? Aggregate it. Average `rating` per month, count reviews by `job_title`, or split by `is_current_employee` to compare current and former staff. Because every review has an `id`, you can store them and deduplicate when you re-pull. Keep the analysis at company level: group and count, and don't try to identify who wrote a review. ## How do you get salary data by job title? Call `salaries` with a `job_title`. `employer_id` is optional. In the recorded call below, which doesn't pass it, the response holds rows for several employers plus an `estimate` block for the whole title. Each row has base pay, additional pay and `total_pay` percentiles. ```bash curl "https://api.perceptlayer.com/v1/glassdoor/salaries?job_title=software+engineer" \ -H "X-API-Key: $API_KEY" ``` A recorded response, trimmed: ```json { "success": true, "data": { "job_title": "software engineer", "salaries": [ { "job_title": "Software Engineer", "employer": { "id": 9079, "name": "Google", "rating": 4.4 }, "currency": "USD", "pay_period": "ANNUAL", "base_pay_mean": 184722.83, "additional_pay_mean": 126972.82, "total_pay": { "p10": 207909.08, "p25": 251388.51, "p50": 311695.65, "p75": 396273.52, "p90": 486503.67 } }, … ], "page": 1, "total_pages": 10438, "total_results": 104377, "has_more": true, "estimate": { "location": "United States", "confidence": "CONFIDENT", "salaries_count": 727155, "total_pay": { "p10": 99464.84, "p50": 152101.59, "p90": 237195.82 }, … } }, … } ``` ### How do you read the percentiles? In this recording, the Google row has a `total_pay` median ( `p50`) of 311,695.65 USD a year, against 152,101.59 USD for the `estimate` across all employers in the United States. The gap between `base_pay_mean` (184,722.83) and `additional_pay_mean` (126,972.82) shows why total pay, not base pay, is the field to compare for employers that pay in stock and bonuses. Two cautions. These are figures as found at the time of the call, not a guarantee of accuracy, and the `estimate` carries its own `confidence` value and `salaries_count`. Check both before you quote a number. Also, with 10,438 pages for one title, don't page through everything: plan your questions so one page answers them. ### Which parameters narrow a salary query? | Parameter | Type | Required | Use | | --- | --- | --- | --- | | `job_title` | string, up to 100 characters | yes | The title to look up, such as `software engineer` | | `employer_id` | integer | no | An employer `id` from `companies-search` | | `page` | integer | no | Move through results; read `total_pages` and `has_more` | | `limit` | integer | no | Ask for a number of rows per page | ## What does it cost to pull a company's data? Every Glassdoor endpoint is 1 credit per successful call, and a failed call returns `X-Credits-Used: 0` and bills nothing. A full pull of one company is cheap: one search call, one overview call and one call per page of reviews. Using the recorded Stripe numbers, 157 pages of reviews means 157 calls. The arithmetic: 1 search + 1 overview + 157 review pages = 159 credits. The 100 free credits you get on signup after verifying an email address cover the search, the overview and the first 98 review pages, with no credit card; the rest of the pull needs a pack. At volume, you buy prepaid credit packs of 10,000 (Starter), 50,000 (Build), 200,000 (Growth), 500,000 (Pro), 1,000,000 (Scale) or 5,000,000 (Volume) credits. Purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Tracking 100 employers, each pulled once with all 157 pages as in the Stripe example, is 100 × 159 calls × 1 credit = 15,900 credits. That's more than the Starter pack's 10,000 and within the Build pack's 50,000. Real companies vary widely in review count, so read `total_pages` from the first reviews response before you loop. See [credits in the docs](https://docs.perceptlayer.com/credits). Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so you can stop a loop when the balance gets low. The service is prepaid: when credits run out, calls return `insufficient_credits` (402) and nothing more is debited. ## How do you handle errors and rate limits? Errors come back with an HTTP status and a JSON body: `{"error": {"code", "message", "request_id"}}`. The ones you'll meet on this API are `invalid_parameters` (422) for parameters the endpoint doesn't accept, `invalid_api_key` (401), `insufficient_credits` (402), `rate_limited` (429) and `temporarily_unavailable` (503). For 429 and 503, wait the number of seconds in the `Retry-After` header and try again. Requests have no idempotency key, so if a client timeout hides the reply, the call may have succeeded and been billed. Count that possibility in your retry logic, and see [the error codes](https://docs.perceptlayer.com/errors) and [rate limits](https://docs.perceptlayer.com/rate-limits) in the docs. The pattern is covered in [retrying web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice). ## How do you page through a long reviews list? Loop on `page` until `has_more` is false. Start at 1, keep the `id` of every review you store, and stop early if `X-Credits-Remaining` falls under your floor. On a 429 or 503, wait the `Retry-After` seconds and retry the same page. The loop below needs only `requests`. ```python import os import time import requests BASE = "https://api.perceptlayer.com/v1/glassdoor" HEADERS = {"X-API-Key": os.environ["API_KEY"]} CREDIT_FLOOR = 50 def get(path, **params): while True: r = requests.get(f"{BASE}/{path}", headers=HEADERS, params=params, timeout=30) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "1"))) continue r.raise_for_status() return r.json()["data"], int(r.headers["X-Credits-Remaining"]) (found, _) = get("companies-search", query="Stripe") company = found["companies"][0] reviews, page = {}, 1 while True: data, remaining = get("companies-reviews", employer_id=company["id"], page=page) for review in data["reviews"]: reviews[review["id"]] = review if not data["has_more"] or remaining < CREDIT_FLOOR: break page += 1 print(company["name"], len(reviews), "reviews;", remaining, "credits left") ``` Keying the dictionary on `id` means a repeated page can't create duplicates. A free account is limited to 1 request a second (60 a minute), so the 157 pages of the Stripe example take about 3 minutes, and a 429 sends the loop to sleep for the `Retry-After` it is given. Paid accounts run at least 5 requests a second. If a client timeout hides a reply, that page may have been billed once already, which the `id` keys absorb on the re-pull but the credits don't. For a fuller treatment, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python), and to avoid paying twice for the same page, [cache API responses](https://perceptlayer.com/blog/cache-web-data-api-responses). Run the first call in the playground on the [Glassdoor API page](https://perceptlayer.com/apis/glassdoor) to see the shape before you write code, then [get a free API key](https://perceptlayer.com/signup). For authentication details, see [the docs](https://docs.perceptlayer.com/authentication). If you're building job-market tooling, the [Indeed Jobs API guide](https://perceptlayer.com/blog/indeed-jobs-api-json) covers postings, and the [Trustpilot reviews guide](https://perceptlayer.com/blog/trustpilot-reviews-api) covers customer reviews of the same companies. ## APIs in this post - [Glassdoor **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/glassdoor) ## Frequently asked questions ### Does Glassdoor have a public API? Not one you can join today. Its Partner API was [closed to new applications in 2021](https://providers.apievangelist.com/providers/glassdoor/) (API Evangelist, 2021), and [public access to the API ended that year](https://dev.to/zuplo/what-is-the-glassdoor-api-how-to-use-it-and-alternatives-35d7) (Zuplo, 2024). The Perceptlayer Glassdoor API fills that gap with six endpoints and one key, at 1 credit per successful call. ### How much does the Glassdoor API cost? Each of the 13 endpoints costs 1 credit per successful call. You get 100 free credits after verifying an email, with no credit card. Paid packs start at 10,000 credits (Starter), so 10,000 calls × 1 credit = 10,000 credits; [pricing](https://perceptlayer.com/pricing) has what credits cost. Failed calls cost nothing. ### Can I get reviewer names from the reviews endpoint? The recorded `companies-reviews` response has no reviewer names. Each review has a rating, summary, pros, cons, job title, employment status and location. That fits company-level analysis such as rating trends and themes, and you should keep your analysis at that level too. ### How do I get salaries for one company only? Look up the company with `companies-search`, then call `salaries` with both `job_title` and that company's `employer_id`, which is an optional parameter. The recorded call without it returned rows across many employers plus an overall `estimate`. Check the rows' `employer` field for the company you asked about. Both forms cost 1 credit per call. ### Can an AI agent call these endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing; `call_endpoint` spends the endpoint's 1 credit on success. Setup is in the [MCP docs](https://docs.perceptlayer.com/ai-agents). glassdoor company reviews salary data jobs ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Glassdoor Scraper or API: What You Get](https://perceptlayer.com/blog/glassdoor-scraper-vs-api) A Glassdoor scraper vs 1-credit company, review and salary calls: recorded Stripe data, 157 pages for a full review backfill, and the weekly cost per company. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Indeed Scraper or API: Postings, Companies, Salaries](https://perceptlayer.com/blog/indeed-scraper-vs-api) An Indeed scraper parses five kinds of page; 9 Indeed endpoints return them as JSON at 1 credit a call. A recorded Berlin search is 0.05 credits a posting. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 20 Sept 2026 Perceptlayer 7 min read ## [Salary Data from Job Sites: Reading Ranges Without Bias](https://perceptlayer.com/blog/salary-data-job-sites-bias) Glassdoor's salaries endpoint returns p10 to p90 total pay, a currency and a national count. How to read those ranges and the biases of self-reported pay. --- title: "Google Images API: Search Image Results as JSON" description: "One GET to /v1/google-images/images returns image results as JSON for 1 credit: parameters, cURL and Python calls, a real response and licensing notes." url: https://perceptlayer.com/blog/google-images-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Images API: Search Image Results as JSON 6 Aug 2026 Perceptlayer 7 min read You can get Google Images results as JSON with one call: `GET /v1/google-images/images` with a `q` parameter and your key in the `X-API-Key` header. Each result in the array has a thumbnail, the page it came from, the original image URL and its pixel size. A successful call costs 1 credit, and a failed call costs nothing. Results are pointers to other people's images, not licensed assets, so read the licensing section before you reuse any of them. ## Key takeaways - `GET /v1/google-images/images` takes one required parameter, `q`, and nine optional ones: `hl`, `gl`, `imgsz`, `imgtype`, `imgcolor`, `imgar`, `tbs`, `safe` and `page`. - Each result carries `position`, `thumbnail`, `source`, `title`, `link`, `original`, `original_width`, `original_height` and `is_product`. - A successful call costs 1 credit, so 20,000 searches cost 20,000 credits. Failed calls return `X-Credits-Used: 0`. - `link` is the page that shows the image and `original` is the file itself. Neither tells you whether you may reuse the image. - The free tier gives 100 credits after you verify an email address, with no credit card. ## How do you get Google Images results as JSON? Send a GET request to `https://api.perceptlayer.com/v1/google-images/images` with the search text in `q` and your key in the `X-API-Key` header. The response is a JSON array, one object per image result, with named fields instead of a page of HTML to parse. The call costs 1 credit when it succeeds and nothing when it fails. Here is the smallest useful request: ```bash curl "https://api.perceptlayer.com/v1/google-images/images?q=coffee" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_`. If your client can't set headers, the `api_key` query parameter works too, though a header keeps the key out of logs and URLs. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both. You can also run the same call without writing code in the playground on the [Google Images API page](https://perceptlayer.com/apis/google-images). ## Which parameters does the Images endpoint take? The endpoint has one required parameter, `q`, and nine optional ones that narrow the results by language, country, size, type, colour, aspect ratio and safe-search setting. The table lists every parameter and the values the endpoint documents for it. Nothing beyond these is documented, so don't rely on defaults or a fixed page size. | Parameter | Type | Required | Allowed values or limit | | --- | --- | --- | --- | | `q` | string | yes | Search text | | `hl` | string | no | Up to 2 characters | | `gl` | string | no | Up to 2 characters | | `imgsz` | string | no | `large`, `medium`, `icon` | | `imgtype` | string | no | `photo`, `clipart`, `lineart`, `gif`, `face` | | `imgcolor` | string | no | `color`, `gray`, `trans`, `red`, `orange`, `yellow`, `green`, `teal`, `blue`, `purple`, `pink`, `white`, `black`, `brown` | | `imgar` | string | no | `tall`, `square`, `wide` | | `tbs` | string | no | Up to 500 characters | | `safe` | string | no | `active`, `off` | | `page` | integer | no | Page number | Use `imgsz`, `imgtype`, `imgcolor` and `imgar` before anything else, because they have fixed values and invalid ones are rejected with an `invalid_parameters` (422) error. A wide, large photo search looks like this: ```bash curl "https://api.perceptlayer.com/v1/google-images/images?q=coffee&imgsz=large&imgtype=photo&imgar=wide&safe=active" \ -H "X-API-Key: $API_KEY" ``` The `hl` and `gl` parameters accept up to two characters each, which fits a language code and a country code. The `tbs` parameter takes a free-form string of up to 500 characters. The [endpoint page](https://perceptlayer.com/apis/google-images/images) is the reference for the full list. ## What does a response look like? The response is a JSON array of result objects, ordered by `position`. This excerpt is a real response to the `q=coffee` request above, trimmed with `…` where results and long URLs were cut: ```json [ { "position": 1, "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:…", "source": "Wikipedia", "title": "Coffee - Wikipedia", "link": "https://en.wikipedia.org/wiki/Coffee", "original": "https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg?…", "original_width": 3200, "original_height": 2000, "is_product": false }, { "position": 2, "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:…", "source": "InstaCuppa Store", "title": "Easy Coffee Recipe at Home: Simple Cafe-Style Coffee in 2 Minutes", "link": "https://instacuppastore.com/blogs/recipes/easy-coffee-recipe-at-home?…", "original": "https://instacuppastore.com/cdn/shop/articles/blog-easy-coffee-recipe-at-home-cover_….jpg?…", "original_width": 1100, "original_height": 738, "is_product": true } ] ``` | Field | What it holds | | --- | --- | | `position` | The result's rank in the list | | `thumbnail` | A small preview image URL | | `source` | The name of the site that shows the image | | `title` | The title of the page | | `link` | The page the image appears on | | `original` | The full-size image file | | `original_width`, `original_height` | Pixel dimensions of the original | | `is_product` | Whether the result is flagged as a product | The two results show why `link` and `original` are separate. The first image is hosted on Wikimedia Commons and shown on a Wikipedia page. The second comes from a shop's blog post. Same field names, very different owners. ## How do you call it from Python? Python needs only `requests`. The script below searches for large photos, keeps results at least 1,000 pixels wide and prints the page each one came from. It reads the key from the environment and raises on any error status, so a failed call stops the script instead of passing an error body along as data. ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/google-images/images", headers={"X-API-Key": os.environ["API_KEY"]}, params={"q": "coffee", "imgsz": "large", "imgtype": "photo"}, timeout=30, ) resp.raise_for_status() print("credits used:", resp.headers.get("X-Credits-Used")) print("credits left:", resp.headers.get("X-Credits-Remaining")) for item in resp.json(): if item["original_width"] >= 1000: print(item["position"], item["source"], item["link"]) ``` Two headers help here. `X-Credits-Used` shows what the call cost and `X-Credits-Remaining` shows your balance afterwards. If a request times out on your side, it may still have succeeded and been billed, because requests have no idempotency key. The [errors docs](https://docs.perceptlayer.com/errors) list every code and what to do about each. ## Can you reuse the images you find? Not automatically. A search result tells you where an image appears, not that you may copy it. Google's own help page says that "images might be subject to copyright" and tells you to confirm an image's license information through the license details link and the host site ( [Google Search Help](https://support.google.com/websearch/answer/29508), 2026). Treat every result as owned by someone else until you've checked. The API gives you the facts needed for that check, but not the licence itself. Here is a practical way to use the fields: 1. **Keep `link` with every image.** It is the page you will need to open to find the owner, the licence or a contact. Store it next to `original`. 2. **Don't hotlink `original`.** The file belongs to the host, which can change or remove it, and serving it from your own pages may breach their terms. 3. **Check the licence on the host page.** Google documents a `license` property in image structured data that sites can use to earn a Licensable badge, which links to the licence and usage details ( [Google Search Central, Image license metadata](https://developers.google.com/search/docs/appearance/structured-data/image-license-metadata), 2026). A site that doesn't publish this isn't granting you anything. 4. **Treat `is_product` results with extra care.** Product images are usually a seller's or brand's marketing material. 5. **Ask when in doubt.** Licences differ. Some require attribution and some prohibit commercial use, so the host page or the owner is the only authority. This is general guidance, not legal advice. If your product republishes images, take advice on the licences that apply. ## What is it good for instead? Reading image results as data is safe in ways that copying them isn't. The metadata and the pointers are the useful part, and you can build on them without storing a single image file. - **Visual research.** Count which sites appear for a query, and read `source` and `title` to see how a topic is illustrated. - **Product and brand monitoring.** Filter on `is_product` to see which shops show an item, with a `link` to each page. - **Asset sourcing.** Build a shortlist of candidates with sizes from `original_width` and `original_height`, then clear each one with its owner or a licensed library. - **Agent tools.** Give an agent a search tool that returns titles and page links, so it can cite where an image appears rather than reproducing it. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) explain the MCP server, which exposes the same endpoint through `call_endpoint`. If you need web results rather than images, see [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json). For product prices, see [Google Shopping API: Product Prices and Offers as JSON](https://perceptlayer.com/blog/google-shopping-api-product-prices). ## What does it cost? Each successful call to `/v1/google-images/images` costs 1 credit. A failed call costs 0 and returns `X-Credits-Used: 0`. There is no per-seat fee or subscription, and purchased credits last 12 months. New accounts get 100 free credits after verifying an email address, with no credit card. | Searches | Credits | | --- | --- | | 1,000 | 1,000 | | 20,000 | 20,000 | | 50,000 | 50,000 | Twenty thousand calls × 1 credit = 20,000 credits, which fits inside the Build pack's 50,000. The [pricing page](https://perceptlayer.com/pricing) has what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) explain how debits work. Rate limits are per account and counted per minute: free accounts get 1 request a second, and [the rate limits docs](https://docs.perceptlayer.com/rate-limits) cover paid rates and the `Retry-After` header on 429 responses. To run your first search, [get a free API key](https://perceptlayer.com/signup) and paste the cURL call above. Then try `imgcolor` or `imgar` in the playground on the [Google Images API page](https://perceptlayer.com/apis/google-images). ## APIs in this post - [Google Images **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/google-images) ## Frequently asked questions ### Is there an official Google Images API? This endpoint is not an official Google service. It returns Google Images results as JSON from publicly available sources, as found at the time of the call. If you need a licensed, contractual image source, a stock library or the image owner's own API will fit better than a search result. ### How much does a Google Images search cost? A successful call costs 1 credit, so 10,000 searches cost 10,000 credits. Failed calls cost nothing and return `X-Credits-Used: 0`. The free tier includes 100 credits on signup with no credit card, and the [pricing page](https://perceptlayer.com/pricing) lists what credit packs cost. ### Can I use the images that come back? Not by default. Google says images might be subject to copyright and advises confirming license information with the host site. Use `link` to find the owner, check the licence there, and don't assume that a visible or downloadable file is free to publish or sell. ### How do I filter by size, colour or type? Add `imgsz` ( `large`, `medium`, `icon`), `imgtype` ( `photo`, `clipart`, `lineart`, `gif`, `face`), `imgcolor` or `imgar` ( `tall`, `square`, `wide`) to the request. Values outside the allowed lists return an `invalid_parameters` (422) error. Failed calls aren't billed. ### What happens if I hit the rate limit? You get a `rate_limited` (429) response with a `Retry-After` header giving the seconds to wait. Rate-limit headers ( `RateLimit-Remaining`, `RateLimit-Reset`) show how much of the minute is left. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover the details. google images image search search api json licensing ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Nov 2026 Perceptlayer 8 min read ## [Google Images Scraper or API: What You Get](https://perceptlayer.com/blog/google-images-scraper-vs-api) Compare a Google Images scraper with one 1-credit call that returns position, source, link, original URL, pixel size and is\_product for each result. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 27 Oct 2026 Perceptlayer 8 min read ## [News API Options: Google News and Search as JSON](https://perceptlayer.com/blog/news-api-comparison) Compare three news API routes: Google News returns headline, source.name, iso\_date and link per article; web search endpoints don't. 1 credit a query. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 21 Aug 2026 Updated 6 Nov 2026 Perceptlayer 6 min read ## [DuckDuckGo Search API: Web Results as JSON](https://perceptlayer.com/blog/duckduckgo-search-api-json) DuckDuckGo's Instant Answer API returns topic summaries, not ranked links. GET /v1/duckduckgo/search returns organic results and paging at 1 credit per query. --- title: "Google Search API: Get Search Results as JSON | Perceptlayer" description: "Call GET /v1/google-search/search for organic results as JSON at 1 credit a call. Parameters, a real recorded response and the cost in credits." url: https://perceptlayer.com/blog/google-search-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Search API: Get Search Results as JSON 6 Aug 2026 Perceptlayer 7 min read One GET request to `/v1/google-search/search` with a `query` returns Google search results as JSON: organic results with position, title, link and snippet, plus related searches. It costs 1 credit per successful call, and failed calls cost nothing. This matters now because Google's own Custom Search JSON API is closed to new customers. ## Key takeaways - Google's Custom Search JSON API is closed to new customers, and existing customers have until January 1, 2027 to move to something else. - `GET /v1/google-search/search` takes one required parameter, `query`, and returns `organic_results`, `related_searches` and `people_also_search_for` in the recorded response. - Each successful call costs 1 credit, so 1,000 calls cost 1,000 credits; see [pricing](https://perceptlayer.com/pricing) for what credits cost. Custom Search charges $5 per 1,000 queries. - The Google Search API has 7 endpoints, covering standard results, AI Overviews, AI Mode, place details and autocomplete. - You get 100 free credits after verifying an email address, with no credit card. ## Why does the Custom Search JSON API no longer work for new projects? Google's documentation states that ["the Custom Search JSON API is closed to new customers"](https://developers.google.com/custom-search/v1/overview) and that existing customers have until January 1, 2027 to transition to an alternative. The page points to Vertex AI Search for searching up to 50 domains. If you need results from the open web as JSON, you need a different source. That is a real constraint if you were planning to start on it today. A new project can't get a key, and an old one has a deadline. Google's page also lists the pricing that still applies to current users: 100 queries a day free, then $5 per 1,000 queries, up to 10,000 queries a day. Vertex AI Search is the better fit if your goal is search over a fixed set of your own sites. It is a different product from "give me the results page for this query as JSON". For that job, the rest of this article shows the replacement request. ## How do you get Google search results as JSON? Send a GET request to `https://api.perceptlayer.com/v1/google-search/search` with your query and your key in the `X-API-Key` header. The response is JSON with named fields, not a page of HTML. If you don't have a key yet, [get a free API key](https://perceptlayer.com/signup); the [authentication docs](https://docs.perceptlayer.com/authentication) cover the header and the `api_key` query parameter alternative. ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` `hl` sets the interface language and `safe=off` turns off safe search. Both are optional. Only `query` is required. You can also run the same call from the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search): pick the endpoint, fill in the parameters and run it with your key. ## What does the response look like? The recorded response for the request above starts with `search_information`, followed by an `organic_results` array. Each entry carries the fields below, taken from the recorded output. The excerpt is trimmed with `…`. ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "displayed_link": "https://andershusa.com › best-restaurants-berlin-german...", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. It holds two Michelin stars, has been frequently ranked on The World's 50 ...", "snippet_highlighted_words": [ "Tim Raue is the most internationally renowned restaurant in Berlin" ], "source": "Anders & Kaitlin", "rank_group": 1, "rank_absolute": 4 }, … ], "related_searches": [ { "query": "Best restaurants in Berlin for tourists", "link": "https://www.google.com/search?safe=off&gl=us&hl=en&complete=0&pws=0&nfpr=1&q=Best+restaurants+in+Berlin+for+tourists" }, … ], "people_also_search_for": [ { "name": "Best restaurants in Berlin for tourists", "query": "Best restaurants in Berlin for tourists", "link": "https://www.google.com/search?safe=off&gl=us&hl=en&complete=0&pws=0&nfpr=1&q=Best+restaurants+in+Berlin+for+tourists" }, … ], … } ``` The recorded response also includes a `redirect_link` on each organic result, which we cut from the excerpt for length. | Field | What it holds | | --- | --- | | `search_information.query_displayed` | The query as the results page displayed it | | `search_information.organic_results_count` | A count of organic results (6 in this recording) | | `organic_results[].position` | The result's position in the organic list | | `organic_results[].title`, `link`, `snippet` | The heading, destination URL and text snippet | | `organic_results[].displayed_link` | The shortened URL shown under the title | | `organic_results[].source` | The site name shown for the result | | `organic_results[].rank_group`, `rank_absolute` | Rank within the organic group, and the absolute rank on the page | | `related_searches[]`, `people_also_search_for[]` | Suggested follow-up queries with their links | Note the difference between `position` and `rank_absolute`. In the recording, the first organic result has `position` 1 and `rank_absolute` 4, so the two fields measure different things. If you track rankings, store both. ## Which parameters does the search endpoint take? `GET /v1/google-search/search` takes one required parameter, `query`, and a long list of optional ones for location, language, filters and paging. The ones most readers need are in the table below. Allowed values come from the endpoint's parameter list; no defaults or page sizes are documented, so don't assume any. | Parameter | Type | What it does | | --- | --- | --- | | `query` | string, required | The search text | | `location` | string, up to 500 characters | The location to search from | | `gl` | string, up to 2 characters | Country code for the search | | `hl` | string, up to 2 characters | Interface language | | `google_domain` | string, up to 50 characters | Which Google domain to use | | `safe` | `active` or `off` | Safe search | | `tbm` | `isch`, `vid`, `nws`, `lcl`, `shop`, `pts` | Search vertical: images, video, news, local, shopping, patents | | `device` | `desktop`, `tablet`, `mobile` | The device type to search as | | `start`, `page`, `amount` | integer | Paging controls | | `include_thumbnails` | `0`, `1`, `true`, `false` | Whether to include thumbnails | The full list also has `uule`, `cr`, `lr`, `tbs`, `as_qdr`, `kgmid`, `filter`, `nfpr`, `udm` and several other Google-specific parameters. The [Search endpoint page](https://perceptlayer.com/apis/google-search/search) lists every one with its limits. If you're paging through results, the [pagination guide](https://perceptlayer.com/blog/paginate-web-data-api-python) shows a safe loop pattern. ## What are the other six Google Search endpoints for? The Google Search API has 7 endpoints, and each costs 1 credit per call. Pick by the job: the standard and advanced search endpoints return the results page, one endpoint returns the AI Overview, another returns AI Mode answers, one returns place details, and two lighter endpoints cover search and autocomplete. | Endpoint | Use it for | Required parameter | | --- | --- | --- | | [`/v1/google-search/search`](https://perceptlayer.com/apis/google-search/search) | Standard search results | `query` | | [`/v1/google-search/search-advanced`](https://perceptlayer.com/apis/google-search/search-advanced) | Search with the same parameter set as `search` | `query` | | [`/v1/google-search/search-light`](https://perceptlayer.com/apis/google-search/search-light) | Lighter search with `num`, `dateRestrict`, `sort` and `rights` | `query` | | [`/v1/google-search/search-light-autocomplete`](https://perceptlayer.com/apis/google-search/search-light-autocomplete) | Autocomplete suggestions, with `hl` and `limit` | `query` | | [`/v1/google-search/search-ai-overview`](https://perceptlayer.com/apis/google-search/search-ai-overview) | The AI Overview for a query | `query` | | [`/v1/google-search/google-ai-mode-search`](https://perceptlayer.com/apis/google-search/google-ai-mode-search) | Google AI Mode search, with `follow_up_token` for follow-ups | `q` | | [`/v1/google-search/search-advanced-place`](https://perceptlayer.com/apis/google-search/search-advanced-place) | Place details, via `detail_url` or `svid` | none | Two details trip people up. AI Mode uses `q`, not `query`. And `search-advanced-place` has no required parameter; you pass a `detail_url` or `svid` instead. If you're migrating from Custom Search, look at `search-light` first. Its parameters ( `num`, `start`, `dateRestrict`, `sort`, `rights`, `cr`, `lr`, `safe`, `filter`) use names that will look familiar. We haven't recorded a response for it, so check the output in the playground before you map fields. Treat it as a candidate, not a drop-in swap. ## How much does a call cost compared with Custom Search? A successful call costs 1 credit, so 1,000 calls cost 1,000 credits. Credits come in prepaid packs from 10,000 credits (Starter) up to 5,000,000 (Volume), and the [pricing page](https://perceptlayer.com/pricing) shows what each pack costs. Google's Custom Search charges [$5 per 1,000 queries](https://developers.google.com/custom-search/v1/overview) after 100 free queries a day, capped at 10,000 queries a day. | Option | Cost of 1,000 calls | | --- | --- | | Custom Search JSON API (closed to new customers) | $5 per 1,000 queries | | Google Search API here | 1,000 calls × 1 credit = 1,000 credits | The arithmetic for 10,000 queries: 10,000 calls × 1 credit = 10,000 credits, which equals the Starter pack's 10,000. The 100 free credits on signup cover 100 of those calls, once. Custom Search at $5 per 1,000 would be $50 for the same volume, ignoring its free daily queries. Failed calls cost nothing and return `X-Credits-Used: 0`. Successful responses carry `X-Credits-Used` and `X-Credits-Remaining`, so you can track the balance in code. Purchased credits last 12 months, and there's no subscription. The [credits docs](https://docs.perceptlayer.com/credits) explain how calls are counted. One trade-off to be plain about: Custom Search is Google's own service. If you already have access and it fits, staying until the January 1, 2027 deadline is reasonable. For anything new, it's no longer an option. ## What happens when a call fails? Errors return an HTTP status and a JSON body shaped like `{"error": {"code", "message", "request_id"}}`. Common codes are `invalid_api_key` (401), `insufficient_credits` (402), `invalid_parameters` (422), `rate_limited` (429) and `temporarily_unavailable` (503). The [errors docs](https://docs.perceptlayer.com/errors) list them all. Rate-limited and temporarily unavailable responses include a `Retry-After` header with the seconds to wait. There's no idempotency key, so a request that timed out on your side may have succeeded and been billed. The guide to [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers how to handle that, and the [rate limit docs](https://docs.perceptlayer.com/rate-limits) have the rest. If you're feeding results to an agent, the same key works over MCP. See [Claude MCP web search](https://perceptlayer.com/blog/claude-agent-live-search-mcp) and the [MCP docs](https://docs.perceptlayer.com/ai-agents). Next step: [get a free API key](https://perceptlayer.com/signup), then run the Berlin request above and compare `organic_results` with what you get today. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Is the Google Custom Search JSON API still available? Only to existing customers. Google's documentation says the API is closed to new customers and that existing customers have until January 1, 2027 to move to an alternative. Google lists Vertex AI Search for searching up to 50 domains. For general web results as JSON, you need another source. ### How much does a Google search API call cost here? Each successful call to a Google Search endpoint costs 1 credit. That works out to 1,000 credits for 1,000 calls. The free tier gives 100 credits after email verification, with no credit card required, and the [pricing page](https://perceptlayer.com/pricing) shows what credits cost. ### Can I get AI Overviews and autocomplete as JSON? Yes. `GET /v1/google-search/search-ai-overview` takes a `query` and returns the AI Overview, and `GET /v1/google-search/search-light-autocomplete` returns autocomplete suggestions. Both cost 1 credit. We haven't recorded responses for them, so run each in the playground on the API page to see the fields. ### Am I billed when a request fails? No. Failed calls cost nothing and return `X-Credits-Used: 0`. The one exception to watch is a client timeout: with no idempotency key, a request whose reply you never received may have succeeded and been billed. Check `X-Credits-Remaining` on your next call. ### What if a call returns restricted\_endpoint? Restricted endpoints cover social, personal and SEO data. They work after you accept the restricted-endpoint terms in the dashboard, and until then they return `restricted_endpoint` (403). If you see that code, accept the terms and retry the same call. google search serp search api json custom search ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 21 Aug 2026 Updated 6 Nov 2026 Perceptlayer 6 min read ## [DuckDuckGo Search API: Web Results as JSON](https://perceptlayer.com/blog/duckduckgo-search-api-json) DuckDuckGo's Instant Answer API returns topic summaries, not ranked links. GET /v1/duckduckgo/search returns organic results and paging at 1 credit per query. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Aug 2026 Perceptlayer 8 min read ## [Bing Search API Alternative: Web Results as JSON](https://perceptlayer.com/blog/bing-search-api-alternative-json) Replace Microsoft's retired Bing Search API with three search endpoints at 1 credit per call. Parameters compared, real responses, and where results differ. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Jul 2026 Perceptlayer 7 min read ## [Google AI Overview API: Get AI Overviews as JSON](https://perceptlayer.com/blog/google-ai-overview-api) Google has no AI Overview API. GET /v1/google-search/search-ai-overview takes a query, hl and gl, costs 1 credit, and suits daily keyword tracking. --- title: "AutoScout24 API: Search European Car Listings as JSON" description: "Search AutoScout24 listings as JSON: make_id and price filters, a recorded BMW response, and what a monthly price sweep costs in credits." url: https://perceptlayer.com/blog/autoscout24-api-car-listings-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # AutoScout24 API: Search European Car Listings as JSON 4 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read One GET request to `/v1/autoscout24/search` returns AutoScout24 car listings as JSON: price, mileage, first registration, power, fuel, location and seller. You filter by `make_id`, `model_id`, price, mileage and more, and the `taxonomy` endpoint tells you which make and model values are valid. Each call costs 1 credit, and failed calls cost nothing. ## Key takeaways - `GET /v1/autoscout24/search` takes no required parameters; `market`, `make_id`, `model_id`, `price_min`, `price_max` and `sort` narrow and order the results. - `GET /v1/autoscout24/taxonomy` supplies the valid makes and models, so you never guess a `make_id` or `model_id`. - The recorded response nests price, mileage, power and location, and ends with a `pagination` block ( `total`, `total_pages`, `has_more`, `next_page`) you can loop on. - Every call on this API costs 1 credit. A sweep of 10 pages for each of 50 make and model pairs is 500 credits. The 100 free credits you get on signup cover a test on 10 of the pairs. ## What does the AutoScout24 search endpoint return? The search endpoint returns a page of listings for a market, each with a `listing_id`, the listing `url`, a `title`, a nested `price`, `mileage` and `first_registration`, `power` in kW and PS, `fuel`, `transmission`, `make`, `model`, `location`, `seller` and `images`. A `pagination` object follows the listings. It is the call to start with when you want many cars filtered by criteria rather than one known listing. The [AutoScout24 API](https://perceptlayer.com/apis/autoscout24) has six endpoints, all 1 credit per call. Search is the broad one. The others fetch a single [listing](https://perceptlayer.com/apis/autoscout24/listing), a [dealer](https://perceptlayer.com/apis/autoscout24/dealer), a dealer's [inventory](https://perceptlayer.com/apis/autoscout24/dealer-inventory) or its [reviews](https://perceptlayer.com/apis/autoscout24/dealer-reviews), and the [taxonomy](https://perceptlayer.com/apis/autoscout24/taxonomy) of valid filter values. ## How do you make your first search request? Send a GET to `/v1/autoscout24/search` with your key in the `X-API-Key` header and any filters as query parameters. The call below asks the German market for one make and model priced between 5,000 and 20,000, sorted by price, and takes page 2 at 20 results per page. [Get a free API key](https://perceptlayer.com/signup) first if you don't have one; see [authentication](https://docs.perceptlayer.com/authentication) for the details. ```bash curl "https://api.perceptlayer.com/v1/autoscout24/search?market=de&make_id=13&model_id=1639&price_min=5000&price_max=20000&sort=price&page=2&limit=20" \ -H "X-API-Key: $API_KEY" ``` You can also run it from the playground on the [AutoScout24 search page](https://perceptlayer.com/apis/autoscout24/search), which fills in the same parameters and runs a real call with your key. ### What does the recorded response look like? This is an excerpt of the recorded response for the request above, trimmed with `…`. The first listing is a 2013 BMW 316 Touring diesel with 215,000 km, listed by a dealer in Mainz-Kastel. ```json { "success": true, "data": { "listings": [ { "listing_id": "f81b29b2-19e3-4418-8801-03578ed51631", "title": "BMW 316 Touring 316d", "price": { "amount": 5700, "currency": "EUR", "formatted": "€ 5.700", "evaluation": 2, "is_evaluation_enabled": true }, "mileage": { "value_km": 215000, "unit": "km", "raw": "215.000 km" }, "first_registration": { "raw": "06/2013", "year": 2013, "month": 6 }, "power": { "kw": 85, "ps": 116 }, "fuel": "Diesel", "transmission": "Schaltgetriebe", "make": "BMW", "model": "316", "model_group": "3er", "variant": "Touring", "motor_type": "316d", "location": { "country_code": "DE", "zip": "55252", "city": "Mainz-Kastel" }, "seller": { "id": "32515898", "type": "Dealer", "dealer_slug": "rheinkastelautomobile" }, … }, … ], "pagination": { "page": 2, "limit": 20, "total": 193, "total_pages": 10, "has_more": true, "next_page": 3 } }, "meta": { "duration_ms": 2183, "endpoint_family": "search" } } ``` A few details matter when you parse it. `price.amount` is a number and `price.formatted` is the display string, so use the number. `mileage.value_km` and `first_registration.year` are numeric too, while `raw` keeps the original text. The `fuel` and `transmission` values come back as text, and in the recorded `de` response the transmission is German ( `Schaltgetriebe`). The second listing in the same recording has `seller.type` set to `PrivateSeller` and carries no `dealer_slug`, while the dealer listing does. Check that the key exists before you use it, because `dealer_slug` is the required input of the dealer endpoints. ## Which parameters does the search endpoint take? Search has 25 optional parameters and no required ones. They cover location ( `market`, `zip`, `radius`), the car ( `make_id`, `model_id`, `fuel[]`, `transmission[]`, `body_type[]`, `equipment[]`, `usage_state[]`), numeric ranges, the seller, ordering and paging. Since nothing is required, narrow the search with at least a make or a price range before you page through results. | Parameter | Type | Allowed values or notes | | --- | --- | --- | | `market` | string | `de`, `at`, `be`, `it`, `fr`, `nl`, `es`, `com`, `pl` | | `make_id`, `model_id` | string | Up to 12 characters; get valid values from taxonomy | | `price_min`, `price_max` | integer | Price range | | `mileage_min`, `mileage_max` | integer | Mileage range | | `registration_year_min`, `registration_year_max` | integer | First registration year range | | `power_min`, `power_max` | integer | Used with `power_unit` | | `power_unit` | string | `kw`, `ps` | | `fuel[]` | list of string | `2`, `3`, `B`, `C`, `D`, `E`, `H`, `L`, `M`, `O` | | `transmission[]` | list of string | `A`, `M`, `S` | | `body_type[]` | list of integer | `1`, `2`, `3`, `4`, `5`, `6`, `7`, `12`, `13` | | `equipment[]` | list of integer | Equipment IDs | | `seller_type` | string | `dealer`, `private` | | `offer` | string | `new`, `used`, `annual`, `N`, `U`, `J` | | `usage_state[]` | list of string | `N`, `U` | | `zip`, `radius` | string, integer | Search around a postcode; `zip` up to 12 characters | | `sort` | string | `standard`, `price`, `age`, `mileage`, `year`, `power`, `make`, `distance`, `financerate`, `leasing_rate` | | `order` | string | `asc`, `desc` | | `page`, `limit` | integer | Paging | The fuel, body type and equipment codes are opaque. Ask the taxonomy endpoint for them rather than guessing, which is the next section. ## How do you find a valid make\_id and model\_id? Call `/v1/autoscout24/taxonomy` with `include[]` set to the lists you want: `makes`, `models`, `equipment`, `body_types`, `fuels`, `transmissions`, `sorting_keys`, `offers`, `radii` or `countries`. `make_id` is also a taxonomy parameter, which is how you ask for the models of one make. Each taxonomy call costs 1 credit. ```bash curl -g "https://api.perceptlayer.com/v1/autoscout24/taxonomy?market=de&include[]=makes&include[]=fuels" \ -H "X-API-Key: $API_KEY" ``` The `-g` flag stops cURL from treating the square brackets as a glob. We don't have a recorded taxonomy response, so we won't show one here. Run it in the [taxonomy playground](https://perceptlayer.com/apis/autoscout24/taxonomy) to see the exact shape for your market. The workflow is two steps. Look up the make in taxonomy and take its ID, call taxonomy again with that `make_id` and `include[]=models` to find the model, then pass both IDs to search. The example request above uses `make_id=13` and `model_id=1639`; in the recorded response those IDs resolve to BMW 316 models. ## How do you sweep prices for a whole month? Loop over your make and model pairs, page through each until `has_more` is false, and write one row per listing with a date. The recorded request had `total: 193` and `total_pages: 10` at 20 per page, so one pair cost 10 calls. The script below does that and stops on any non-success response, so you never page blindly past an error. ```python import os import time import requests BASE = "https://api.perceptlayer.com/v1/autoscout24/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def sweep(make_id, model_id, market="de", limit=20): page, rows, credits = 1, [], 0 while page: resp = requests.get( BASE, headers=HEADERS, params={ "market": market, "make_id": make_id, "model_id": model_id, "sort": "price", "page": page, "limit": limit, }, timeout=30, ) if resp.status_code == 429: time.sleep(int(resp.headers.get("Retry-After", 1))) continue resp.raise_for_status() credits += int(resp.headers["X-Credits-Used"]) data = resp.json()["data"] for item in data["listings"]: rows.append( { "listing_id": item["listing_id"], "price": item["price"]["amount"], "km": item["mileage"]["value_km"], "year": item["first_registration"]["year"], "city": item["location"]["city"], } ) page = data["pagination"]["next_page"] if data["pagination"]["has_more"] else None return rows, credits rows, credits = sweep(13, 1639) print(len(rows), "listings,", credits, "credits") ``` The 429 branch waits for the `Retry-After` header and retries the same page, as described in the [rate limits](https://docs.perceptlayer.com/rate-limits) docs. Free accounts get 1 request a second, so a loop like this is fine as written. Because requests have no idempotency key, a timeout may have succeeded and been billed, so check `X-Credits-Remaining` if you retry after one. The [errors](https://docs.perceptlayer.com/errors) page covers the other failure codes. ### What does the sweep cost in credits? Every call is 1 credit, so the cost is the number of pages. As an example, suppose you track 50 make and model pairs and each runs to 10 pages: 50 × 10 = 500 calls × 1 credit = 500 credits a month. Add 10 taxonomy calls to refresh the model lists and the month is 510 credits. The 100 free credits that come with a verified email address cover a first test on 10 of the pairs, and a Starter pack of 10,000 credits covers a year of the full sweep (12 × 510 = 6,120 credits). The pair count and the pages per pair are assumptions for this example. Your real numbers depend on how many results each filter returns, which you see in `pagination.total` after the first call. Failed calls return `X-Credits-Used: 0`, and `X-Credits-Remaining` shows your balance after every call. See [credits](https://docs.perceptlayer.com/credits) for how billing works and [pricing](https://perceptlayer.com/pricing) for what credits cost. ## Which market and filters should you use? Choose the `market` that matches where you want listings, since `market` takes one of nine values: `de`, `at`, `be`, `it`, `fr`, `nl`, `es`, `com` or `pl`. In the recorded `de` response the listing URLs are on autoscout24.de and the transmission text is German ( `Schaltgetriebe`), so keep the market fixed within one sweep and store it in each row. Two filters keep sweeps comparable. Fix `sort` and `order` so pages don't reshuffle between runs, and use `registration_year_min` and `registration_year_max` to compare cars of the same age. Use `seller_type` to separate `dealer` from `private` listings, so a dealer average and a private-seller average aren't blended into one number. That's our suggestion, not something the data requires. If you already know a dealer, `dealer-inventory` takes a `dealer_slug` and pages through that dealer's stock at the same 1 credit per call. In the recorded response, the dealer listing carries a `dealer_slug` in its `seller` object, which you can pass to the dealer endpoints. ## Is the official route a better fit? If you are a dealer or partner of AutoScout24 and need data about your own stock, ask AutoScout24 directly what it offers through its own sites, such as [AutoScout24 Germany](https://www.autoscout24.de) or [AutoScout24 international](https://www.autoscout24.com); we don't document its programmes here. Perceptlayer's endpoint is for reading public listings across a market, and the data is collected from publicly available sources and returned as found at the time of the call. For what to do with the fields once you have them, [used car listing data for price analysis](https://perceptlayer.com/blog/used-car-listing-data-price-analysis) covers which ones matter. The wider [Cars APIs](https://perceptlayer.com/verticals/cars) page lists the other sources in this area, and the [all APIs](https://perceptlayer.com/apis) index has the full catalogue of 480 websites and 2,782 endpoints. ## What should you do next? Create a free key, open the [search endpoint in the playground](https://perceptlayer.com/apis/autoscout24/search), and run the BMW request above with your own make and market. Then call taxonomy once to swap in your IDs, and wrap the sweep script around your list. Calls on this API cost 1 credit each, so you can check the result against `X-Credits-Remaining` as you go. [Get a free API key](https://perceptlayer.com/signup). ## APIs in this post - [AutoScout24 **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/autoscout24) ## Frequently asked questions ### Is there an official AutoScout24 API? We don't cover any AutoScout24 programme here, so ask AutoScout24 directly if you need an official feed. The Perceptlayer endpoint returns public listing data as JSON, collected from publicly available sources, and is billed at 1 credit per successful call. ### How much does an AutoScout24 search cost? A successful call to search costs 1 credit, and so does every other endpoint on this API. Failed calls cost nothing and return `X-Credits-Used: 0`. Ten pages for one make and model is 10 credits. Every account gets 100 free credits after verifying an email address, with no credit card. ### How do I page through all the results? Read the `pagination` object in each response. Keep requesting `next_page` while `has_more` is true, and stop when it is false. In the recorded response, `total` was 193 and `total_pages` was 10 at a `limit` of 20, so you would make 10 calls, each at 1 credit. ### What happens if I send an invalid parameter? You get an HTTP 422 with the code `invalid_parameters` and a JSON body of `{"error": {"code", "message", "request_id"}}`. Failed calls aren't billed. Check the parameter against the allowed values in the table above, and take `make_id` and `model_id` from the taxonomy endpoint. The [errors](https://docs.perceptlayer.com/errors) page lists every code. ### Can an AI agent call this endpoint? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. An agent can look up the AutoScout24 search endpoint for free, then call it with an endpoint ID and parameters, spending 1 credit on success only. See [AI agents (MCP)](https://docs.perceptlayer.com/ai-agents) for setup. cars autoscout24 car listings used cars price data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 8 min read ## [Autotrader Scraper or API: What You Get](https://perceptlayer.com/blog/autotrader-scraper-vs-api) An Autotrader UK scraper vs a 1-credit search call: a recorded BMW search near SW1A 1AA with 42,916 results, advert\_id, price.amount and year as JSON. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 9 Oct 2026 Perceptlayer 7 min read ## [Cars.com API: Used Car Listings and Price Evaluations](https://perceptlayer.com/blog/cars-com-api-listings-price-evaluation) Search Cars.com listings with its six required parameters (zip, radius\_miles, stock\_type, sort, page, page\_size), then listing, dealer and price-eval calls. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 13 Aug 2026 Updated 10 Nov 2026 Perceptlayer 6 min read ## [AutoTrader UK API: Get Used Car Listings as JSON](https://perceptlayer.com/blog/autotrader-uk-api-listings-json) Search UK used car listings by postcode, make and price with one GET call. Real BMW response, 6 endpoints, 1 credit per call, failed calls free. --- title: "Domain.com.au API: Australian Listings and Suburb Data" description: "Call /v1/domain-com-au/search for Australian listings, then property, auction results and suburb insights as JSON. Parameters, a real response, 1 credit a call." url: https://perceptlayer.com/blog/domain-com-au-api-listings --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Domain.com.au API: Australian Listings and Suburb Data 4 Aug 2026 Perceptlayer 7 min read To get Domain.com.au data as JSON, send a `GET` to `https://api.perceptlayer.com/v1/domain-com-au/search` with a `mode` (buy, rent, sold and others) and a suburb. Each call costs 1 credit and returns listings with address, price text, bedrooms, bathrooms, car spaces and agency. The same API also has property detail, auction results by city and suburb insights. This guide covers all four, and when to call realestate.com.au instead. ## Key takeaways - `GET /v1/domain-com-au/search` needs only `mode`; add `suburb`, `state`, `postcode` and filters such as `min_bedrooms` or `sold_date_range` to narrow it. - A recorded search for Pyrmont, NSW returned `total_results` 85 across `total_pages` 9, so a full sweep of that suburb is 9 calls, or 9 credits. - `auction-results` takes only a `city`, and `suburb-insights` needs `bedrooms` and `property_type` ( `Unit` or `House`). - Domain.com.au and realestate.com.au return different fields. Call both when you need to cross-check a listing. - Every call is 1 credit, failed calls cost nothing, and the free tier gives 100 credits on signup with no card. ## What can you get from the Domain.com.au API? The [Domain.com.au API](https://perceptlayer.com/apis/domain-com-au) has 8 endpoints, all `GET`, all 1 credit per successful call. Four of them are the ones most projects start with: search, property, auction results and suburb insights. The other four cover people and place lookup: agency, agent, agents and locations. | Endpoint | Returns | Required parameters | | --- | --- | --- | | [`/v1/domain-com-au/search`](https://perceptlayer.com/apis/domain-com-au/search) | Listings for a mode and area | `mode` | | [`/v1/domain-com-au/property`](https://perceptlayer.com/apis/domain-com-au/property) | One property | none ( `listing_id` or `slug`) | | [`/v1/domain-com-au/auction-results`](https://perceptlayer.com/apis/domain-com-au/auction-results) | Auction results | `city` | | [`/v1/domain-com-au/suburb-insights`](https://perceptlayer.com/apis/domain-com-au/suburb-insights) | Suburb insights | `bedrooms`, `property_type` | | [`/v1/domain-com-au/locations`](https://perceptlayer.com/apis/domain-com-au/locations) | Location lookup | `q` | | [`/v1/domain-com-au/agents`](https://perceptlayer.com/apis/domain-com-au/agents) | Agents, optionally by suburb | none | | [`/v1/domain-com-au/agent`](https://perceptlayer.com/apis/domain-com-au/agent) | One agent | `slug` | | [`/v1/domain-com-au/agency`](https://perceptlayer.com/apis/domain-com-au/agency) | One agency | `slug` | You authenticate with the `X-API-Key` header. If you don't have a key yet, [get a free API key](https://perceptlayer.com/signup); the [authentication docs](https://docs.perceptlayer.com/authentication) cover the header and the `api_key` query fallback. ## How do you search Australian listings? Call `search` with `mode` set to one of `buy`, `rent`, `sold`, `new-homes`, `commercial` or `rural`, plus the area. A search for properties for sale in Pyrmont, NSW is one request and costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/domain-com-au/search?mode=buy&suburb=Pyrmont&state=NSW&page=1" \ -H "X-API-Key: $API_KEY" ``` The recorded response, trimmed to the first listing: ```json { "success": true, "data": { "mode": "buy", "listing_type": "Sale", "total_results": 85, "total_pages": 9, "page": 1, "page_size": 10, "listings": [ { "listing_id": 2021264183, "listing_slug": "48-1-5-harwood-street-pyrmont-nsw-2009-2021264183", "display_address": "48/1-5 Harwood Street, Pyrmont", "display_price": "For Sale $795,000 | …", "bedrooms": 1, "bathrooms": 1, "carspaces": 1, "property_type": "ApartmentUnitFlat", "agency": { "name": "Ray White Pyrmont", "agency_id": 36143, "logo_url": "…" } }, … ], … }, "meta": { "billable": true } } ``` Two things to note. `display_price` is text as the portal shows it, so a second listing in the same response reads `Auction Guide: $1,100,000`. Parse it before you treat it as a number. And `property_type` is a portal label ( `ApartmentUnitFlat`), not the `Apartment` value you pass in `property_types[]`. The response also has a `facets` object. In this recording it says facet counts aren't available, so don't plan on counting by bedroom from the API alone; filter instead. ### Which search parameters are available? All filters are optional except `mode`. Lists use the `[]` form, repeated for each value. | Parameter | Type | Notes | | --- | --- | --- | | `mode` | string | Required: `buy`, `rent`, `sold`, `new-homes`, `commercial`, `rural` | | `suburb`, `suburbs[]` | string, list | Up to 80 characters each | | `region`, `state`, `postcode` | string | `state` up to 40, `postcode` up to 10 characters | | `page` | integer | Page number | | `property_types[]` | list | `House`, `Apartment`, `Townhouse`, `Land`, `Rural`, `NewApartments`, `NewHomeDesigns`, `NewHouseLand` | | `listing_attributes[]` | list | `HasPhotos`, `HasPrice`, `HasMatterport`, `NotUpForAuction`, `MarkedAsNew`, `NotUnderContract` | | `min_bedrooms`, `max_bedrooms` | integer | Bedroom range | | `min_bathrooms`, `max_bathrooms` | integer | Bathroom range | | `min_carspaces`, `max_carspaces` | integer | Car space range | | `min_price`, `max_price` | integer | Price range | | `min_land_area`, `max_land_area` | integer | Land area range | | `sold_date_range` | string | `ALL`, `LAST_WEEK`, `LAST_MONTH`, `LAST_THREE_MONTHS`, `LAST_SIX_MONTHS`, `LAST_YEAR`, `LAST_TWO_YEARS` | For recent sales, switch the mode and add a date range: ```bash curl "https://api.perceptlayer.com/v1/domain-com-au/search?mode=sold&suburb=Pyrmont&state=NSW&sold_date_range=LAST_THREE_MONTHS" \ -H "X-API-Key: $API_KEY" ``` If you're unsure how a suburb is spelled or slugged, [`locations`](https://perceptlayer.com/apis/domain-com-au/locations) takes a `q` string and optional `mode` ( `sale` or `rent`) and `channel`, and resolves it first. ## How do you get one property from a listing? Pass the `listing_id` or the `listing_slug` from a search result to `property`. Both parameters are optional in the schema, but you need one of them, so a typical flow is search first, then one detail call per listing you care about. Each detail call is 1 credit. ```bash curl "https://api.perceptlayer.com/v1/domain-com-au/property?listing_id=2021264183" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a `property` response for this guide, so we won't list its fields here. The [Property endpoint page](https://perceptlayer.com/apis/domain-com-au/property) has a playground where you can run it with your key and see the real fields before you write a parser. Budget for this pattern. A search page returns a batch of listings in one credit, then each detail call is another. Pulling detail for every listing on one 10-listing page costs 1 + 10 = 11 credits. ## How do you get auction results and suburb insights? `auction-results` takes one required parameter, `city`, and `suburb-insights` takes `bedrooms` and `property_type`. Each is a single call at 1 credit, which makes them cheap context to attach to a search. ```bash curl "https://api.perceptlayer.com/v1/domain-com-au/auction-results?city=Sydney" \ -H "X-API-Key: $API_KEY" ``` For suburb insights, pick a suburb by `slug`, or give a bounding box with `top_left[latitude]`, `top_left[longitude]`, `bottom_right[latitude]` and `bottom_right[longitude]`. `property_type` is `Unit` or `House`, a different vocabulary from the search filter. ```bash curl -G "https://api.perceptlayer.com/v1/domain-com-au/suburb-insights" \ --data-urlencode "slug=$SUBURB_SLUG" \ --data-urlencode "bedrooms=2" \ --data-urlencode "property_type=Unit" \ -H "X-API-Key: $API_KEY" ``` Set `SUBURB_SLUG` to the suburb's slug, which you can look up with `locations`. A bad parameter returns `invalid_parameters` (422) and costs nothing; see the [errors docs](https://docs.perceptlayer.com/errors). We haven't recorded responses for these two endpoints either. Run them in the playground on the [Domain.com.au API page](https://perceptlayer.com/apis/domain-com-au) to see which fields come back for your suburb. ## Domain.com.au or realestate.com.au: which should you call? Call Domain.com.au when you want its listing fields, auction results by city or suburb insights. Call [realestate.com.au](https://perceptlayer.com/apis/realestate-com-au) when you want its listing shape, agency ratings or its sales events. For many projects the answer is both, because the two portals return different fields for a listing. The difference shows in the recorded responses. Domain's search listing is flat: `display_price`, `bedrooms`, `carspaces` and an `agency` with an `agency_id`. The realestate.com.au search listing is nested: counts sit under `features` (for example `features.bedrooms.value`), the address is split into `address.suburb`, `address.state` and `address.postcode`, and the listing company carries `ratingsReviews` with `avgRating` and `totalReviews`. | Need | Domain.com.au | realestate.com.au | | --- | --- | --- | | Search by area | `search` with `mode`, `suburb`, `state` | [`search`](https://perceptlayer.com/apis/realestate-com-au/search) with `location`, `channel` | | One property | `property` by `listing_id` or `slug` | [`property`](https://perceptlayer.com/apis/realestate-com-au/property) by `url` | | Auction data | [`auction-results`](https://perceptlayer.com/apis/domain-com-au/auction-results) by `city` | [`sales-events`](https://perceptlayer.com/apis/realestate-com-au/sales-events) by `state` or `url` | | Suburb data | `suburb-insights` | `suburb-profile` by `url` | | Agent and agency | `agent`, `agency` by `slug` | [`agent-profile`](https://perceptlayer.com/apis/realestate-com-au/agent-profile), [`agency-profile`](https://perceptlayer.com/apis/realestate-com-au/agency-profile) by `url` | Note how the lookups differ. Domain's detail calls take IDs and slugs, while realestate.com.au's take full `url` values, which you copy from a search result's `url` field. Here is the realestate.com.au equivalent of the Pyrmont call, using its own parameter names: ```bash curl "https://api.perceptlayer.com/v1/realestate-com-au/search?location=Sydney%2C+NSW&channel=buy&page=1" \ -H "X-API-Key: $API_KEY" ``` A trimmed excerpt of its recorded response: ```json { "success": true, "data": { "channel": "buy", "location": "Sydney, NSW", "total_results": 596, "listings": [ { "id": "149311860", "url": "https://www.realestate.com.au/property-apartment-nsw-sydney-149311860", "property_type": "Apartment", "address": { "suburb": "Sydney", "state": "NSW", "postcode": "2000" }, "price": "Contact Agent", "features": { "bedrooms": { "value": 2 }, … }, … }, … ], … } } ``` Because the portals use different IDs, you can't join listings on an ID. Match on address instead; the article on [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers that. ## What does it cost, and what are the limits? Every endpoint here is 1 credit per successful call. Failed calls cost nothing and return `X-Credits-Used: 0`. Free accounts get 100 credits after verifying an email, with no credit card, and the [credits docs](https://docs.perceptlayer.com/credits) explain how they're counted. Worked examples, all at 1 credit a call: - One suburb sweep, using the recorded Pyrmont result: 9 pages × 1 credit = 9 credits. - That sweep plus a `property` call for each of its 85 listings: 9 + 85 = 94 credits. - The same 94-credit job run weekly for 4 weeks: 4 × 94 = 376 credits. The 100 free credits cover the first week; the rest needs a pack, and the 10,000-credit Starter pack covers it. - 20,000 calls × 1 credit = 20,000 credits, which fits the 50,000-credit Build pack. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Rate limits are per account: free accounts get 1 request a second (60 a minute). A `429` carries a `Retry-After` header with the seconds to wait, as do `503` responses. Requests have no idempotency key, so a request that timed out on your side may still have been billed. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) show how to read the `RateLimit-*` headers. ## When should you use Domain's official API instead? If you need something beyond reading public listings, such as managing listings you hold, use Domain's own developer program. Its [developer portal](https://developer.domain.com.au/) lists API packages such as Agents & Listings, Listing Management, Price Estimation and Properties & Locations, with sandbox testing before you go live. Perceptlayer fits the read-only case: one key, JSON from public listing pages, and a free key after you verify an email address. It also puts both Australian portals behind the same key and the same response envelope. Data is collected from publicly available sources and returned as found at the time of the call, so check it against the portal if a decision depends on it. For the next step, [run a search in the playground](https://perceptlayer.com/apis/domain-com-au/search) with your key, or see the wider [real estate APIs](https://perceptlayer.com/verticals/real-estate). If you're comparing how other markets look, the [Rightmove API guide](https://perceptlayer.com/blog/rightmove-api-property-data) does the same for the UK. ## APIs in this post - [Domain.com.au **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/domain-com-au) - [realestate.com.au **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/realestate-com-au) ## Frequently asked questions ### Is there a Domain.com.au API I can call with a free key? Yes. With a Perceptlayer key you call `https://api.perceptlayer.com/v1/domain-com-au/...` directly, sending the key in `X-API-Key`. Free accounts get 100 credits after email verification, and each endpoint call is 1 credit. Domain's own developer program is a separate product with its own sign-up. ### How do I get all pages of a suburb search? Read `total_pages` from the first response and loop `page` from 1 to that number. In the recorded Pyrmont search, `total_results` was 85 and `total_pages` was 9, so a full pull is 9 calls and 9 credits. Stay under your account's request rate, and honour `Retry-After` on a 429. ### How do I search sold properties? Set `mode=sold` on `search` and add `sold_date_range`, which accepts `ALL`, `LAST_WEEK`, `LAST_MONTH`, `LAST_THREE_MONTHS`, `LAST_SIX_MONTHS`, `LAST_YEAR` or `LAST_TWO_YEARS`. You can combine it with `suburb`, `state`, `property_types[]` and the bedroom filters. The call costs 1 credit like any other. ### What happens if a call fails? You aren't charged. Errors return an HTTP status and a JSON body with `error.code`, `error.message` and `request_id`, and the response carries `X-Credits-Used: 0`. Codes include `invalid_parameters` (422), `rate_limited` (429) and `source_error` (502); the [errors docs](https://docs.perceptlayer.com/errors) list the rest and what to do for each. ### Can an AI agent call these endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing; `call_endpoint` spends the endpoint's 1 credit on success only. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents). real estate australia domain.com.au listings suburb data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Sept 2026 Perceptlayer 6 min read ## [Realestate.com.au API: Australian Listings as JSON](https://perceptlayer.com/blog/realestate-com-au-api-listings) Search realestate.com.au by location and channel (buy, rent, sold), then open each listing by URL. Parameters, a recorded Sydney response and the cost. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. --- title: "Bing Search API Alternative: Web Results as JSON" description: "Replace Microsoft's retired Bing Search API with three search endpoints at 1 credit per call. Parameters compared, real responses, and where results differ." url: https://perceptlayer.com/blog/bing-search-api-alternative-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Bing Search API Alternative: Web Results as JSON 2 Aug 2026 Perceptlayer 8 min read Microsoft retired its Bing Search APIs on August 11, 2025, so any code still calling them has to move. One replacement is `GET /v1/bing/search`, which returns Bing web results as JSON for 1 credit per successful call. If you'd rather change engines, `/v1/brave/search` and `/v1/duckduckgo/search` use the same key and the same cost. This guide compares the three by parameters and response shape. ## Key takeaways - Microsoft retired the Bing Search APIs on August 11, 2025; `GET /v1/bing/search` takes one required parameter, `query`, and returns web results as JSON. - Brave ( `/v1/brave/search`) and DuckDuckGo ( `/v1/duckduckgo/search`) offer the same key and cost (1 credit per call) but different parameters and fields from Bing's, so each needs its own small mapping. - Microsoft's `q`, `count`, `offset` and `webPages.value[]` map to `query`, `num`, `page` and `data[]`; the table in the migration section lists each pair. - Result sets differ by engine, and so do page-size fields. In the one recorded query below, the Bing and Brave top results did not overlap, which is an example and not a benchmark. - Failed calls cost nothing and return `X-Credits-Used: 0`; the free tier is 100 credits on signup, so the first 100 test queries cost no money. ## Why did the official Bing Search API go away? Microsoft announced the retirement in May 2025 and set August 11, 2025 as the date existing instances were decommissioned, with the product closed to new sign-ups ( [Microsoft Lifecycle announcement](https://learn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement), 2025). Microsoft pointed customers to Bing grounding in its Azure AI Agents offering instead ( [The Register](https://www.theregister.com/2025/05/15/bing_search_apis_retired/), 2025). That route fits if your search call already lives inside an Azure agent. It does not help if you want a plain HTTP call that returns a list of links and snippets to your own code, which is what most pipelines using the old API did. The endpoints below are Perceptlayer's own, not Microsoft's. The path, parameters and response shape are different, so expect to change your client code and not only the URL. ## How do Microsoft's old names map to the new endpoint? Microsoft's Bing Web Search API v7 used `q`, `count`, `offset`, `safeSearch` and `setLang` as query parameters and returned results under `webPages.value[]` with `name`, `url` and `snippet` ( [Microsoft query parameters](https://learn.microsoft.com/en-us/bing/search-apis/bing-web-search/reference/query-parameters) and [response objects](https://learn.microsoft.com/en-us/bing/search-apis/bing-web-search/reference/response-objects), 2025). The table pairs each with its closest counterpart on `GET /v1/bing/search`. | Microsoft v7 (old) | `/v1/bing/search` (new) | What changes | | --- | --- | --- | | `q` | `query` | Renamed. Microsoft allowed the `site:` operator inside `q`; here `site` is its own parameter | | `count` | `num` | Renamed. Microsoft documented a default of 10 and a maximum of 50; this endpoint's `num` limits aren't documented, so test before relying on them | | `offset` (zero-based count of results to skip) | `page` (integer) | Skip-count paging becomes page-number paging; recompute your loop | | `safeSearch`: `Off`, `Moderate`, `Strict` | `safe`: `off`, `moderate`, `strict` | Renamed and lower-cased | | `setLang`, `mkt` | `hl` | One language parameter; its accepted values aren't documented here | | `Ocp-Apim-Subscription-Key` header | `X-API-Key` header | Different key, see [authentication](https://docs.perceptlayer.com/authentication) | | `webPages.value[]` | `data[]` | The list moves to the top level | | `name` | `title` | Renamed | | `snippet` | `description` | Renamed | | `url` | `url` | Same name | | `displayUrl` | `domain` | Not the same thing: `domain` is the host name | | `webPages.totalEstimatedMatches` | `results_on_page` | Different meaning: a count for this page, not an estimate for the query | Microsoft's other answer types (images, news, `relatedSearches` and the rest) don't appear in the recorded Bing response below, which holds only `data`, `results_on_page` and `source`. If your code read those answers, check whether you still need them. ## What does the Bing search endpoint take? `GET /v1/bing/search` has one required parameter, `query` (up to 500 characters), and six optional ones for paging, site and file-type filtering, safe search, language and raw HTML. A successful call costs 1 credit. The documented parameters are in the table, and the [Bing API page](https://perceptlayer.com/apis/bing) has a playground where you can run it with your key. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | Up to 500 characters | | `page` | integer | no | | | `num` | integer | no | | | `site` | string | no | Up to 253 characters | | `filetype` | string | no | Up to 20 characters | | `safe` | string | no | One of `off`, `moderate`, `strict` | | `hl` | string | no | Up to 20 characters | | `include_html` | boolean | no | | Only the types and limits above are documented, so this guide doesn't state defaults or page sizes. Check them in the playground before you rely on them. ### Request and response The request is one GET with your key in the `X-API-Key` header (see [authentication](https://docs.perceptlayer.com/authentication)): ```bash curl "https://api.perceptlayer.com/v1/bing/search?query=best+web+scraping+api" \ -H "X-API-Key: $API_KEY" ``` This is an excerpt of the recorded response for that exact request: ```json { "data": [ { "position": 1, "title": "Best", "description": "Sep 14, 2026 · Надійний інтернет-провайдер Best ⭐️ Головна ⚡️Швидкість від 200 Мбіт/с до 1 Гбіт/с ⭐️ Працює при …", "url": "https://best.net.ua/", "domain": "best.net.ua" }, … ], "results_on_page": 10, "source": "bing" } ``` Each result has `position`, `title`, `description`, `url` and `domain`. The list sits under `data`, and `results_on_page` says how many results this page held. The snippet text is `description`, and the link is `url`. ## Which parameters change when you switch engines? The three endpoints cover the same job but name their inputs differently: Bing uses `query`, Brave uses `query` or `q`, and DuckDuckGo uses `q` only. Paging also differs, with `page` on Bing and Brave and `start` on DuckDuckGo. Here are the documented parameters side by side, all at 1 credit per call. | | Bing | Brave | DuckDuckGo | | --- | --- | --- | --- | | Path | `/v1/bing/search` | `/v1/brave/search` | `/v1/duckduckgo/search` | | Required | `query` | `query` | `q` | | Paging | `page`, `num` | `page` | `start` | | Language or region | `hl` | `language` | `kl` | | Safe search | `safe`: `off`, `moderate`, `strict` | not listed | `safe`: boolean | | Site filter | `site` | not listed | not listed | | File type | `filetype` | not listed | not listed | | Date filter | not listed | not listed | `df`: `d`, `w`, `m`, `y` | | Raw HTML | `include_html` | `include_html` | not listed | | Credits | 1 | 1 | 1 | "Not listed" means the parameter isn't in the endpoint's documented list. It doesn't prove the engine can't do it, but you can't pass it through this endpoint. If your old code relied on `site` or `filetype`, Bing is the closest match. Brave's `language` accepts words ( `english`, `deutsch`, `french` and others), two-letter codes ( `en`, `de`, `fr`) or `all`. The recorded DuckDuckGo request uses `kl=us-en`; `kl` is a string of up to 10 characters. ## How does each response look? Every engine returns JSON with a ranked list, but the field names and the extras around it differ. Bing returns the leanest body. Brave adds related searches and related questions. DuckDuckGo wraps everything in `success`, `data` and `meta`, and adds pagination and a `knowledge_graph` block. | | Bing | Brave | DuckDuckGo | | --- | --- | --- | --- | | List | `data[]` | `organic_results[]` | `data.organic_results[]` | | URL field | `url` | `link` | `link` | | Text field | `description` | `snippet` | `snippet` | | Extra per-result fields | `domain` | `redirect_link`, `displayed_link`, `source` | `display_url`, `favicon` | | Beyond the list | `results_on_page` | `related_searches`, `related_questions`, `results_count` | `pagination`, `knowledge_graph`, `meta` | Here is an excerpt of the recorded Brave response for the same query, `best web scraping api`: ```json { "search_information": { "query_displayed": "best web scraping api" }, "organic_results": [ { "position": 1, "title": "…The Best Web Scraping API", … } ], "related_questions": [ { "question": "What is the best web scraping API in 2026?", … } ], "results_count": 20, "source": "brave" } ``` And the recorded DuckDuckGo response for `q=laravel+taylor+otwell&kl=us-en&start=0`, trimmed to the pagination block: ```json { "success": true, "data": { "search_parameters": { "q": "laravel taylor otwell", "kl": "us-en", "safe": true, "start": 0 }, … "pagination": { "current": 1, "has_more": true, "next_start": 10, "next": 2 } }, "meta": { "duration_ms": 2169, "endpoint_family": "web_search" } } ``` DuckDuckGo gives you `has_more` and `next_start`, so a page loop can follow the response and doesn't need a guessed offset. One detail to handle: the recorded snippet contains the HTML entity `&`, so decode snippets before you show them or feed them to a model. ## How much should you expect results to change? Expect the result sets to change in both shape and ranking, and measure it on your own queries. The shape differs by the tables above: Bing's recorded body reports `results_on_page: 10`, Brave's reports `results_count: 20`, and DuckDuckGo reports paging through `pagination`. Rankings differ too, but this guide has one recorded query per engine, which isn't enough to say how much. Three habits keep the migration honest: 1. Replay a sample of your real production queries against the old results you saved, and compare the top URLs, not only the count. 2. Keep `position` in your stored rows so you can compare rankings later. 3. Use the page-size fields in each body and don't hard-code a page size. Here is the one example we have. For `best web scraping api`, the recorded Bing top two were an internet provider's homepage and a dictionary entry for "best", while the recorded Brave top two were pages about scraping APIs. That is one short, ambiguous query on one day, not a benchmark. For ambiguous queries, add words that pin the topic, or use `site` on the Bing endpoint to restrict results to a domain. Data is returned as found at the time of the call, so rankings can move between runs. ## How do you call all three from one script? One small normaliser lets the rest of your code ignore which engine answered. This Python script sends the same query to each endpoint, maps each body to `position`, `title`, `url` and `snippet`, and prints the credits the call used from the `X-Credits-Used` header. ```python import html import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def bing(q): r = requests.get(f"{BASE}/v1/bing/search", params={"query": q}, headers=HEADERS, timeout=30) r.raise_for_status() rows = [(x["position"], x["title"], x["url"], x["description"]) for x in r.json()["data"]] return r, rows def brave(q): r = requests.get(f"{BASE}/v1/brave/search", params={"query": q}, headers=HEADERS, timeout=30) r.raise_for_status() rows = [(x["position"], x["title"], x["link"], x["snippet"]) for x in r.json()["organic_results"]] return r, rows def duckduckgo(q): r = requests.get(f"{BASE}/v1/duckduckgo/search", params={"q": q}, headers=HEADERS, timeout=30) r.raise_for_status() rows = [ (x["position"], x["title"], x["link"], html.unescape(x["snippet"])) for x in r.json()["data"]["organic_results"] ] return r, rows for name, fn in [("bing", bing), ("brave", brave), ("duckduckgo", duckduckgo)]: resp, rows = fn("best web scraping api") print(name, "credits used:", resp.headers.get("X-Credits-Used")) for position, title, url, snippet in rows[:3]: print(" ", position, title, url) ``` The script handles errors only with `raise_for_status()`. For retries, rate-limit waits and the error codes, see [errors](https://docs.perceptlayer.com/errors) and the related guide on [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python). To fetch more than one page, [paginate safely](https://perceptlayer.com/blog/paginate-web-data-api-python). ## What does a search migration cost in credits? Each successful call costs 1 credit on all three endpoints, and each page you request is its own call. A job that sends 5,000 queries and reads 3 pages of each makes 15,000 calls, which is 15,000 credits. Failed calls cost nothing and return `X-Credits-Used: 0`, so retries on errors don't add to the bill. | Workload | Calls | Credits | | --- | --- | --- | | Trial: 100 queries, 1 page each | 100 | 100 (the free credits on signup) | | 20,000 queries, 1 page each | 20,000 | 20,000 | | 5,000 queries, 3 pages each | 15,000 | 15,000 | Credits come in prepaid packs. The Starter pack is 10,000 credits, so 20,000 credits needs the Build pack (50,000) or two Starter packs. Purchased credits last 12 months, with no subscription. The [pricing page](https://perceptlayer.com/pricing) has what credits cost; this guide doesn't quote prices because they change. If you compare against another provider's rate card, count calls the same way: one call per page, not one per query. The [credits docs](https://docs.perceptlayer.com/credits) explain how `X-Credits-Used` and `X-Credits-Remaining` report each call, and [rate limits](https://docs.perceptlayer.com/rate-limits) cover requests per second if you run the migration as a batch. ## How do you start? Sign up, send the `curl` call from the Bing section with your key, and diff its top URLs against a saved result from your old integration. Free accounts get 100 credits after email verification, with no credit card, so a first comparison across all three engines costs nothing. [Get a free API key](https://perceptlayer.com/signup), then run the same query on the [Bing](https://perceptlayer.com/apis/bing/search), [Brave](https://perceptlayer.com/apis/brave/search) and [DuckDuckGo](https://perceptlayer.com/apis/duckduckgo/search) search endpoints in the playground. If you're feeding results to an agent, the same endpoints are available as tools through the MCP server; see [AI agents (MCP)](https://docs.perceptlayer.com/ai-agents). For Google results instead, read the [Google Search API guide](https://perceptlayer.com/blog/google-search-api-json). The [search engines hub](https://perceptlayer.com/verticals/search) lists every search source in the catalogue. ## APIs in this post - [Bing **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/bing) - [Brave Search **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/brave) - [DuckDuckGo **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/duckduckgo) ## Frequently asked questions ### Is the Bing Search API still available? No. Microsoft retired the Bing Search APIs on August 11, 2025, and existing instances were decommissioned ( [Microsoft Lifecycle announcement](https://learn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement), 2025). Microsoft suggested Bing grounding in Azure AI Agents as its replacement. `GET /v1/bing/search` is a separate endpoint with its own parameters and JSON shape. ### What does one search call cost? One credit for each successful call on the Bing, Brave and DuckDuckGo search endpoints. Failed calls cost nothing and return `X-Credits-Used: 0`. Every account gets 100 free credits after verifying an email address, so a first comparison costs nothing. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Which endpoint should I use if I need site or file-type filters? Use the Bing endpoint. It documents `site` (up to 253 characters) and `filetype` (up to 20 characters), and the Brave and DuckDuckGo endpoints list neither. ### Will I get the same results as the old Bing API? Not guaranteed. Data is returned as found at the time of the call, and result sets can differ by engine. In the one recorded query, Bing and Brave returned different top results, which is an example and not a benchmark. Replay a sample of your real queries and compare URLs before you cut over. ### How do I get more than one page of results? Bing and Brave take `page`; DuckDuckGo takes `start`, and its response includes `pagination.has_more` and `next_start` so you can follow it. Each page is a separate call at 1 credit. Stop the loop when `has_more` is false or when your credit budget for the job is spent. search api bing brave duckduckgo serp json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 21 Aug 2026 Updated 6 Nov 2026 Perceptlayer 6 min read ## [DuckDuckGo Search API: Web Results as JSON](https://perceptlayer.com/blog/duckduckgo-search-api-json) DuckDuckGo's Instant Answer API returns topic summaries, not ranked links. GET /v1/duckduckgo/search returns organic results and paging at 1 credit per query. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Nov 2026 Perceptlayer 8 min read ## [Bing Scraper or API: Ten Result Types as JSON](https://perceptlayer.com/blog/bing-scraper-vs-api) A Bing scraper next to 10 Bing endpoints at 1 credit a call: a recorded web search with position, url and domain, and 0.1 credits per ranking tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Aug 2026 Perceptlayer 7 min read ## [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json) Call GET /v1/google-search/search for organic results as JSON at 1 credit a call. Parameters, a real recorded response and the cost in credits. --- title: "Estimate a Web Data Pipeline's Monthly Credit Cost" description: "A 10-step checklist that turns a data requirement into calls a month (entities, refresh rate, pages, fan-out, margin), with worked arithmetic against packs." url: https://perceptlayer.com/blog/web-data-pipeline-cost-estimate --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Estimate a Web Data Pipeline's Monthly Credit Cost 2 Aug 2026 Perceptlayer 6 min read To estimate the API cost of a data pipeline, count calls, not records: entities × refreshes a month × calls per refresh, plus the lookups each result fans out to, plus a margin. With credits, that count converts directly, since a successful call costs the credits on its endpoint (1 for nearly all) and a failed call costs nothing. The checklist below walks through the inputs in order and ends with a worked example that lands on a pack size. ## Key takeaways - Cost is calls × credits per call. Records per call doesn't change the bill, so a page of 20 results costs the same as a page of 1. - Separate discovery (finding entities) from refresh (re-reading known ones) and from fan-out (detail, reviews, photos per entity). Fan-out usually dominates. - Failed calls cost 0 credits, so don't add a failure rate. Do add a margin for client timeouts, which may have succeeded and been billed, and for growth. - Check throughput as well as cost: free accounts get 1 request a second (60 a minute), and packs at least 5. - The worked example below, 40 areas and about 2,000 listings, comes to 17,000 calls a month plus a 15% margin: 19,550 credits, within the Build pack's 50,000. ## Why estimate in calls rather than records? Because a call is what's billed. Every successful response carries `X-Credits-Used` with what it cost, and for nearly every endpoint that's 1, whether the page held 1 result or 50. Two pipelines that collect the same 10,000 records can differ in cost by an order of magnitude: one reads search pages that already contain the fields it needs, the other opens a detail page for every record. So the estimate is a model of your access pattern, not of your dataset. Write it down as a table of steps, each with an entity count, a frequency and calls per run; when the bill differs, the table shows which assumption was wrong. The [credits docs](https://docs.perceptlayer.com/credits) explain how the balance and the headers work. ## The checklist 1. **Count the entities you track.** Areas, keywords, products, companies, routes: the things you query by. Write the number per type, such as 40 postcodes. It multiplies every later step, so take it from the requirement, not from what the API could return. 2. **Set the refresh rate for each step.** Daily, weekly or monthly, converted to runs a month: daily is 30, weekly is about 4.3 (use 4 for a floor, 5 for a ceiling). Prices may need daily, reviews weekly, profiles monthly; a refresh faster than the data changes is pure overspend. 3. **Measure pages per run, don't guess them.** For search steps, calls per run is results ÷ results per page, rounded up. Read both from a real first response rather than assuming a page size; many endpoints report a total and paging fields. Then cap pages per run. The guide to [paginating a web data API](https://perceptlayer.com/blog/paginate-web-data-api-python) covers safe page loops. 4. **List the fan-out lookups.** For each result, which further calls do you make: detail, reviews, photos, agent? Each is one call per entity per run. This step usually dominates: 200 search pages that return 2,000 listings become 2,000 detail calls if you open every one. 5. **Split discovery from refresh.** Open detail pages only for new entities and refresh known ones on a slower schedule. If 5% of listings are new each day, daily detail calls are 5% of the set, not all of it. Store IDs so you can tell new from known; [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) helps when sources overlap. 6. **Check credits per call for each endpoint.** Nearly all endpoints cost 1 credit, but read the figure on each endpoint's page in the [API catalogue](https://perceptlayer.com/apis) rather than assuming. Multiply each step's calls by its credits. 7. **Don't add a failure rate, but add a timeout margin.** Failed calls return `X-Credits-Used: 0`, so errors and rate-limit responses add nothing. A client-side timeout is different: requests have no idempotency key, so a call whose reply was lost may have succeeded and been billed, and your retry is billed again. The guide to [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) shows how to keep that small. 8. **Subtract what you can cache.** If several jobs ask the same question, one call can serve them all. Identical requests within a short window, such as the same search for two dashboards, are calls you don't need; see [caching API responses](https://perceptlayer.com/blog/cache-web-data-api-responses) for TTLs and the savings. 9. **Add a margin for growth and reruns.** Backfills, reruns, a requirement that adds ten areas. A margin of 10 to 20% on the total is a reasonable planning figure; pick the higher end while the pipeline is new. 10. **Map the total to the free tier or a pack, and check throughput.** Every verified account gets 100 free credits on signup. Packs come in 10,000, 50,000, 200,000, 500,000 and 1,000,000 credits and up, and purchased credits last 12 months, so a pack can cover several months of a small pipeline. Then check the rate: daily calls ÷ the seconds in your run window must stay under your account's requests per second. ## What does a worked estimate look like? Take a pipeline that tracks property listings in 40 areas: it searches each area daily, opens new listings, and refreshes every listing's detail weekly. Measured from first responses, each area's search needs 5 pages, the set holds about 2,000 listings, and about 100 a day are new. All endpoints involved cost 1 credit per call. | Step | Entities | Runs a month | Calls per run | Calls a month | | --- | --- | --- | --- | --- | | Area search (discovery) | 40 areas | 30 | 5 pages | 40 × 5 × 30 = 6,000 | | Detail for new listings | 100 a day | 30 | 1 | 100 × 30 = 3,000 | | Weekly detail refresh | 2,000 listings | 4 | 1 | 2,000 × 4 = 8,000 | | **Subtotal** | | | | **17,000** | | Margin, 15% | | | | 2,550 | | **Estimate** | | | | **19,550 credits** | At 1 credit per call, that's 19,550 credits a month. It's beyond the 100 free credits and the Starter pack's 10,000, and within the Build pack's 50,000, which covers about two and a half months at this rate (50,000 ÷ 19,550 = 2.6). Because purchased credits last 12 months, a larger pack for several months is also an option; [pricing](https://perceptlayer.com/pricing) has what each pack costs. The biggest line is the weekly refresh, 8,000 calls; moving it to every two weeks saves 4,000 calls a month. The table shows which assumption to question first. ## How do you check the rate limit as well as the cost? Divide calls by the time window you run them in. The example's busiest day has 200 search calls and 100 detail calls every day, plus 2,000 refresh calls on the weekly day: 2,300 calls. At a free account's 1 request a second, that's about 38 minutes of calls; at the 5 a second that paying accounts get at least, under 8 minutes. If the window is shorter than that, spread the work or run calls concurrently within your limit. When you exceed the rate, calls come back as `rate_limited` (429) with a `Retry-After` header, and they cost nothing. The 429 status is HTTP's standard signal that a client has sent too many requests in a given amount of time ( [RFC 6585](https://datatracker.ietf.org/doc/html/rfc6585), 2012). `Retry-After` gives the wait in seconds, the `delay-seconds` form defined in [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110) (2022). Responses also carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`, so a pipeline can slow down before it hits the limit. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain the per-account limits, and the tutorial on [concurrent requests under a rate limit](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) paces a batch to fit. To test your own estimate, [get a free API key](https://perceptlayer.com/signup), run a week at reduced scale, and sum `X-Credits-Used` per step. ## Frequently asked questions ### How do I estimate API cost for a data pipeline? Count calls a month: entities × runs a month × calls per run for each step, including fan-out lookups such as detail pages, then add a 10 to 20% margin. Multiply by credits per call, 1 for nearly all endpoints. Failed calls cost nothing, so there's no failure rate to add, only a margin for timeouts and growth. ### Does the number of records per call change the cost? No. A successful call costs the credits shown on its endpoint, whether it returns 1 result or a full page. That's why reading fields from search pages, instead of opening a detail page per record, is usually the biggest saving. Request as much per call as an endpoint allows, within what you need. ### Which pack fits my pipeline? Divide your monthly estimate into the pack sizes: 10,000, 50,000, 200,000, 500,000 and 1,000,000 credits and up. Purchased credits last 12 months, so a larger pack can cover several months. A one-off test under 100 credits fits the free credits you get on signup; a recurring pipeline needs a pack. The [pricing page](https://perceptlayer.com/pricing) has what each pack costs and the request rate it includes. ### How do I keep a pipeline within its estimate? Cap pages per run, open details only for new entities, and read `X-Credits-Remaining` on every response so the pipeline can alert at a threshold. Sum `X-Credits-Used` per step daily and compare it with the estimate. The service is prepaid: at zero, calls return `insufficient_credits` (402) and nothing more is debited. cost estimation data pipelines credits capacity planning web data ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 13 Oct 2026 Updated 25 Oct 2026 Perceptlayer 6 min read ## [Build an ETL Pipeline in Python for Web Data](https://perceptlayer.com/blog/etl-pipeline-python-web-data) An ETL pipeline in Python for web data: extract Google Shopping prices with retries, transform to typed rows, load into SQLite idempotently, run daily. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 3 Oct 2026 Perceptlayer 6 min read ## [Detect Schema Changes in API JSON Responses](https://perceptlayer.com/blog/web-data-api-json-schema-changes) Infer a path-and-type schema from a recorded Google Search response (71 paths), diff each new response against it and alert on removed or retyped fields. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 30 Aug 2026 Updated 21 Oct 2026 Perceptlayer 7 min read ## [Web Data Quality Checks for Scraped and API Data](https://perceptlayer.com/blog/web-data-quality-monitoring-checklist) Seven web data quality checks in Python, with code written against a recorded Zillow search response: schema drift, null rates, duplicate zpids and outliers. --- title: "Yelp Reviews API: Business Search and Reviews as JSON" description: "Three Yelp endpoints return search results, business details and reviews as JSON, 1 credit per call. Parameters, a real response and a cost example." url: https://perceptlayer.com/blog/yelp-reviews-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Yelp Reviews API: Business Search and Reviews as JSON 2 Aug 2026 Updated 26 Oct 2026 Perceptlayer 6 min read You can get Yelp business search results, business details and reviews as JSON from three endpoints: `/v1/yelp/search`, `/v1/yelp/business` and `/v1/yelp/reviews`. Each successful call costs 1 credit, failed calls cost nothing, and one `X-API-Key` header authenticates all three. This guide shows the parameters, a real response for each of the two recorded endpoints and a cost example. It also covers when Yelp's own developer API is the better fit. ## Key takeaways - The [Yelp API](https://perceptlayer.com/apis/yelp) has 3 endpoints, search, business and reviews, and each costs 1 credit per successful call. - Search needs `query` and `location`. Business and reviews need `business`, which is the Yelp alias such as `gary-danko-san-francisco`. - Reviews can be sorted with `sort` (relevance, newest, oldest, highest, lowest, elite) and paged with `after`, using the `next_after` value from the previous response. - Looking up one business, searching for it and reading one page of its reviews costs 3 credits. The free tier gives 100 credits on signup. - For a small project that needs only a few review excerpts per business, Yelp's official API may be enough. ## What does the Yelp API return? The Yelp API returns JSON for three jobs: finding businesses, reading one business's details and reading its reviews. A typical flow is to search by name and location, take the business `alias` from the result, then pass that alias as `business` to the other two endpoints. Every response has a `success` flag, a `data` object and a `meta` object. | Method | Path | Returns | Credits | Required | Optional | | --- | --- | --- | --- | --- | --- | | GET | `/v1/yelp/search` | Search results | 1 | `query`, `location` | `limit`, `page` | | GET | `/v1/yelp/business` | Business details | 1 | `business` | none | | GET | `/v1/yelp/reviews` | Reviews | 1 | `business` | `sort`, `rating`, `after` | Each endpoint has its own page with a playground: [Search](https://perceptlayer.com/apis/yelp/search), [Business](https://perceptlayer.com/apis/yelp/business) and [Reviews](https://perceptlayer.com/apis/yelp/reviews). Yelp sits in the [Reviews APIs](https://perceptlayer.com/verticals/reviews) area of the catalogue. ## How do you search for Yelp businesses? Call `GET /v1/yelp/search` with a `query` and a `location`. The response lists matching businesses with their position, rating, review count, price level, categories, address and photo, so one call is enough to find a business and get its alias for the next two calls. ```bash curl "https://api.perceptlayer.com/v1/yelp/search?query=gary+danko&location=San+Francisco%2C+CA" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | Up to 100 characters | | `location` | string | yes | Up to 100 characters | | `limit` | integer | no | Optional | | `page` | integer | no | Optional; the recorded response returns the next value as `next_page` | This is an excerpt of the recorded response for that request: ```json { "success": true, "data": { "query": "gary danko", "location": "San Francisco, CA", "page": 1, "results": [ { "position": 1, "encid": "WavvLdfdP6g8aZTtbBQHTw", "alias": "gary-danko-san-francisco", "name": "Gary Danko", "url": "https://www.yelp.com/biz/gary-danko-san-francisco", "rating": 4.5, "review_count": 6149, "price": "$$$$", "categories": [ { "alias": "newamerican", "title": "New American" }, { "alias": "french", "title": "French" } ], "address": { "line1": "800 N Point St", "city": "San Francisco" }, … }, … ], "has_more": true, "next_page": 2 }, "meta": { "endpoint_family": "business_search", "billable": true } } ``` The `alias` is the value you pass as `business` later. When `has_more` is `true`, request the next page by sending `page=2`, the value in `next_page`. ## How do you get one business's details? Call `GET /v1/yelp/business` with the business alias in `business`. It takes no other parameters, and the value can be up to 160 characters. Use it when you already know which business you want and don't need a search first. ```bash curl "https://api.perceptlayer.com/v1/yelp/business?business=gary-danko-san-francisco" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded response for this endpoint to quote here, so the [Yelp Business endpoint page](https://perceptlayer.com/apis/yelp/business) is the place to see the fields. Run the call in its playground with your own key and you'll see the live response. The playground runs a real call with your key. ## How do you get Yelp reviews as JSON? Call `GET /v1/yelp/reviews` with `business`, and optionally `sort`, `rating` and `after`. The response includes the business, its `review_count`, a `reviews` array and paging fields. Each review carries a rating, text, language, timestamp and author details, plus `helpful_count` and `photos` when the review has them. ```bash curl "https://api.perceptlayer.com/v1/yelp/reviews?business=gary-danko-san-francisco&sort=newest" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `business` | string | yes | Up to 160 characters | | `sort` | string | no | One of `relevance`, `newest`, `oldest`, `highest`, `lowest`, `elite` | | `rating` | integer | no | Optional | | `after` | string | no | Up to 200 characters; the cursor from `next_after` | An excerpt of the recorded response, with the author details trimmed: ```json { "success": true, "data": { "business": { "encid": "WavvLdfdP6g8aZTtbBQHTw", "alias": "gary-danko-san-francisco", "name": "Gary Danko", "url": "https://www.yelp.com/biz/gary-danko-san-francisco" }, "review_count": 6149, "total": 6150, "reviews": [ { "id": "4qYbbI9JbtCDUOtQRcJfDA", "url": "https://www.yelp.com/biz/gary-danko-san-francisco?hrid=4qYbbI9JbtCDUOtQRcJfDA", "rating": 5, "text": "The staff is top notch.\nI really like the way their menu works, …", "language": "en", "created_at": "2026-10-22T21:21:22Z", "author": { … } }, … ], "has_more": true, "next_after": "eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoib2Zmc2V0Iiwib2Zmc2V0Ijo5fQ" }, "meta": { "endpoint_family": "business_reviews", "billable": true } } ``` Review `text` in this sample is cut off with an ellipsis, so treat it as the text as returned by the call, not a guaranteed full review. Reviews are public content written by Yelp users. If you store them, decide what personal data you actually need; the author fields are rarely required for analysis. ## How do you page through all the reviews? Pass the `next_after` value from one response as `after` in the next request, and stop when `has_more` is `false`. Each page is a separate call at 1 credit, so reading a business with thousands of reviews takes many calls. Work out the page count before you start a loop. ```python import os import requests url = "https://api.perceptlayer.com/v1/yelp/reviews" headers = {"X-API-Key": os.environ["API_KEY"]} params = {"business": "gary-danko-san-francisco", "sort": "newest"} reviews = [] for _ in range(5): # cap the pages, each one costs a credit r = requests.get(url, headers=headers, params=params, timeout=30) r.raise_for_status() data = r.json()["data"] reviews.extend(data["reviews"]) if not data["has_more"]: break params["after"] = data["next_after"] print(len(reviews)) ``` The cap of 5 pages keeps a bug from spending your balance. For safe loop patterns, including what to do after a timeout, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python) and [retrying calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice). A request whose reply was lost may have been billed, because requests have no idempotency key. ## What does it cost? Every call to the three endpoints costs 1 credit when it succeeds, and nothing when it fails. A failed call returns `X-Credits-Used: 0`, and successful responses carry `X-Credits-Used` and `X-Credits-Remaining` headers so you can track the balance. The [credits docs](https://docs.perceptlayer.com/credits) explain the accounting. A worked example for a monitoring job that checks the newest reviews of 500 restaurants: - Find each business once: 500 searches × 1 credit = 500 credits. - Read the newest reviews page for each, once a week: 500 calls × 1 credit = 500 credits a run. - Four weekly runs: 4 × 500 = 2,000 credits, plus the 500 for the initial searches. That is 2,500 credits for the first month. The free tier gives 100 credits after you verify an email address, no credit card, so this job needs a prepaid pack. Packs start at 10,000 credits and last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. If you already store the aliases, skip the searches and the first month is 2,000 credits. Rate limits are per account and counted per minute. Free accounts get 1 request a second, and a 429 response carries a `Retry-After` header. Details are in the [rate limits docs](https://docs.perceptlayer.com/rate-limits) and [error codes](https://docs.perceptlayer.com/errors). ## When is Yelp's official API the better fit? Yelp has its own developer API, and for a small project it can be the simpler choice. Its documentation describes a reviews endpoint that returns up to three review excerpts for a business ( [Yelp Places API docs](https://docs.developer.yelp.com/docs/fusion-intro), 2026). If all you need is a few excerpts per business, that limit may not matter for your project. Choose the Perceptlayer endpoints when you need more than a few excerpts: sorting reviews by `newest` or `lowest`, filtering by `rating`, or paging through the review history of many businesses. They also fit when you want Yelp next to other sources under one key. For the other review sources in the catalogue, see the guides for [Trustpilot reviews](https://perceptlayer.com/blog/trustpilot-reviews-api), [Google Maps reviews](https://perceptlayer.com/blog/google-maps-reviews-api-parameters) and [Google Play reviews](https://perceptlayer.com/blog/google-play-store-api). Check Yelp's current developer terms at [docs.developer.yelp.com](https://docs.developer.yelp.com/) before you decide. Data in this API is collected from publicly available sources and returned as found at the time of the call. ## Where do you start? [Get a free API key](https://perceptlayer.com/signup), then run the search call from this guide in the playground on the [Yelp API page](https://perceptlayer.com/apis/yelp) or paste the cURL into a terminal. The key goes in the `X-API-Key` header, as the [authentication docs](https://docs.perceptlayer.com/authentication) describe. If you're wiring this into an agent instead, the [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover the MCP server. ## APIs in this post - [Yelp **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/yelp) ## Frequently asked questions ### Is there an official Yelp reviews API? Yes. Yelp publishes a developer API with a reviews endpoint. Its documentation says the endpoint returns up to three review excerpts for a business ( [Yelp Places API docs](https://docs.developer.yelp.com/docs/fusion-intro), 2026). That suits small projects. If you need sorting, rating filters and paging through many reviews, the `/v1/yelp/reviews` endpoint here takes `sort`, `rating` and `after`. ### How much does a Yelp reviews call cost? A successful call to `/v1/yelp/reviews`, `/v1/yelp/business` or `/v1/yelp/search` costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. Reading 10 pages of one business's reviews is 10 calls × 1 credit = 10 credits. The free tier includes 100 credits on signup, and [pricing](https://perceptlayer.com/pricing) shows what credit packs cost. ### How do I find the business value for Yelp reviews? Run a search with `query` and `location`, then copy the `alias` from a result, for example `gary-danko-san-francisco`. Pass it as `business` to `/v1/yelp/business` or `/v1/yelp/reviews`. The value can be up to 160 characters, and the search response also includes the business URL and `encid`. ### What happens when there are more reviews than one page? The response sets `has_more` to `true` and gives a `next_after` cursor. Send that value as the `after` parameter in your next request to the same endpoint, and repeat until `has_more` is `false`. Each page is one successful call, so it costs 1 credit. Cap your loop so a bug can't spend your balance. ### Can I use this data in an AI agent? Yes. The same key works over MCP at `https://perceptlayer.com/mcp`, where `search_endpoints` and `get_endpoint` look up the catalogue for free and `call_endpoint` runs an endpoint for its credits on success only. See the [AI agents docs](https://docs.perceptlayer.com/ai-agents) for setup. ### Should I build a Yelp scraper instead? A Yelp scraper is code you maintain against changing pages, with blocks to handle and Yelp's terms to follow. The search, business and reviews endpoints return named JSON fields for 1 credit per successful call, and failed calls cost nothing. Yelp also runs its own developer API; compare its terms and limits with these endpoints before writing a scraper. yelp reviews local business search json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read ## [Yelp Scraper or API: Reviews Without the Upkeep](https://perceptlayer.com/blog/yelp-scraper-vs-api) A Yelp scraper vs three 1-credit endpoints: a recorded Gary Danko search whose alias feeds the reviews call, with rating, text, created\_at and next\_after. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Sept 2026 Updated 22 Oct 2026 Perceptlayer 7 min read ## [Google News API: Search News Articles as JSON](https://perceptlayer.com/blog/google-news-api) One GET call to /v1/google-news/news returns articles with title, link, source and ISO date as JSON for 1 credit. Parameters, a real response, cost. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Sept 2026 Perceptlayer 6 min read ## [Google Patents API: Search Patents and Get Details](https://perceptlayer.com/blog/google-patents-api-search-details) Search Google Patents by keyword, inventor or assignee with one GET call, then fetch full details by patent\_id. Both endpoints cost 1 credit per call. --- title: "Add Web Search to an OpenAI Agent: Python Tool Calls" description: "Add web search to an OpenAI agent in Python: one web_search tool over live Google results, a tool-call loop and a cap of 1 credit per search." url: https://perceptlayer.com/blog/openai-agent-web-search-tool-call --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Add Web Search to an OpenAI Agent: Python Tool Calls 31 Jul 2026 Perceptlayer 9 min read To give an OpenAI agent live web search, declare a `web_search` function in the `tools` list, run the model, and when it returns a tool call, forward the arguments to `GET /v1/google-search/search`. Send the trimmed results back as a `tool` message and call the model again. The loop below does that in about 100 lines of Python, caps the spend at 5 credits per question, and costs nothing when a search fails. ## Key takeaways - One function tool, `web_search`, maps to one endpoint: `GET /v1/google-search/search` with `query`, `hl` and `gl`. Each successful search costs 1 credit. - Trim the response before the model sees it. Keep `position`, `title`, `link`, `snippet` and `source` from `organic_results`, and drop the long `redirect_link` strings. - Cap the loop twice: a maximum number of model rounds and a maximum number of searches. With a cap of 5 searches, one question costs at most 5 credits. - Return API errors to the model as tool output. Failed calls return `X-Credits-Used: 0`, so a bad query costs nothing and the model can correct itself. - The 100 free credits you get on signup cover 20 questions at the 5-search cap, or more when the model searches less. ## How does function calling add web search to an OpenAI agent? A model can't browse by itself. With function calling, you describe a function in JSON Schema, the model replies with the function name and arguments instead of text, your code runs it, and you return the result so the model can write the answer ( [OpenAI function calling guide](https://platform.openai.com/docs/guides/function-calling)). Web search is one such function: the model decides when it needs fresh facts and what to query. The model never touches the network. Your code makes the HTTP request, so you control the key, the timeout, the result size and the budget. That control is the reason to write the loop yourself rather than rely on a hosted search tool. The shape of the loop is always the same: 1. Send the messages and the tool definitions to the model. 2. If the reply has no tool calls, you have the answer. 3. If it has tool calls, run each one and append the output as a `tool` message. 4. Go back to step 1. Steps 3 and 4 are where cost goes wrong, because a model can keep searching. The code below puts hard limits on that part. For the wider question of when to use a tool call and when to use a protocol, see [MCP vs function calling for live web data](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data). ## What do you need before you start? You need Python 3, the [OpenAI Python SDK](https://github.com/openai/openai-python), `requests`, an OpenAI key, and a Perceptlayer API key. The Perceptlayer key starts with `sk_live_` and goes in the `X-API-Key` header; [get a free API key](https://perceptlayer.com/signup) and read [authentication](https://docs.perceptlayer.com/authentication) if you haven't called the API before. Install the two packages and set three environment variables: ```bash pip install openai requests export OPENAI_API_KEY="sk-..." export OPENAI_MODEL="" export API_KEY="sk_live_..." ``` The model name is read from `OPENAI_MODEL` so the script doesn't go stale when model names change. Any chat model with tool-call support works with the code below. Every account gets 100 free credits after verifying an email address, with no credit card. A successful search costs 1 credit, so you can run the whole tutorial many times for free. [Pricing](https://perceptlayer.com/pricing) has what credits cost once you outgrow that. ## Which endpoint should the tool call? Use `GET /v1/google-search/search`. It returns Google results as JSON, costs 1 credit, and takes one required parameter, `query`. The [Search endpoint page](https://perceptlayer.com/apis/google-search/search) lists every optional parameter, and the [Google Search API](https://perceptlayer.com/apis/google-search) has six other endpoints, including AI Overviews and autocomplete. Here is the request the tool will make, with the parameters the model is allowed to set: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` | Tool argument | Endpoint parameter | Type | Notes | | --- | --- | --- | --- | | `query` | `query` | string | Required. | | `hl` | `hl` | string | Optional. Interface language, up to 2 characters. | | `gl` | `gl` | string | Optional. Country, up to 2 characters. | The endpoint accepts many more parameters ( `tbs`, `location`, `page` and others). Leave them out of the tool schema. Every parameter you expose is another thing the model can set wrongly, and a short schema makes tool calls more reliable. If you later want the agent to page through results, add `page` yourself and see [paginating a web data API](https://perceptlayer.com/blog/paginate-web-data-api-python). For a closer look at this endpoint outside an agent, see [Google Search API: get search results as JSON](https://perceptlayer.com/blog/google-search-api-json). ## What does the response look like, and what should the model see? The search endpoint returns a large JSON object. The recorded response for `best restaurants in Berlin` has `organic_results`, `related_searches`, `people_also_search_for`, `related_questions`, `local_results` and more. The model needs very little of that, and every extra field is tokens you pay for on every later round of the loop. The useful part is `organic_results`. This excerpt is from the recorded response: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "redirect_link": "https://www.google.com/goto?url=CAESegHrOzAV7vOTOiRYGN3Rq_LJMgUCSUtmes2rLIk-rn2vHS6tGU7IIN38aZ1xjQeD3kZuDFfbW6QvUSum1Woyp6Hmrl5u9WEXLlEP2Ek60dzztg2yT13pxwC2ptSy…", "displayed_link": "https://andershusa.com › best-restaurants-berlin-german...", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. It holds two Michelin stars, has been frequently ranked on The World's 50 ...", "source": "Anders & Kaitlin", "rank_group": 1, "rank_absolute": 4 }, … ], … } ``` Each result has a `redirect_link` that is a long opaque string, plus `displayed_link`, `rank_group` and `rank_absolute`. None of those help a model write an answer. The tool function keeps five fields per result and caps the count at five results: | Field kept | Why the model needs it | | --- | --- | | `position` | Lets the model say which result it used. | | `title` | Tells it what the page is. | | `link` | The URL it can cite to the user. | | `snippet` | The text it answers from. | | `source` | The site name, for attribution. | The snippet is all the model gets. It is Google's excerpt, not the page, which keeps rounds cheap but means the agent can't quote a page body. If you need full pages, that's a different tool (see [RAG with live web data](https://perceptlayer.com/blog/rag-with-live-web-data)). ## How do you write the web\_search tool function? The function sends the request, reads the credit headers, and returns a small dictionary that is always JSON-serialisable, including on failure. Returning errors instead of raising means a bad call becomes information for the model, not a crash in your loop. Save this as `agent.py`. It is complete; the next section adds the loop. ```python import json import os import time import requests from openai import OpenAI client = OpenAI() MODEL = os.environ["OPENAI_MODEL"] BASE_URL = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} MAX_ROUNDS = 6 # model calls per question MAX_SEARCHES = 5 # credits per question, at 1 credit per search MAX_RESULTS = 5 # results returned to the model TOOLS = [ { "type": "function", "function": { "name": "web_search", "description": ( "Search Google and return the top results with title, URL and " "snippet. Use it for facts that may have changed recently or " "that you are not sure about. Each call costs one credit." ), "parameters": { "type": "object", "properties": { "query": { "type": "string", "description": "The search query, as you would type it into Google.", }, "hl": { "type": "string", "description": "Two-letter interface language, for example en.", }, "gl": { "type": "string", "description": "Two-letter country code, for example de.", }, }, "required": ["query"], }, }, } ] spend = {"searches": 0, "credits_used": 0, "credits_remaining": None} def web_search(query, hl="en", gl=None): if not query: return {"error": "query is required"} params = {"query": query, "hl": hl} if gl: params["gl"] = gl response = None for attempt in range(2): try: response = requests.get( f"{BASE_URL}/v1/google-search/search", params=params, headers=HEADERS, timeout=30, ) except requests.Timeout: # The reply may have been lost after the call succeeded, so do not retry. return {"error": "search timed out; try a different query or answer without it"} if response.status_code in (429, 503) and attempt == 0: time.sleep(int(response.headers.get("Retry-After", "1"))) continue break spend["searches"] += 1 spend["credits_used"] += int(response.headers.get("X-Credits-Used", 0)) spend["credits_remaining"] = response.headers.get("X-Credits-Remaining") if response.status_code != 200: try: error = response.json()["error"] except (ValueError, KeyError): error = {"code": "unknown", "message": f"HTTP {response.status_code}"} return {"error": error.get("code"), "message": error.get("message")} results = response.json().get("organic_results", [])[:MAX_RESULTS] return { "results": [ { "position": r.get("position"), "title": r.get("title"), "link": r.get("link"), "snippet": r.get("snippet"), "source": r.get("source"), } for r in results ] } ``` Four details matter here. **The retry is narrow.** A `429` or `503` carries a `Retry-After` header with the seconds to wait, so the function waits once and tries again. It does not retry a timeout. Requests have no idempotency key, so a request whose reply was lost may have succeeded and been billed. A second attempt could charge twice. The full pattern is in [retrying web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice). **Credits come from headers.** Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, and errors carry `X-Credits-Remaining` too. Summing `X-Credits-Used` gives the real spend rather than an estimate. See [credits](https://docs.perceptlayer.com/credits) for how billing works. **Errors go to the model.** An `invalid_parameters` (422) tells the model its arguments were wrong. A `rate_limited` (429) that survives the retry tells it to stop searching. Both are in the [error reference](https://docs.perceptlayer.com/errors). **The description tells the model the cost.** Saying "each call costs one credit" in the tool description nudges the model to search once with a good query rather than five times with bad ones. It is a nudge, not a guarantee, which is why the loop has hard limits too. ## How do you write the tool-call loop? The loop sends the conversation to the model, executes any tool calls it returns, appends each result as a `tool` message keyed by `tool_call_id`, and repeats until the model answers in plain text. Two counters, `MAX_ROUNDS` and `MAX_SEARCHES`, guarantee it ends and bound the spend. Append this to `agent.py`: ```python SYSTEM = ( "You answer questions using web search when the answer may be recent or you " "are unsure. Search with specific queries. Cite the URLs you used. If search " "results are missing or an error is returned, say so instead of guessing." ) def run_tool(call): if call.function.name != "web_search": return {"error": f"unknown tool {call.function.name}"} try: args = json.loads(call.function.arguments or "{}") except json.JSONDecodeError: return {"error": "arguments were not valid JSON"} if spend["searches"] >= MAX_SEARCHES: return {"error": "search limit reached; answer with the results you already have"} return web_search( query=args.get("query", ""), hl=args.get("hl") or "en", gl=args.get("gl"), ) def ask(question): spend.update(searches=0, credits_used=0, credits_remaining=None) messages = [ {"role": "system", "content": SYSTEM}, {"role": "user", "content": question}, ] for _ in range(MAX_ROUNDS): completion = client.chat.completions.create( model=MODEL, messages=messages, tools=TOOLS ) message = completion.choices[0].message messages.append(message) if not message.tool_calls: return message.content for call in message.tool_calls: result = run_tool(call) messages.append( { "role": "tool", "tool_call_id": call.id, "content": json.dumps(result), } ) return "Stopped: round limit reached before the model gave an answer." if __name__ == "__main__": question = input("Question: ") print(ask(question)) print( f"\nSearches: {spend['searches']}, " f"credits used: {spend['credits_used']}, " f"credits remaining: {spend['credits_remaining']}" ) ``` Run it with `python agent.py` and ask something the model can't know from training, such as the current top results for a topic. The last line prints the searches made and the credits those cost, read from the response headers. A model can return several tool calls in one reply. The loop runs them one after another, which suits the free tier's rate of 1 request a second. When the search limit is hit mid-reply, the remaining calls get an error result instead of a request, so every `tool_call_id` still gets an answer. An unanswered ID makes the next model call fail. ## What does one question cost? Each successful search costs 1 credit, and `MAX_SEARCHES` is the ceiling, so one question costs at most 5 credits with the settings above. A question that needs one search costs 1 credit. A search that fails costs 0 and still counts toward the limit, which keeps the cap conservative. Credits are the only Perceptlayer cost. OpenAI bills tokens separately, and that bill grows with every round because each round re-sends the whole conversation, including earlier search results. Trimming results to five short entries is what keeps that second bill small. | Setup | Searches per question | Credits per question | | --- | --- | --- | | Model searches once | 1 | 1 | | Model searches three times | 3 | 3 | | Model hits the cap | 5 | 5 | Worked example: the 100 free credits ÷ 5 credits at the cap = 20 questions, once, and more when the model searches less. At 10,000 questions averaging 2 searches, the arithmetic is 10,000 × 2 × 1 credit = 20,000 credits. Check [pricing](https://perceptlayer.com/pricing) for what a pack of credits costs. Purchased credits last 12 months, and the service is prepaid: when the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. If you need a budget across many questions, not just one, keep a counter outside `ask`. [AI agent API cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs) covers per-session and per-day caps, and [caching API responses](https://perceptlayer.com/blog/cache-web-data-api-responses) covers skipping repeat searches entirely. ## When should you use MCP instead? Use a hand-written tool when you want control over the schema, the trimming and the budget, as in this tutorial. Use the MCP server when you want an agent to discover endpoints itself, or when the client already speaks MCP. The server is at `https://perceptlayer.com/mcp` and exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The trade-off is tokens and predictability. A single `web_search` tool is one small schema and one known endpoint. MCP exposes the whole catalogue, which is more flexible but gives the model more ways to spend credits. Lookups with `search_endpoints` and `get_endpoint` cost nothing, but `call_endpoint` spends the endpoint's credits on success. If your agent only ever searches Google, the function above is simpler. If it needs reviews, listings and prices from different websites, adding tools one by one gets tedious, and the [AI agents docs](https://docs.perceptlayer.com/ai-agents) and [MCP server for web scraping](https://perceptlayer.com/blog/mcp-server-for-web-scraping) are the better start. For the same idea on a different model, see [Claude MCP web search](https://perceptlayer.com/blog/claude-agent-live-search-mcp), and for a LangChain version of this tool, [a LangChain custom tool for live web data](https://perceptlayer.com/blog/langchain-custom-tool-web-data). To try the endpoint before wiring it up, run a call in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search), then paste your `sk_live_` key into the script above. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Can I add this web search tool to an OpenAI Agents SDK agent? This tutorial uses Chat Completions function calling, so the loop is plain Python with no agent framework. For the OpenAI Agents SDK, [OpenAI Agents SDK with a Remote MCP Server for Web Data](https://perceptlayer.com/blog/openai-agents-sdk-mcp-server) connects an agent to the MCP server instead, and its `call_endpoint` tool runs the same Google search for 1 credit a call. ### Does the OpenAI model search the web by itself with function calling? No. The model only returns a function name and arguments. Your code makes the HTTP request and returns the result. That's why the loop above holds the API key, the timeout, the result trimming and the search cap, and the model never sees your credentials. ### What happens if a search fails? The function returns the error code and message as the tool output, and the model can rephrase or answer without the search. Failed calls cost nothing and return `X-Credits-Used: 0`. Rate-limited (429) and temporarily unavailable (503) responses include a `Retry-After` header, which the function honours once. ### How many requests a second can the loop make? Limits are per account and counted per minute. Free accounts get 1 request a second (60 a minute); paying accounts run at the rate of the credits they are using, and at least 5 a second. The loop runs tool calls one at a time, so a single user stays within the free rate. See [rate limits](https://docs.perceptlayer.com/rate-limits). ### Can the agent get the full text of a page? Not with this tool. The search endpoint returns Google's `snippet` for each result, not the page body. The agent can cite the `link`, and you can add a second tool for fetching a page if your use case needs one. Data is returned as found at the time of the call. ### Why cap searches when the model usually stops on its own? Usually is not always. A model can repeat near-identical queries when results look thin, and each one is a credit and another round of tokens. The `MAX_ROUNDS` and `MAX_SEARCHES` limits make the worst case a known number, 5 credits per question here, instead of an open-ended loop. openai function calling web search python ai agents ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 7 Sept 2026 Perceptlayer 8 min read ## [OpenAI Agents SDK with a Remote MCP Server for Web Data](https://perceptlayer.com/blog/openai-agents-sdk-mcp-server) Connect the OpenAI Agents SDK to a Streamable HTTP MCP server with a Bearer header, cap call\_endpoint at 3 calls a question, and count credits per run. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 28 Oct 2026 Perceptlayer 7 min read ## [Web Search API for AI Agents: Four Engines Compared](https://perceptlayer.com/blog/web-search-api-for-ai-agents) Google, Brave, Bing and DuckDuckGo search endpoints compared by their recorded JSON, with one Python normaliser for agents. 1 credit per search. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. --- title: "Paginate a Web Data API in Python: Safe Page Loops" description: "Page through the eBay search endpoint in Python with has_more, dedupe by product_id and a credit ceiling. Each page costs 1 credit." url: https://perceptlayer.com/blog/paginate-web-data-api-python --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Paginate a Web Data API in Python: Safe Page Loops 31 Jul 2026 Perceptlayer 8 min read To paginate a web data API in Python, request `page=1`, read the `has_more` flag in the response, and keep going until it turns false. Add three guards: a page cap, a deduplication set and a credit ceiling. This guide does it against the search endpoint of the [eBay API](https://perceptlayer.com/apis/ebay), where every page is one call and one credit, so a full pull has a cost you can calculate before you run it. ## Key takeaways - `GET /v1/ebay/search` pages with `page` and `per_page` (60, 120 or 240), and each response reports `has_more` and `total_results`. - Stop on the first of five conditions: `has_more` is false, a page comes back empty, a page adds no new items, your page cap is reached, or your credit ceiling is reached. - Deduplicate on `product_id`. The docs don't promise a stable result set between calls, so guard against repeats instead of assuming none. - Each successful page costs 1 credit and failed calls cost 0, so retrying a 429, 502 or 503 costs nothing extra. A request that timed out client-side may still have been billed, because there's no idempotency key. - Choosing `per_page=240` over 60 cuts the number of calls, and therefore the credits, for the same result set. ## How does pagination work on the eBay search endpoint? The search endpoint is page-based. You send `q` with `page` and `per_page`, and the response tells you where you are ( `page`, `per_page`), whether another page exists ( `has_more`) and how many results match overall ( `total_results`). The endpoint's parameter list has no cursor and the recorded response returns none, so there's nothing to carry between calls. You increment `page` yourself and let `has_more` say when to stop. Here's the first page as a cURL call: ```bash curl "https://api.perceptlayer.com/v1/ebay/search?q=coffee+maker&page=1&per_page=60" \ -H "X-API-Key: $API_KEY" ``` Page-number paging is simple, but it leaves the safety to you. Nothing in the protocol stops a loop that runs until your balance is gone, which is why the rest of this article is about stop conditions. The full parameter list for the endpoint is on the [eBay Search API page](https://perceptlayer.com/apis/ebay/search), and the key setup is in the [authentication docs](https://docs.perceptlayer.com/authentication). ## Which parameters control paging? Two parameters control paging: `page` selects which page you get and `per_page` sets how many results each page holds, from three allowed values. Everything else on the endpoint (filters and sorting) narrows or reorders the result set, and you should keep those identical across every page of one pull. Changing a filter mid-pull gives you pages from two different result sets. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `q` | string | yes | Up to 255 characters | | `page` | integer | no | The page to return | | `per_page` | integer | no | One of `60`, `120`, `240` | | `sort` | integer | no | One of `1`, `7`, `10`, `12`, `15`, `16` | | `category` | integer | no | Narrows the result set | | `price_min`, `price_max` | number | no | Price filters | | `buy_it_now`, `auction`, `free_shipping` | boolean | no | Listing filters | | `condition[]` | list of integer | no | Condition filter | | `preferred_location`, `location_postal` | integer, string | no | Location filters; `location_postal` up to 20 characters | The docs don't state a default page size or a maximum page depth, so don't assume either. Pass `per_page` explicitly and let the stop conditions find the end. The [eBay search results guide](https://perceptlayer.com/blog/ebay-item-search-data-json) covers the filters in more detail. ## What does a result page look like? A page is a JSON object with `success`, and a `data` object holding the paging fields next to a `results` array. Each result carries a `product_id`, a `title`, a `link`, a `price` object and a few optional fields. The recorded response for `q=coffee maker`, `page=1`, `per_page=60` looks like this, trimmed: ```json { "success": true, "data": { "query": "coffee maker", "page": 1, "per_page": 60, "has_more": true, "results": [ { "product_id": "366702966104", "title": "Mr. Coffee 4-in-1 Single-Serve Latte, Iced, and Hot Coffee", "link": "https://www.ebay.com/itm/366702966104", "price": { "raw": "$60.00", "extracted": 60, "currency": "USD" }, "sponsored": true, "location": "United States" }, … ], "total_results": 110000, "related_searches": […], "categories": […] } } ``` Three fields matter for pagination. `has_more` is your primary stop signal. `total_results` (110000 for this query) lets you estimate the number of pages before you start. `product_id` is used here as the dedupe key. Fields such as `subtitle`, `thumbnail`, `sponsored` and `location` are optional extras, so read them with `.get()` rather than indexing. ## How do you fetch every page safely? Write the loop around its exit conditions rather than around the happy path. A safe pagination loop stops on the first of five conditions: `has_more` is false, a page returns no results, a page contributes no new items, the page cap is reached, or the credits spent reach a ceiling. It also stops if `X-Credits-Remaining` shows the balance can't pay for another page, and it returns the reason it stopped, so a partial pull is never mistaken for a complete one. Free accounts get 1 request a second, so a tight loop with no pause can hit a 429. The code below sleeps briefly between pages and honours `Retry-After` when a 429 or 503 carries it. Retries and billing are covered in [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice). ```python import os import time import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} RETRYABLE = {429, 502, 503} def get_page(params, max_attempts=4): """GET one page, or None if the network kept failing. A 429, 502 or 503 is a failed call and isn't billed, so retrying it is free. A timeout is different: there's no idempotency key, so the request may have succeeded and been billed even though no reply arrived. Retrying one can cost a second credit. """ r = None for attempt in range(max_attempts): try: r = requests.get( f"{BASE}/v1/ebay/search", params=params, headers=HEADERS, timeout=30 ) except requests.RequestException: r = None # timeout or connection error: retry after a pause if (r is None or r.status_code in RETRYABLE) and attempt < max_attempts - 1: delay = 2**attempt if r is not None: try: # 429 and 503 carry Retry-After in seconds delay = max(delay, float(r.headers["Retry-After"])) except (KeyError, ValueError): pass time.sleep(delay) continue return r return r def collect(q, per_page=240, max_pages=50, credit_ceiling=25): seen = {} # product_id -> result spent = 0 reason = "page cap reached" for page in range(1, max_pages + 1): if spent >= credit_ceiling: reason = "credit ceiling reached" break r = get_page({"q": q, "page": page, "per_page": per_page}) if r is None: reason = f"network error on page {page}" break if r.status_code != 200: try: code = r.json().get("error", {}).get("code", "unknown") except ValueError: # non-JSON body, e.g. from a 502 or 503 code = "unknown" reason = f"error {r.status_code} {code} on page {page}" break cost = int(r.headers.get("X-Credits-Used", 0)) spent += cost remaining = int(r.headers.get("X-Credits-Remaining", -1)) data = r.json()["data"] results = data["results"] new = 0 for item in results: if item["product_id"] not in seen: seen[item["product_id"]] = item new += 1 if not data["has_more"]: reason = "has_more is false" break if not results: reason = "empty page" break if new == 0: reason = "page added no new items" break if 0 <= remaining < cost: reason = "balance below the next page's cost" break time.sleep(1) # free accounts get 1 request a second return list(seen.values()), spent, reason items, spent, reason = collect("coffee maker") print(f"{len(items)} unique items, {spent} credits, stopped: {reason}") ``` The loop checks `credit_ceiling` before each call, so it never starts a page it has already decided not to pay for. It reads `X-Credits-Used` from the response instead of assuming 1 credit, so if an endpoint's price ever changes, the ceiling still holds. It also reads `X-Credits-Remaining` and stops when the balance is below what the last page cost, assuming the next page costs the same. For more on credits, see the [credits docs](https://docs.perceptlayer.com/credits). ## How do you deduplicate results across pages? Key every result on `product_id` and keep the first copy you see. The docs don't say whether the result set stays fixed while you page through it, so don't assume it does. If it shifts between your calls, an item near a page boundary could show up twice. A dictionary keyed on `product_id` makes that harmless, and it gives you the "page added no new items" stop signal for free. ```python new = 0 for item in results: if item["product_id"] not in seen: seen[item["product_id"]] = item new += 1 ``` Two details are worth keeping. First, keep the first copy, not the last, so a result's position reflects the order you first received it. Second, treat the `new == 0` exit as a safety net. It catches a loop that keeps getting the same page, for example because a parameter was dropped from the request, so the loop ends instead of running to its page cap. Sponsored results carry `"sponsored": true`. If you only want organic listings, filter on that field after deduplication, not before, so your stop logic still sees every item. ## What does a full pull cost? Every successful page costs 1 credit, so a pull of N pages costs N credits. Failed calls cost nothing and return `X-Credits-Used: 0`. Larger pages mean fewer calls for the same number of results, so `per_page=240` is the cheapest setting per result. The table states each pull in credits; see [pricing](https://perceptlayer.com/pricing) for what credits cost. | Pull | Pages | Calculation | Credits | | --- | --- | --- | --- | | 10 pages | 10 | 10 calls × 1 credit | 10 | | 50 pages (the default cap above) | 50 | 50 calls × 1 credit | 50 | | Calculation: `total_results` of 110,000 at `per_page=240` | 459 | 459 calls × 1 credit | 459 | | Calculation: `total_results` of 110,000 at `per_page=60` | 1,834 | 1,834 calls × 1 credit | 1,834 | The last two rows are a calculation on the `total_results` value in the recorded response, not a recorded pull. They also assume every page is full, at 240 and 60 results; only a 60-result page is recorded, so the real page count may differ. The arithmetic: 110,000 ÷ 240 = 458.3, so 459 pages × 1 credit = 459 credits. At 60 per page, 110,000 ÷ 60 = 1,833.3, so 1,834 pages × 1 credit = 1,834 credits. Either pull fits within the smallest pack's 10,000 credits. The default `collect("coffee maker")` call stops at its 50-page cap, so to attempt the 459-page calculation, raise both guards just above the figure: ```python items, spent, reason = collect( "coffee maker", per_page=240, max_pages=500, credit_ceiling=500 ) ``` Treat the 110,000 rows as a ceiling, not a promise: a full 459-page pull may not be possible. `total_results` is the figure from the recorded `coffee maker` response, and the docs don't say how deep you can page. Your `has_more` check finds the real end. The free tier's 100 credits, granted once on signup, cover 100 of those 459 pages; a full pull needs a pack. For a wider view of budgeting, see [capping web data spend](https://perceptlayer.com/blog/ai-agent-web-data-costs). More pipeline guides are in the [data engineering category](https://perceptlayer.com/blog/category/data-engineering). ## How do you handle errors and retries mid-pull? Retry the transient errors, stop on the permanent ones, and keep what you've already collected. Errors come back as an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. A 429, 502 or 503 is a failed call and isn't billed, so retrying it costs nothing extra beyond the wait. A client timeout is the exception: there's no idempotency key, so a request whose reply was lost may have succeeded and been billed, and retrying it can cost a second credit. The [retry guide](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) goes deeper. | Status | Code | What to do | | --- | --- | --- | | 429 | `rate_limited` | Wait the `Retry-After` seconds, then retry the same page | | 502 | `source_error` | Retry with backoff | | 503 | `temporarily_unavailable` | Wait the `Retry-After` seconds, then retry | | 402 | `insufficient_credits` | Stop. Nothing more is debited and there's no automatic top-up | | 401 | `invalid_api_key` | Stop. Fix the key | | 422 | `invalid_parameters` | Stop. Fix the request, for example a malformed or missing parameter | The `get_page` function above retries the first three, and on network errors too. It backs off 1, 2, then 4 seconds, or waits longer when a `Retry-After` header asks for it, the standard response to [429 Too Many Requests](https://www.rfc-editor.org/rfc/rfc6585#section-4). Everything else falls through to `collect`, which records the reason and returns the items it already has. For long pulls, save `seen` to disk every few pages, and cache pages you've already fetched so a rerun doesn't pay for them again (see [caching API responses](https://perceptlayer.com/blog/cache-web-data-api-responses)). Then a 402 or a crashed process costs you the remaining pages, not the whole run. Resume by starting from the last saved page number and loading the saved `product_id` values back into `seen`. For more, see the [errors docs](https://docs.perceptlayer.com/errors) and the [rate limit docs](https://docs.perceptlayer.com/rate-limits). If you're calling the API through the `requests` library as above, the [Requests documentation](https://requests.readthedocs.io/en/latest/) covers sessions, which reuse connections across a pull of hundreds of pages. Get a free API key at [/signup](https://perceptlayer.com/signup), set `API_KEY`, and run `collect` with a `credit_ceiling` of 20 to see the whole loop end to end for 20 credits or fewer. ## APIs in this post - [eBay **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/ebay) ## Frequently asked questions ### How many pages should I fetch per query? Fetch until `has_more` is false or your cap is hit, whichever comes first. The docs don't state a maximum page depth, so don't hardcode one. Set `max_pages` and `credit_ceiling` from what you're willing to spend, then let the loop stop itself. Each page is 1 credit. ### Does a retried page get billed twice? Not for a 429, 502 or 503. Only a successful response debits credits, and a failed call returns `X-Credits-Used: 0`. A client timeout is different: there's no idempotency key, so a request whose reply was lost may have succeeded and been billed, and the retry then costs another credit. If you re-request a page you already have, that's a new successful call and costs 1 credit; [caching responses](https://perceptlayer.com/blog/cache-web-data-api-responses) avoids that. ### Should I use per\_page 60, 120 or 240? Use 240 when you want the most results per credit, because the endpoint costs 1 credit per successful call, so fewer, larger pages mean fewer calls. Use 60 when you only need the top results and want smaller responses. The docs list only those three values, so stick to them. ### What happens when my credits run out mid-pull? The next call returns `insufficient_credits` (402) and nothing more is debited. The service is prepaid with no automatic top-up. Your loop should stop on that code and keep the results it has. The `X-Credits-Remaining` header on each success shows the balance after that call, so you can stop early, as the loop above does. ### Can I paginate through an AI agent instead of a script? Yes. The MCP server exposes `call_endpoint`, which spends the endpoint's credits on success only and reports credits used and remaining. An agent can request one page at a time and stop on `has_more`. Set a page cap in its instructions. See the [MCP docs](https://docs.perceptlayer.com/ai-agents). pagination python ebay credits data engineering ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 24 Sept 2026 Perceptlayer 7 min read ## [Fetch Incremental Data From an API: Only New Records](https://perceptlayer.com/blog/incremental-api-data-pulls) Fetch incremental data from an API: sort newest first, keep a high-water mark or seen-ID set per query, and stop paging early. Python, Craigslist and eBay. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "CarGurus API: Search Used Car Listings and Dealers" description: "Get CarGurus used car listings as JSON: look up make and model IDs, run search at 1 credit a call, then pull a dealer by service_provider_id." url: https://perceptlayer.com/blog/cargurus-api-used-car-search --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # CarGurus API: Search Used Car Listings and Dealers 29 Jul 2026 Perceptlayer 8 min read The CarGurus API on Perceptlayer has four endpoints: `makes`, `models`, `search` and `dealer`. Each is a GET request with an `X-API-Key` header, each costs 1 credit on success, and each returns JSON. You look up a make ID, then a model ID, pass them to `search` to get listings, and use the `service_provider_id` from any listing to fetch its dealer. ## Key takeaways - Four endpoints cover the flow: `/v1/cargurus/makes`, `/v1/cargurus/models`, `/v1/cargurus/search` and `/v1/cargurus/dealer`, at 1 credit per successful call. - `search` filters by `make_model_trim_paths`, such as `m26/d126` for the GMC Suburban in the recorded response, so fetch those IDs from `makes` and `models` first. - Each listing carries `price`, `mileage`, `vin`, `days_on_market` and a `seller` object whose `service_provider_id` feeds the `dealer` endpoint. - Budget a regional pull as lookups plus (models × pages) search calls; failed calls cost 0 credits. ## What does the CarGurus API return? The CarGurus data on Perceptlayer is structured used and new car inventory: one listing per vehicle, with the year, make, model, trim, price, mileage, VIN, seller and a link back to the listing page. The [CarGurus API page](https://perceptlayer.com/apis/cargurus) lists all four endpoints, and the playground there lets you run a real call with your key before you write any code. This guide follows the order you'd use in practice. Makes and models give you valid inputs, search gives you listings, and dealer gives you the seller behind a listing. The recorded response below comes from a real search call, so every field name you see is one the API returned. The endpoints sit in the [Cars area](https://perceptlayer.com/verticals/cars) of the catalogue. If you want to know which listing fields suit price analysis, [used car listing data: fields for price analysis](https://perceptlayer.com/blog/used-car-listing-data-price-analysis) covers that question separately. ## Which endpoints does the CarGurus API have? The CarGurus API has four endpoints: `makes`, `models`, `search` and `dealer`. All are `GET` requests and each costs 1 credit on success. Only `makes` and `search` take no required parameter; `models` needs a `make_id` and `dealer` needs a `service_provider_id`. | Endpoint | Returns | Credits | Required | Optional | | --- | --- | --- | --- | --- | | [`/v1/cargurus/makes`](https://perceptlayer.com/apis/cargurus/makes) | Makes | 1 | none | `locale`, `country_code`, `origin`, `device_platform` | | [`/v1/cargurus/models`](https://perceptlayer.com/apis/cargurus/models) | Models | 1 | `make_id` | `locale`, `country_code`, `origin`, `device_platform` | | [`/v1/cargurus/search`](https://perceptlayer.com/apis/cargurus/search) | Search | 1 | none | `make_model_trim_paths`, `price_min`, `price_max`, `distance`, `sort`, `sort_direction`, `page` | | [`/v1/cargurus/dealer`](https://perceptlayer.com/apis/cargurus/dealer) | Dealer | 1 | `service_provider_id` | none | Authentication is the `X-API-Key` header with a key that starts with `sk_live_`. Where a header isn't possible, the `api_key` query parameter works instead. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both. ## How do you get valid make and model IDs? Call `makes` first, then `models` with a `make_id` taken from the makes response. Search filters on IDs, not names, so this lookup is how you avoid guessing. In the recorded search response, the GMC Suburban appears as `make_id` `m26` and `model_id` `d126`. ```bash curl "https://api.perceptlayer.com/v1/cargurus/makes" \ -H "X-API-Key: $API_KEY" ``` Then pass one of the returned make IDs to `models`: ```bash curl "https://api.perceptlayer.com/v1/cargurus/models?make_id=m26" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a makes or models response for this guide, so we won't show one. Run both calls in the playground on the [Makes](https://perceptlayer.com/apis/cargurus/makes) and [Models](https://perceptlayer.com/apis/cargurus/models) pages to see the exact fields your key returns. Both lookups also accept `locale`, `country_code`, `origin` and `device_platform`. They're optional strings, up to 20 characters for `locale` and 40 for the others. Nothing more is documented about them, so leave them out unless you've tested a value in the playground. The IDs are inputs you reuse on every search, so cache them instead of repeating the lookups. [Cache API responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses) shows a TTL approach that fits. ## How do you search used car listings? To search used car listings, call `/v1/cargurus/search` with `make_model_trim_paths` set to the make ID and model ID joined by a slash, URL-encoded as `%2F`. Add `distance`, price bounds and a sort order to narrow the results. Each successful call costs 1 credit and returns one page of listings. This is the request we recorded: ```bash curl "https://api.perceptlayer.com/v1/cargurus/search?make_model_trim_paths=m26%2Fd126&distance=50000&sort=best_match" \ -H "X-API-Key: $API_KEY" ``` The same request in Python: ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/cargurus/search", headers={"X-API-Key": os.environ["API_KEY"]}, params={ "make_model_trim_paths": "m26/d126", "distance": 50000, "sort": "best_match", }, timeout=30, ) resp.raise_for_status() data = resp.json()["data"] for listing in data["listings"]: print(listing["listing_title"], listing["price"]["amount"], listing["mileage"]["value"]) ``` `requests` encodes the slash for you. The response has `data.listings`, `data.pagination` and a `meta` object. ### Which parameters does search take? All seven are optional. Nothing about defaults or page sizes is documented, so the table lists only types and allowed values. | Parameter | Type | Notes | | --- | --- | --- | | `make_model_trim_paths` | string | Up to 200 characters. Example: `m26/d126` | | `price_min` | integer | Lower price bound | | `price_max` | integer | Upper price bound | | `distance` | integer | Search radius | | `sort` | string | One of `best_match`, `deal_score`, `price`, `mileage`, `distance`, `date` | | `sort_direction` | string | One of `asc`, `desc` | | `page` | integer | Page number | ## What does a search response look like? A search response has `data.listings`, `data.pagination` and a `meta` object, and each entry in `data.listings` is one vehicle with its price, mileage, VIN and seller. The excerpt below is trimmed from the recorded response for the request above, with `…` marking the cut parts. ```json { "success": true, "data": { "listings": [ { "listing_id": 461194930, "listing_title": "1996 GMC Suburban", "listing_url": "https://www.cargurus.com/details/461194930", "vin": "3GKFK16R5TG503480", "year": 1996, "make": "GMC", "make_id": "m26", "model": "Suburban", "model_id": "d126", "trim": "K1500 4WD", "price": { "amount": 7995, "currency": "USD", "localized": "$7,995", "rating": "NA", "fees_compliant": true }, "mileage": { "value": 175456, "unit": "MILES", "localized": "175,456" }, "drivetrain": "Four-Wheel Drive", "fuel_type": "Gasoline", "days_on_market": 14, "distance": 537.75244, "seller": { "service_provider_id": "349337", "name": "Little Rock Auto Sales", "city": "Charlotte", "region": "NC", "location": "Charlotte, NC", … }, "is_new": false, "is_cpo": false, "seller_type": "DEALER" }, … ], "pagination": { "page": 1, "page_size": 21, "page_count": 1, "total": 21, "has_more": false } }, "meta": { "duration_ms": 1556, "endpoint_family": "search", "market": "US" } } ``` A few fields worth knowing, all from the recording: - `price.amount` is a number and `price.localized` is the display string. Use the number for analysis. - `mileage.value` pairs with `mileage.unit`, which was `MILES` here. - `vin` identifies the vehicle, and `listing_id` identifies the listing. Pick the key that matches your question: vehicle or advert. - Some fields appear on one listing and not another. The second listing in the recording has `exterior_color`, `interior_color` and an image `count`, while the first doesn't. Treat optional fields as optional in your code. - `pagination.has_more` tells you whether to request the next `page`. ## How do you look up a dealer? To look up a dealer, take `seller.service_provider_id` from a listing and pass it to `/v1/cargurus/dealer`, which costs 1 credit on success. The dealer ID in the recorded response is `349337`, for the Charlotte, NC seller above. The parameter is a string of up to 20 characters. ```bash curl "https://api.perceptlayer.com/v1/cargurus/dealer?service_provider_id=349337" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a dealer response, so the fields it returns aren't shown here. The [Dealer endpoint page](https://perceptlayer.com/apis/cargurus/dealer) lists it and its playground runs the call. The listing already includes the seller's `name`, `city`, `region` and `postal_code`, so you only need the dealer call when you want the dealer record itself. Collect the distinct `service_provider_id` values from your search results first and call `dealer` once per ID, not once per listing. ## What does a regional inventory pull cost? A regional inventory pull costs one credit per successful call, so the cost is the call count: the lookups, plus one search call per page per model, plus one dealer call per distinct dealer. Failed calls aren't billed. The numbers below are an illustration for planning, not a measurement. Say you track 40 models. The lookups are one `makes` call, plus one `models` call for each make involved. Take 10 makes: 1 + 10 = 11 credits, and you cache them. Then search each model. If each model's results fit on 3 pages, that's 40 models × 3 pages = 120 credits per full pass. Add 25 distinct dealers at 1 credit each: 25 credits. One refresh is 120 + 25 = 145 credits. Run that daily for 30 days: 30 × 145 = 4,350 credits. The 100 free credits on signup are less than one 145-credit refresh, so use them to test a few models first. Credits are prepaid in packs starting at 10,000 (Starter), which covers the daily job for two months (10,000 ÷ 4,350 = 2.3), and purchased credits last 12 months. The [pricing page](https://perceptlayer.com/pricing) has what credits cost, and the [credits docs](https://docs.perceptlayer.com/credits) explain how a call is debited. Your own page count will differ. In the recorded response, the whole result fit on one page, with `page_count` 1 and `total` 21. Run a model once and read `pagination.page_count` before you multiply. Failed calls cost nothing and return `X-Credits-Used: 0`. Successful responses carry `X-Credits-Used` and `X-Credits-Remaining`, so you can log the balance as a job runs. ## How do you page through results safely? To page through results safely, request `page` 1, read `pagination.has_more`, and keep going until it's false. Back off when you get a 429, using the `Retry-After` header, and don't retry blindly after a client timeout. Cap the number of pages per run so a bug can't spend credits without limit. ```python import os import time import requests URL = "https://api.perceptlayer.com/v1/cargurus/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def fetch_all(path, max_pages=20): listings = [] for page in range(1, max_pages + 1): while True: r = requests.get( URL, headers=HEADERS, params={"make_model_trim_paths": path, "page": page}, timeout=30, ) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue break r.raise_for_status() data = r.json()["data"] listings.extend(data["listings"]) if not data["pagination"]["has_more"]: break return listings cars = fetch_all("m26/d126") print(len(cars)) ``` `max_pages` caps the spend of one run. Requests have no idempotency key, so a call whose reply was lost may have succeeded and been billed. [Retry web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers that, and [paginate a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python) goes deeper on loops. Rate limits are per account and counted per minute. Free accounts get 1 request a second, and paid packs include faster rates. See the [rate limits docs](https://docs.perceptlayer.com/rate-limits) and [error codes](https://docs.perceptlayer.com/errors) for the full list. ## What should you know before you build on it? Data is collected from publicly available sources and returned as found at the time of the call. A listing can be sold or repriced after you fetch it, so treat a response as a snapshot and store the time you fetched it. CarGurus is a marketplace for dealer inventory, and this API reads its listings. If you need a different region, [AutoScout24 covers European listings](https://perceptlayer.com/blog/autoscout24-api-car-listings-json). For your own inventory, your dealer management system is the system of record, so use it there rather than reading your own cars back from public listings. For agents, the same endpoints are available as MCP tools. `search_endpoints` and `get_endpoint` only look up the catalogue and cost nothing; `call_endpoint` runs the call and spends 1 credit on success. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show the setup. Ready to run it? [Get a free API key](https://perceptlayer.com/signup), send the `makes` call above, and follow the IDs through to `search`. You can browse the [CarGurus endpoints](https://perceptlayer.com/apis/cargurus) or the other [API guides](https://perceptlayer.com/blog/category/api-guides) from there. For background on the source, see [CarGurus](https://www.cargurus.com/), and for the header behind the backoff above, see the [`Retry-After` definition in RFC 9110](https://www.rfc-editor.org/rfc/rfc9110#field.retry-after). ## APIs in this post - [CarGurus **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/cargurus) ## Frequently asked questions ### How much does the CarGurus API cost per call? Each successful call to `makes`, `models`, `search` or `dealer` costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. Every account gets 100 free credits after verifying an email, with no credit card. The [pricing page](https://perceptlayer.com/pricing) shows what credits cost. ### Can I search by price range? Yes. `search` takes `price_min` and `price_max` as integers, and you can combine them with `distance`, `sort` and `sort_direction`. The `sort` parameter accepts `best_match`, `deal_score`, `price`, `mileage`, `distance` or `date`, and `sort_direction` accepts `asc` or `desc`. ### Where do I get the service\_provider\_id for the dealer endpoint? Read it from `seller.service_provider_id` in any search listing. In the recorded response, one listing's seller has `service_provider_id` `349337`. Pass that string, up to 20 characters, to `/v1/cargurus/dealer`. Deduplicate IDs first so you pay for each dealer once. ### What happens if I hit the rate limit? You get a 429 `rate_limited` response with a `Retry-After` header giving the seconds to wait, and the call isn't billed. Limits are per account, counted per minute. Free accounts get 1 request a second. Read `RateLimit-Remaining` to pace a loop before you hit the limit. ### Do I need a CarGurus account or key? No. You need a Perceptlayer API key, sent in the `X-API-Key` header. Sign up for one free, and your 100 free credits, granted once when you verify your email, cover 100 calls at 1 credit each. The [quick start](https://docs.perceptlayer.com/quickstart) walks through the first request. cars cargurus used cars listings dealers ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 4 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [AutoScout24 API: Search European Car Listings as JSON](https://perceptlayer.com/blog/autoscout24-api-car-listings-json) Search AutoScout24 listings as JSON: make\_id and price filters, a recorded BMW response, and what a monthly price sweep costs in credits. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. --- title: "Flatten Nested JSON to CSV in Python: Two Ways Compared" description: "Flatten a recorded Zillow response to CSV with pandas json_normalize (60 columns) and plain Python (63), split photo lists into a child table, fix integers." url: https://perceptlayer.com/blog/web-data-to-csv-python --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Flatten Nested JSON to CSV in Python: Two Ways Compared 29 Jul 2026 Perceptlayer 6 min read To flatten nested JSON to CSV in Python, turn every nested object into dotted column names, decide what to do with lists, and write the rows with `csv` or pandas. `pandas.json_normalize` does the objects in one call but leaves lists as Python lists inside cells. On a recorded Zillow search response it produced 60 columns with 4 holding lists; a plain-Python flattener produced 63 by turning lists into counts and joined strings. This tutorial runs both, then builds the CSV you'd actually use. ## Key takeaways - `pd.json_normalize(listings)` flattened the 3 recorded Zillow listings into 60 columns, such as `address.zipcode` and `price.value`. Four columns still held lists. - A 20-line recursive function gave 63 columns: each list became a `.count` column, plus a `|`\-joined column when its items are plain values. - Lists of things, such as photos, belong in a child table keyed on the parent ID. Exploding 3 photos each for 3 listings gives 9 rows. - Six of the 60 columns are missing on some listings. `estimates.zestimate` exists on 1 of 3, so pandas turned it into a float column until we cast it to `Int64`. - Selecting and renaming 13 fields, plus a photo count, gives a 14-column CSV that's easier to load and check than either full flattening. ## Step 1: What does the nested JSON look like? The input is a Zillow search response: a `data.listings` array where each listing nests objects several levels deep and carries lists of photo URLs. Get it with one call to `/v1/zillow/search`, 1 credit on success. This is the request behind our recorded response: ```bash curl "https://api.perceptlayer.com/v1/zillow/search?latitude=47.6062&longitude=-122.3321&radius_mi=5&listing_category=category1&page_size=20" \ -H "X-API-Key: $API_KEY" -o zillow.json ``` The recording is trimmed to 3 listings, which keeps the counts below easy to check. One listing, cut down with `…`: ```json { "zpid": 2068074790, "location": { "latitude": 47.592564, "longitude": -122.386925 }, "address": { "streetAddress": "1124 Sunset Avenue SW", "zipcode": "98116", "city": "Seattle", "state": "WA" }, "media": { "propertyPhotoLinks": { "mediumSizeLink": "…", "highResolutionLink": "…" }, "allPropertyPhotos": { "medium": ["https://photos.zillowstatic.com/fp/4218b6d4de5511b0d968347ddf298954-p_c.jpg", "…", "…"], "highResolution": ["https://photos.zillowstatic.com/fp/4218b6d4de5511b0d968347ddf298954-p_f.jpg", "…", "…"] }, … }, "bathrooms": 6, "bedrooms": 4, "livingArea": 7870, "yearBuilt": 2015, "propertyType": "singleFamily", "price": { "value": 14000000, "pricePerSquareFoot": 1779 }, "estimates": { "zestimate": 13068300 }, "listing": { "listingStatus": "forSale", "marketingStatus": "active", … }, … } ``` Three shapes need handling: nested objects ( `address`, `price`), lists of strings (the photo URLs), and objects that appear on some listings and not others ( `estimates`). The search response has no price history; Zillow's `property` endpoint takes `zpid[]` for detail, so treat any list it returns the way Step 4 treats photos. [Get a free API key](https://perceptlayer.com/signup) to record your own, and see the [Zillow API page](https://perceptlayer.com/apis/zillow) for the search parameters. ## Step 2: How does pandas json\_normalize flatten it? `pd.json_normalize` takes a list of dicts and turns nested keys into column names joined by `sep`, a dot by default. With no `record_path` it treats the input as an array of records, and `max_level` caps how many levels it flattens ( [pandas documentation](https://pandas.pydata.org/docs/reference/api/pandas.json_normalize.html), 2026). One call handles every nested object in the listings. ```python import json import pandas as pd listings = json.load(open("zillow.json"))["data"]["listings"] df = pd.json_normalize(listings) list_cols = [c for c in df.columns if df[c].map(lambda v: isinstance(v, list)).any()] print(len(df), "rows x", len(df.columns), "columns;", len(list_cols), "hold lists:", list_cols) ``` On the recorded response this prints: ```text 3 rows x 60 columns; 4 hold lists: ['richMedia', 'media.allPropertyPhotos.medium', 'media.allPropertyPhotos.highResolution', 'listCardRecommendation.flexFieldRecommendations'] ``` Every object became columns, and every list stayed a list. Write `df.to_csv()` now and those four columns hold Python reprs such as `['https://…', '…']`, which a spreadsheet shows as text and a database can't query. `json_normalize` can expand one list into rows with `record_path`, but only one at a time, and each listing here has several. ## Step 3: How do you flatten it with plain Python? Recurse through each object, build dotted names, and choose a rule for lists. The rule below writes a `.count` column for every list, and also a `|`\-joined column when the list holds plain values such as URLs. Lists of objects get only the count, since joining them would produce unreadable text. ```python import csv def flatten(obj, prefix="", out=None): out = {} if out is None else out for key, value in obj.items(): name = f"{prefix}{key}" if isinstance(value, dict): flatten(value, f"{name}.", out) elif isinstance(value, list): out[f"{name}.count"] = len(value) if value and all(isinstance(v, (str, int, float)) for v in value): out[name] = "|".join(str(v) for v in value) else: out[name] = value return out rows = [flatten(item) for item in listings] columns = sorted({k for r in rows for k in r}) with open("listings_flat.csv", "w", newline="") as f: writer = csv.DictWriter(f, fieldnames=columns) writer.writeheader() writer.writerows(rows) print(len(rows), "rows x", len(columns), "columns") ``` It prints `3 rows x 63 columns`. The three extra columns over pandas are the counts: four lists, each with a `.count` column, while `richMedia`, a list of objects, gets only its count. Columns come from the union of all rows' keys, so a field that exists on one listing still gets a column, and `DictWriter` leaves the other rows' cells empty. | Approach | Columns | Lists | Missing fields | | --- | --- | --- | --- | | `pd.json_normalize` | 60 | 4 columns hold Python lists | `NaN`, and integer columns become floats | | Plain Python `flatten` | 63 | `.count` plus a \` | \`-joined column | | Selected columns (Step 5) | 14 | Photo count only | `` with nullable types | ## Step 4: Where should the lists go? Into their own table, one row per item, with the parent's ID. A listing's photos are a one-to-many relationship, and a CSV cell is the wrong place for one. pandas does it with `explode`, which turns each list element into its own row and repeats the other columns. ```python photos = (df[["zpid", "media.allPropertyPhotos.highResolution"]] .explode("media.allPropertyPhotos.highResolution") .rename(columns={"media.allPropertyPhotos.highResolution": "photo_url"}) .dropna()) photos.to_csv("listing_photos.csv", index=False) print(len(photos), "photo rows") ``` The recording has 3 high-resolution photos per listing, so this writes 9 rows, each `zpid` and one URL. Load both files into a database and join on `zpid` when you need photos with listings. Do the same for any other list you need, such as a property's price history from a detail endpoint. ## Step 5: How do you build the CSV you'll actually use? Pick the fields your analysis reads, give them short names, and set types that survive missing values. Full flattening is a good way to see what's there; a fixed column list is what you should load, because it doesn't change when the response gains a field. It also exposes a pandas trap: `estimates.zestimate` exists on only 1 of the 3 listings. ```python KEEP = {"zpid": "zpid", "address.streetAddress": "street", "address.zipcode": "zip", "price.value": "price", "price.pricePerSquareFoot": "price_per_sqft", "bedrooms": "beds", "bathrooms": "baths", "livingArea": "sqft", "yearBuilt": "year_built", "propertyType": "type", "estimates.zestimate": "zestimate", "location.latitude": "lat", "location.longitude": "lon"} slim = df[[c for c in KEEP if c in df.columns]].rename(columns=KEEP) slim["zestimate"] = slim["zestimate"].astype("Int64") slim["photo_count"] = df["media.allPropertyPhotos.highResolution"].map( lambda v: len(v) if isinstance(v, list) else 0) slim.to_csv("listings_slim.csv", index=False) print(slim[["zpid", "zip", "price", "beds", "sqft", "zestimate", "photo_count"]].to_string(index=False)) ``` ```text zpid zip price beds sqft zestimate photo_count 2068074790 98116 14000000 4 7870 13068300 3 49046647 98122 1050000 4 2100 3 49147344 98112 585000 1 760 3 ``` Without the `astype("Int64")` line, the zestimate column prints as `13068300.0`, `NaN`, `NaN`. pandas' docs explain why: NaN is a float, so an integer column with any missing value becomes floating point unless you ask for the nullable integer type ( [pandas user guide](https://pandas.pydata.org/docs/user_guide/integer_na.html), 2026). That matters most for IDs, where a float can silently change the value. ## How do you append each day's pull to one CSV? Write against a fixed column list, not the columns of the day. A plain `flatten` builds its header from whatever keys that day's listings have, so two days' files can have different columns in a different order, and appending one to the other misaligns every row. Use the selected `KEEP` names as the header, add a date column, and write the header only when the file is new. ```python import datetime as dt import os def append_day(slim, path="listings_daily.csv"): out = slim.assign(pulled_on=dt.date.today().isoformat()) cols = ["pulled_on", *KEEP.values(), "photo_count"] out.reindex(columns=cols).to_csv(path, mode="a", index=False, header=not os.path.exists(path)) ``` `reindex` adds any missing column as empty and drops unexpected ones, so the file keeps one shape even when a day's response doesn't. Keep the full flattened file alongside it if you want a record of everything the response contained. ## What should you check in the result? Three things. Column count: compare it with the last run, since a new column means the response changed shape. The guide to [detecting schema changes in API JSON](https://perceptlayer.com/blog/web-data-api-json-schema-changes) automates that. Sparse columns: in this recording, 6 of the 60 `json_normalize` columns are missing on some listings, including `title`, `estimates.zestimate` and both `taxAssessment` fields. Sparse doesn't mean broken, but know which columns your analysis can rely on. Third, types after the round trip. CSV stores text, so zip codes such as `98116` should stay strings when you read the file back ( `dtype={"zip": str}` in `pd.read_csv`), and booleans come back as `True`/ `False` text. If the data is going into a database rather than a spreadsheet, skip CSV and load the JSON directly; the tutorial on [loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres) keeps the raw response next to typed columns. ## What does it cost? Flattening is local, so the only cost is the API calls that fetch the JSON: 1 credit per successful Zillow search, and nothing for failed calls. A daily pull of 5 search pages for one area is 5 × 30 = 150 credits a month. The 100 free credits on signup cover the first 20 days, and a 10,000-credit Starter pack covers it for the 12 months purchased credits last. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what packs cost. To get your own response to flatten, run a search in the playground on the [Zillow search endpoint page](https://perceptlayer.com/apis/zillow/search) and save the JSON. ## APIs in this post - [Zillow **1 credit per call** · 20 endpoints](https://perceptlayer.com/apis/zillow) ## Frequently asked questions ### Should I use json\_normalize or write my own flattener? Use `json_normalize` to explore and when you're already in pandas: it flattens every nested object in one call. Write your own when you need a rule for lists, such as counts or joined strings, or want no pandas dependency. For loading, prefer a fixed list of selected columns over either full flattening. ### How do I flatten a list of objects into rows? Use `explode` on the list column to get one row per item, then `pd.json_normalize` on the exploded items if they're objects, keeping the parent ID on every row. Or use `json_normalize` with `record_path` pointing at the list and `meta` naming the parent fields to carry along. Either way, write the result as a separate table. ### Why did my integer column turn into floats? Because some rows are missing the value, and pandas represents missing values in a default integer column as NaN, which is a float. Cast the column with `astype("Int64")`, or call `convert_dtypes()` on the frame, to get nullable integers that print `` for missing values. ### How do I keep zip codes from losing leading zeros? Treat them as strings end to end. The Zillow response already returns `zipcode` as a string, such as `"98116"`, so the problem appears when reading the CSV back. Pass `dtype={"zip": str}` to `pd.read_csv`, or set the column type to text in your spreadsheet before importing. ### Does flattening cost credits? No. Flattening runs on a response you've already fetched. Only the API call costs credits, 1 per successful Zillow search, and failed calls cost nothing. Store the raw JSON so you can re-flatten it with new rules later without calling the API again. python json csv pandas data engineering ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 16 Sept 2026 Updated 24 Oct 2026 Perceptlayer 7 min read ## [Save API JSON to Parquet in Python](https://perceptlayer.com/blog/save-api-json-to-parquet-python) Write API JSON to date-partitioned Parquet with pyarrow and a fixed schema, so a price that arrives as 441 one day and 393.73 the next doesn't break it. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "Indeed Jobs API: Get Job Postings as JSON | Perceptlayer" description: "One GET to /v1/indeed/jobs returns job postings with company, location and apply URL as JSON for 1 credit. Parameters, a real response and monthly cost." url: https://perceptlayer.com/blog/indeed-jobs-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Indeed Jobs API: Get Job Postings as JSON 29 Jul 2026 Updated 6 Nov 2026 Perceptlayer 8 min read You can get Indeed job postings as JSON with a single `GET /v1/indeed/jobs` call. Pass a `query`, optionally narrow it with `location`, `country` and `job_type`, and send your key in the `X-API-Key` header. Each successful call costs 1 credit, and failed calls cost nothing. There's no partner application: a free key is all you need. ## Key takeaways - `GET /v1/indeed/jobs` is the job search endpoint this post covers; the Indeed API has 9 endpoints in all, including job details, company profiles, reviews and salaries. Only `query` is required. - Each job has an `id`, `title`, `company`, a `location` object with coordinates and `is_remote`, `description_html`, `attributes`, `date_published` and `apply_url`. - A successful call costs 1 credit, so 1,000 calls cost 1,000 credits. Failed calls return `X-Credits-Used: 0`. - The free tier gives 100 credits once, after you verify an email address, with no credit card. - Tracking one role with a daily call for a month uses 30 credits. ## Is there still an official Indeed jobs API? Indeed's partner documentation describes its Job Sync API as a way to "create and manage job postings on Indeed and Indeed PLUS", and says Indeed creates an app for your integration once you become a partner ( [Indeed partner docs](https://docs.indeed.com/job-sync-api/integrate-with-job-sync-api), 2026). That is access for posting jobs, and it goes through a partner agreement. If you're an employer or ATS vendor, that is the route to check first. If you want to read postings for a role in a city, for market research, alerts or an agent's tool, the Perceptlayer [Indeed API](https://perceptlayer.com/apis/indeed) returns postings as JSON from its `jobs` endpoint, with a free key and no partner application. ## How do you make your first Indeed jobs request? Get a free key at [/signup](https://perceptlayer.com/signup), then send one GET request. The base URL is `https://api.perceptlayer.com`, the path is `/v1/indeed/jobs`, and the key goes in the `X-API-Key` header. Keys start with `sk_live_`. The call below searches for full-time software engineer roles in Berlin and asks for 20 results. ```bash curl "https://api.perceptlayer.com/v1/indeed/jobs?query=software+engineer&location=Berlin&country=DE&job_type=full_time&limit=20" \ -H "X-API-Key: $API_KEY" ``` Values in the query string need URL encoding, so a space becomes `%20` ( [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986)), or `+` in form-style query strings like the one above. If you can't set headers, the key also works as an `api_key` query parameter, but a header keeps it out of logs and URLs. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both. You can also run the call without writing code. Open the [Indeed API: Jobs page](https://perceptlayer.com/apis/indeed/jobs), fill in the parameters and run it in the playground with your key. ## Which parameters does the Indeed jobs endpoint take? The endpoint takes one required parameter, `query`, and ten optional ones that narrow by place, job type, order and page. Everything below is documented. Nothing else about defaults or page sizes is, so set `limit` explicitly if you care about how many results you get per call. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | Search text, up to 500 characters | | `location` | string | no | City or region text, up to 200 characters | | `country` | string | no | Up to 2 characters, for example `DE` | | `radius` | integer | no | Search distance around `location` | | `radius_unit` | string | no | `MILES` or `KILOMETERS` | | `job_type` | string | no | `full_time`, `part_time`, `contract`, `internship` or `remote` | | `sort` | string | no | `relevance` or `date` | | `limit` | integer | no | Number of results to ask for | | `cursor` | string | no | Pass `data.pagination.next_cursor` from the previous response | | `hl` | string | no | Up to 2 characters; not documented further | | `gl` | string | no | Up to 2 characters; not documented further | Two combinations cover most tracking work. Use `sort=date` to order postings by date rather than by `relevance`. Use `radius` with `radius_unit` to widen a city search to the surrounding area. The full list of calls is on the [Indeed API page](https://perceptlayer.com/apis/indeed), and the [requests docs](https://docs.perceptlayer.com/requests) explain parameter handling across the API. ## What does the response look like? A successful call returns `success: true`, a `data.jobs` array, a `data.pagination` object with `next_cursor` and `has_more`, and `data.metadata` with `total_results` and a `timestamp`. Each job is a flat object with nested `company` and `location` objects, so you can read the fields without parsing HTML around them. The excerpt below is trimmed from a recorded response to the Berlin request above, with `…` marking where we cut. ```json { "success": true, "data": { "jobs": [ { "id": "61ac648a11df5cc6", "title": "Product Designer", "company": { "name": "Telli", "profile_url": "/cmp/Telli" }, "location": { "city": "Berlin", "state": "BE", "country": "DE", "country_name": "Deutschland", "formatted": "Berlin", "latitude": 52.52437, "longitude": 13.41053, "is_remote": false }, "description_html": "

about us


\nEvery 10 minutes, 18 million conversations happen between businesses and consumers around the worl…", "attributes": [ "Full-time", "UI design" ], "date_published": "2025-07-21 05:00:00", "apply_url": "https://jobs.ashbyhq.com/telli/156032e9-0e1d-4f7f-9ac7-c828ba49964d?utm_source=l6jqqRwnQ5" }, … ], "pagination": { "next_cursor": "ABQAAYEAFAAAAAAAAAAAAAAAAmYRNdcAMgEBAQcpfSGrk7wi9QBuLZ6BEihQwmDA0xA2nDAGrqtuJIdLnPZKyLE0IcnT2+IETfyRAAA=", "has_more": true }, "metadata": { "total_results": 20, "timestamp": "2026-10-21T13:25:37.233649Z" } } } ``` Notice that the query asked for software engineers and the first posting is a product designer. Search relevance is not a filter, so check `title` on your side if you need an exact match. ### What do the fields mean for your pipeline? | Field | Use it for | | --- | --- | | `id` | Identifying each posting, for example as a key in your own store | | `title` | Matching roles and grouping by seniority | | `company.name` | Counting who is hiring | | `location.latitude`, `location.longitude` | Mapping postings | | `location.is_remote` | Splitting remote from on-site roles | | `attributes` | Skills and employment type tags, such as `Full-time` | | `date_published` | Telling new postings from old ones | | `apply_url` | Linking to the application page | | `data.pagination.has_more` | Deciding whether another page exists | | `data.pagination.next_cursor` | Passing as `cursor` to request the next page | | `data.metadata.total_results` | Seeing how many postings this response holds (20 in the recording) | `description_html` is HTML, so strip tags or render it safely before you store it as text. In the recorded sample, `date_published` for one posting is from 2025 and others are from 2026, so an old posting can still appear in results. Filter on that field if you only want recent ones. Data is returned as found at the time of the call. ## How do you track a role in Python? To track a role, call the endpoint on a schedule, sort by date and store the `id` values you've seen. This script is a sketch built from the documented parameters and the recorded response shape. It reads your key from `API_KEY`, requests the newest 20 full-time postings and prints the ones whose `id` isn't in your local file. If `data.pagination.has_more` is true, it can optionally fetch a second page by passing `next_cursor` as `cursor`, which costs one more credit. The script uses `id` as the posting's key, the same field shown in the recorded response. ```python import json import os import requests URL = "https://api.perceptlayer.com/v1/indeed/jobs" SEEN_FILE = "seen_ids.json" params = { "query": "software engineer", "location": "Berlin", "country": "DE", "job_type": "full_time", "sort": "date", "limit": 20, } FETCH_SECOND_PAGE = False # each extra page costs 1 more credit headers = {"X-API-Key": os.environ["API_KEY"]} resp = requests.get(URL, params=params, headers=headers, timeout=30) resp.raise_for_status() seen = set(json.load(open(SEEN_FILE))) if os.path.exists(SEEN_FILE) else set() data = resp.json()["data"] jobs = data["jobs"] if FETCH_SECOND_PAGE and data["pagination"]["has_more"]: page2 = requests.get( URL, params={**params, "cursor": data["pagination"]["next_cursor"]}, headers=headers, timeout=30, ) page2.raise_for_status() jobs += page2.json()["data"]["jobs"] for job in jobs: if job["id"] not in seen: print(job["date_published"], job["title"], "-", job["company"]["name"], job["apply_url"]) json.dump(sorted(seen | {j["id"] for j in jobs}), open(SEEN_FILE, "w")) print("credits used:", resp.headers.get("X-Credits-Used"), "remaining:", resp.headers.get("X-Credits-Remaining")) ``` Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so you can stop when the balance gets low. For paging, the response carries `data.pagination.has_more` and `data.pagination.next_cursor`. While `has_more` is true, send `next_cursor` back as the `cursor` parameter to get the next page. Each extra page is another call and another credit. For safe page loops, see [Paginate a Web Data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## What does it cost to track a role for a month? Each successful call costs 1 credit, so cost is a call count. One daily call for a month is 30 calls × 1 credit = 30 credits, so the free tier's 100 credits, granted once, cover the first 3 months. Ten roles checked daily is 300 credits a month; the free credits cover its first 10 days. Checking those same ten roles every hour is 10 roles × 24 calls × 30 days = 7,200 credits. | Plan | Calls | Credits | Cost | | --- | --- | --- | --- | | One role, daily | 30 | 30 | Free credits cover the first 3 months | | Ten roles, daily | 300 | 300 | Free credits cover 10 days, then a pack | | Ten roles, hourly | 7,200 | 7,200 | Within the Starter pack's 10,000 credits | Credits come in prepaid packs of 10,000, 50,000, 200,000, 500,000, 1,000,000 and 5,000,000 credits. Purchased credits last 12 months, with no subscription and no seats. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're spent. The service is prepaid. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited, and there is no automatic top-up. That makes a runaway loop cost a bounded amount. For agents that call tools on their own, [AI Agent API Cost Control](https://perceptlayer.com/blog/ai-agent-web-data-costs) covers caps in more detail. ## How do you handle errors and rate limits? Errors come back as an HTTP status with a JSON body of the form `{"error": {"code", "message", "request_id"}}`. A failed call returns `X-Credits-Used: 0`, so retrying an error response costs nothing for the failure itself. One caveat: requests have no idempotency key, so a request whose reply was lost (a client timeout) may have succeeded and been billed. Retrying that one can cost a second credit; [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers how to handle it. Branch on `error.code` rather than the message text, and log `request_id` so you can quote it if you need help. | Code | Status | What to do | | --- | --- | --- | | `invalid_api_key` | 401 | Check the key and the `X-API-Key` header | | `insufficient_credits` | 402 | Add credits, then retry | | `invalid_parameters` | 422 | Check lengths and allowed values, such as `job_type` | | `rate_limited` | 429 | Wait the seconds in the `Retry-After` header, then retry | | `source_error` | 502 | Retry after a short delay | | `temporarily_unavailable` | 503 | Wait the seconds in the `Retry-After` header, then retry | The [errors docs](https://docs.perceptlayer.com/errors) list every code, and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) describe the limits. Keep retries to a small, bounded number with a growing delay. ## Can an AI agent search jobs through MCP? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing. `call_endpoint` spends the endpoint's credits on success only, and its result reports the credits used and remaining. In Claude Code, add the server with one command, then ask for jobs in plain language. ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` The agent finds `/v1/indeed/jobs` through `search_endpoints`, reads its parameters with `get_endpoint` and runs it with `call_endpoint`. For a full walkthrough, see [Claude MCP Web Search](https://perceptlayer.com/blog/claude-agent-live-search-mcp) and the [MCP docs](https://docs.perceptlayer.com/ai-agents). ## Where does this fit, and what's next? Use the endpoint when you want postings for a role and place as JSON, with a cost you can calculate in advance. It returns one source's listings, so it won't replace a hiring pipeline or a candidate database. Browse other job sources in the [Jobs APIs](https://perceptlayer.com/verticals/jobs), or see how a similar single-endpoint guide works in [Zillow Listings API](https://perceptlayer.com/blog/zillow-listings-api-json) and the rest of the [API guides](https://perceptlayer.com/blog/category/api-guides). Your next step: [get a free API key](https://perceptlayer.com/signup) and run the cURL call above with your own `query` and `location`. ## APIs in this post - [Indeed **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/indeed) ## Frequently asked questions ### Does Indeed still have a public jobs API? Indeed's partner documentation describes an API for creating and managing job postings, available to partners who sign a developer agreement ( [Indeed partner docs](https://docs.indeed.com/job-sync-api/integrate-with-job-sync-api), 2026). That page covers posting jobs, not reading search results. If you just need to read job postings for a role and location, the Perceptlayer Indeed endpoint returns them as JSON with a free key and no partner application. ### How much does each Indeed jobs call cost? A successful call to `/v1/indeed/jobs` costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. The free tier gives 100 credits once, after email verification, with no credit card. Paid packs start at 10,000 credits, which is 10,000 calls at 1 credit each; see [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Which fields does each job posting include? Each job has `id`, `title`, `company` (with `name` and `profile_url`), a `location` object with `city`, `country`, coordinates and `is_remote`, `description_html`, `attributes`, `date_published` and `apply_url`. The recorded response in this article shows the exact shape. ### Can I filter for remote or contract roles? Yes. Set `job_type` to `remote`, `contract`, `full_time`, `part_time` or `internship`. Each job's `location.is_remote` field also tells you whether a posting is remote, so you can filter again on your side. An invalid value returns `invalid_parameters` (422) and costs nothing. ### Is the data complete and up to date? Data is collected from publicly available sources and returned as found at the time of the call. That means a result reflects what was available when you made the request. Postings can be old, as the `date_published` values in the sample show, so filter on that field if recency matters. ### Should I build an Indeed scraper instead? An Indeed scraper means maintaining parsers for search and job pages, handling blocks and following Indeed's terms. The jobs endpoint returns company, location and apply URL as named JSON fields for 1 credit per successful call. A scraper only makes sense for data the endpoint doesn't return, so compare in the playground on the Indeed API page first. jobs indeed job postings api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Indeed Scraper or API: Postings, Companies, Salaries](https://perceptlayer.com/blog/indeed-scraper-vs-api) An Indeed scraper parses five kinds of page; 9 Indeed endpoints return them as JSON at 1 credit a call. A recorded Berlin search is 0.05 credits a posting. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 1 Nov 2026 Perceptlayer 8 min read ## [LinkedIn Scraper or API: What You Can Get](https://perceptlayer.com/blog/linkedin-scraper-vs-api) Compare a DIY LinkedIn scraper with company, job and public post endpoints at 1 credit a call: setup, upkeep, terms and a verdict per use case. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 1 Oct 2026 Perceptlayer 8 min read ## [Job Posting Data for Labour-Market Research](https://perceptlayer.com/blog/job-posting-data-labour-market-research) Which Indeed posting fields support trend analysis, where postings mislead versus hires, and a weekly collection plan that costs 3,000 credits a month. --- title: "Retry Web API Calls Without Paying Twice | Perceptlayer" description: "Retry only 429, 502 and 503. Failed responses return X-Credits-Used: 0, but a timeout is the gap. The credit arithmetic, a Python loop and a balance check." url: https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Retry Web API Calls Without Paying Twice 27 Jul 2026 Perceptlayer 10 min read Retry only the statuses that can succeed on a second try: `429`, `502` and `503`. Wait a random time below a doubling cap, give up after a handful of attempts, and fail fast on everything else. On Perceptlayer a failed response costs nothing and returns `X-Credits-Used: 0`, so a retry after an error you received adds nothing to your bill. A timeout is different: you never saw the response, and Perceptlayer requests have no idempotency key, so a retry after a timeout can be a second paid call. ## Key takeaways - Retry `rate_limited` (429), `source_error` (502) and `temporarily_unavailable` (503). Do not retry `invalid_api_key` (401), `restricted_endpoint` (403), `not_found` (404) or `invalid_parameters` (422): the same request fails the same way. - Treat `insufficient_credits` (402) as a stop signal for the whole job, not a request to retry. The balance only changes when you top up. - Add jitter to the wait, a random delay below a doubling cap, so rejected clients don't all retry at the same moment. - Every failed response you receive returns `X-Credits-Used: 0`. Ten failed responses followed by one success cost 1 credit, the same as a first-try success. A timeout is the exception to plan for: check `X-Credits-Remaining` between successes. - Cap attempts and total wait. A retry loop with no ceiling turns an outage into a hung job. ## Which errors are worth retrying? Retry an error only if the next attempt could plausibly return a different answer. A rate limit is about request pace, and the `502` and `503` codes signal trouble on the service side, so waiting and trying again is a reasonable bet. That is our recommendation, not a guarantee, which is why the loop caps attempts. A malformed parameter or a revoked key will fail identically every time, so retrying it only wastes time. Perceptlayer errors come back as an HTTP status plus a JSON body, `{"error": {"code", "message", "request_id"}}`. Branch on the status or the `code`, and keep the `request_id` for any support conversation. The full list is in the [errors docs](https://docs.perceptlayer.com/errors). | Status | Code | Retry? | Why | | --- | --- | --- | --- | | 401 | `invalid_api_key` | No | The key is wrong or revoked. Fix the key. | | 402 | `insufficient_credits` | No, stop the job | The prepaid balance is empty and nothing more is debited. | | 403 | `restricted_endpoint` | No | Accept the restricted-endpoint terms in the dashboard first. | | 404 | `not_found` | No | The path or resource doesn't exist. | | 422 | `invalid_parameters` | No | Correct the parameters, then send a new request. | | 429 | `rate_limited` | Yes, with backoff | Slow down and try again. See [rate limits](https://docs.perceptlayer.com/rate-limits). | | 502 | `source_error` | Yes, with backoff | Our recommendation: a later attempt may get a different answer. Cap the attempts. | | 503 | `temporarily_unavailable` | Yes, with backoff | The name says the condition is temporary, so a later attempt may succeed. | Network errors and client timeouts belong in the retry set too, with one caveat covered below: when you never saw a response, the zero-cost rule doesn't tell you what happened. ## Why does a retry not cost you twice here? A call is debited only when it succeeds. Failed calls cost nothing and return `X-Credits-Used: 0`, and a successful response carries `X-Credits-Used` (what the call cost) and `X-Credits-Remaining` (the balance after it). So when you receive an error response and retry, the cost of the request is the cost of its one success: 1 credit for nearly every endpoint, however many error responses came first. The rule covers responses you actually received. It says nothing about an attempt that timed out. That changes how you design the loop. On an API that bills per attempt, you'd weigh each retry against its price and keep the retry count low. Here the price of an extra attempt that returns an error is zero credits, so the limits you set are about time, load and your own deadline, not money. The [credits docs](https://docs.perceptlayer.com/credits) describe the rule in full. ### The arithmetic Say a job fetches 10,000 items at 1 credit each. - Credits spent: 10,000 calls × 1 credit = 10,000 credits, the size of one Starter pack. The [pricing page](https://perceptlayer.com/pricing) shows what credits cost. - If 800 of those calls hit a `503` first and succeed on the second attempt, you made 10,800 requests and still spent 10,000 credits. What retries do cost is time and traffic, and time is the budget you tune. With the loop below, the worst case for one call is five attempts. Without a `Retry-After` header that is at most 7.5 seconds of sleeping; when the server sends one, the loop honours it up to the 30-second cap per wait, so four sleeps can reach 120 seconds. Add up to 30 seconds per attempt if each one runs into the client timeout. In the example above, the 800 retried calls add 800 round trips and their waits, not a single credit. Credits stay flat while time grows with the retry count, so you set `max_attempts` and `cap` against your deadline, not your balance. ## How do you retry with exponential backoff and jitter? Wait longer after each failure and randomise the wait. The ceiling doubles per attempt (0.5 s, 1 s, 2 s, 4 s) and the actual sleep is a random value below it, so clients rejected together don't return together. The pattern is described in AWS's [Exponential Backoff and Jitter](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/) (2015). The loop below implements it; if you run several workers against one key it matters, and a single sequential script benefits less. Pacing beats retrying. Request limits are per account, shared by all its keys, and counted per minute: free accounts get 1 request a second (60 a minute). Every response carries `RateLimit-Remaining` (requests left this minute) and `RateLimit-Reset` (seconds until the minute resets), so a worker can slow down or sleep until the reset before it draws a `429`. See [rate limits](https://docs.perceptlayer.com/rate-limits) for paid rates. ### The request This article doesn't pick an endpoint for you, because the loop works the same on any of them. Open an API from the [API list](https://perceptlayer.com/apis), choose an endpoint in its playground, fill in its parameters and run a real call with your key in the playground, then copy the endpoint URL for `ENDPOINT_URL`. Send your key in the `X-API-Key` header (see [authentication](https://docs.perceptlayer.com/authentication)): ```bash curl -i "$ENDPOINT_URL" -H "X-API-Key: $API_KEY" ``` The `-i` flag prints the response headers, so you can see `X-Credits-Used` and `X-Credits-Remaining`. On a failed call you'll see `X-Credits-Used: 0`. If a one-off shell script is all you need, curl can retry for you: ```bash curl --retry 5 --retry-max-time 60 -i "$ENDPOINT_URL" -H "X-API-Key: $API_KEY" ``` The [curl manual](https://curl.se/docs/manpage.html#--retry) documents `--retry` and `--retry-max-time`; check it for which failures curl retries. It has no notion of your credit balance, so it won't stop a whole job on a `402`. For anything that runs unattended, write the loop yourself. ### The loop This Python function retries only the retryable statuses, applies full jitter, and raises immediately on everything else. It also waits for the `Retry-After` header, which Perceptlayer sends with `429` and `503` responses (see the [errors docs](https://docs.perceptlayer.com/errors)). It needs `pip install requests`. ```python import os import random import time import requests RETRYABLE = {429, 502, 503} class ApiError(Exception): def __init__(self, status, code, request_id): super().__init__(f"{status} {code} (request_id={request_id})") self.status = status self.code = code self.request_id = request_id def call_with_retry(url, params=None, method="GET", max_attempts=5, base=0.5, cap=30.0, timeout=30): headers = {"X-API-Key": os.environ["API_KEY"]} last = None for attempt in range(max_attempts): resp = None try: resp = requests.request(method, url, params=params, headers=headers, timeout=timeout) except (requests.ConnectionError, requests.Timeout): last = ApiError(0, "network_error", None) if resp is not None: if resp.ok: return resp try: err = resp.json().get("error", {}) except ValueError: err = {} last = ApiError(resp.status_code, err.get("code"), err.get("request_id")) if resp.status_code not in RETRYABLE: raise last # 401, 402, 403, 404, 422: retrying cannot help if attempt == max_attempts - 1: break wait = random.uniform(0, min(cap, base * 2 ** attempt)) retry_after = resp.headers.get("Retry-After") if resp is not None else None if retry_after and retry_after.isdigit(): wait = max(wait, min(cap, int(retry_after))) time.sleep(wait) raise last ``` Three details are worth a second look. The loop raises on a non-retryable status before it sleeps, so a bad key fails in one round trip. The `Retry-After` branch uses the wait Perceptlayer sends with a `429` or `503`, and falls back to jittered backoff when a response has none. This code reads only a plain number of seconds and ignores any other form of the header. And the final `raise last` surfaces the last real error, with its `request_id`, rather than a generic "retries exhausted". ### The parameters | Parameter | Default | What it controls | | --- | --- | --- | | `max_attempts` | `5` | Total tries, including the first. The loop sleeps at most 4 times. | | `base` | `0.5` | Seconds for the first delay ceiling. Doubles per attempt. | | `cap` | `30.0` | Upper bound on any single wait, in seconds. | | `timeout` | `30` | Seconds before a request counts as a network failure. | | `method` | `"GET"` | Pass the method your endpoint expects. | With these defaults the delay ceilings are 0.5, 1, 2 and 4 seconds, so a call that never recovers and gets no `Retry-After` header gives up after at most 7.5 seconds of waiting plus the time of the five attempts themselves. If the server sends `Retry-After`, each wait can rise to the 30-second `cap`, which makes the worst case 120 seconds of sleeping. ## What should you do when a call times out? A timeout means you never saw the response, so you don't know how that attempt ended. The zero-cost rule applies to failed responses you receive. If the request succeeded on the server and the reply was lost, it may have been debited, and Perceptlayer requests have no idempotency key that would stop the retry from being debited again. Retry anyway, with the same cap on attempts, but check the balance rather than assume. The check uses `X-Credits-Remaining`. Between two consecutive successes from a single sequential worker, the balance should drop by exactly the second call's `X-Credits-Used`. A bigger drop means a debit you didn't see, most likely a timed-out attempt that went through. To cover the first call too, read a starting balance before the loop: error responses carry `X-Credits-Remaining` as well, so a request with no parameters, which the endpoint should reject, gives you the baseline for free. ```python import os url = os.environ["ENDPOINT_URL"] baseline = requests.get(url, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30) previous = int(baseline.headers["X-Credits-Remaining"]) spent = 0 for item in items: resp = call_with_retry(url, params={"q": item}) used = int(resp.headers["X-Credits-Used"]) remaining = int(resp.headers["X-Credits-Remaining"]) spent += used if previous - remaining != used: print(f"unexpected debit: balance fell {previous - remaining}, call cost {used}") previous = remaining print(f"spent {spent} credits on confirmed calls, {previous} remaining") ``` This snippet continues from the loop above and reuses its `requests` import. If the endpoint accepts an empty request, the baseline call succeeds and is billed like any other, so pick an endpoint with a required parameter. Two limits on this check. It only works when nothing else spends from the same key at the same time, so don't run it alongside a second worker or the playground. And it detects extra debits after the fact; it doesn't prevent them. The `params` here are placeholders: use the parameter names the playground shows for your endpoint. Read `X-Credits-Used` from the response, not from a constant, so the check stays right on an endpoint that costs more than 1 credit. ## How do you stop a retry loop from running away? Bound it three ways: attempts per call, wait per attempt, and failures across the whole job. The first two are the `max_attempts` and `cap` parameters. The third is a circuit breaker. If every call in a window fails with `503`, more retries won't help, and stopping early and resuming later is cheaper than hammering a service that is already down. A simple version counts consecutive exhausted calls. After a few in a row, pause the job for a minute or two, or exit and let your scheduler start it again. For `402`, don't pause at all: the balance is empty, there is no automatic top-up, and every further call will fail until you add credits. Raise an alert and stop. If the same calls repeat across a job, [caching responses](https://perceptlayer.com/blog/cache-web-data-api-responses) removes some of them before they can fail, and [safe page loops](https://perceptlayer.com/blog/paginate-web-data-api-python) cover the other common long-running pattern. More like this is in the [data engineering category](https://perceptlayer.com/blog/category/data-engineering). ## Can you retry through an AI agent or MCP tool? Yes, and the cost rule is the same. The `call_endpoint` tool on the MCP server spends the endpoint's credits on success only, and its result reports the credits used and remaining. `search_endpoints` and `get_endpoint` look up the catalogue and cost nothing. An agent that retries a failed `call_endpoint` therefore pays once, on the attempt that works. Put the retry policy in the tool wrapper or the agent's instructions, not in the model's judgment. Tell it which errors to retry, how many times, and to stop on `insufficient_credits`. A model left to improvise will sometimes retry a `422` with the same parameters. The [MCP docs](https://docs.perceptlayer.com/ai-agents) show how to connect the server. ## Next step Get a [free API key](https://perceptlayer.com/signup): 100 free credits after you verify an email address, no credit card. Pick an endpoint in the playground on any [API page](https://perceptlayer.com/apis), paste its URL into the loop above and run it. Check the headers on the first response, then send a request with a deliberately bad parameter and confirm it fails once with `X-Credits-Used: 0` and no retries. What credits cost is on the [pricing page](https://perceptlayer.com/pricing). ## Frequently asked questions ### Does a retried request cost extra credits? Not after an error response you received. A failed call costs nothing and returns `X-Credits-Used: 0`, and only a successful response debits credits. If a request returns three errors and then succeeds, you pay the endpoint's price once. The exception is a timeout: you never saw the response, and Perceptlayer requests have no idempotency key, so a retry can be a second paid call. Compare `X-Credits-Remaining` between successes to catch it. ### Should I retry a 402 insufficient\_credits response? No. The service is prepaid, and when the balance runs out calls return `insufficient_credits` (402) with nothing further debited. There is no automatic top-up, so a retry will return the same error until you add credits. Stop the job, raise an alert, and resume after you add credits. ### How many retries are reasonable? Five attempts with a 30-second cap on any single wait is a sound default for most jobs. Retries that return errors cost no credits, so the limit is about your own deadline and load, though timeouts are worth keeping few. If the same call fails after five tries, the problem is probably not transient, so surface the error with its `request_id` rather than looping longer. ### What should I log when a call fails? Log the HTTP status, the error `code` and the `request_id` from the JSON error body, plus the attempt number. The `request_id` is what you quote in a support conversation. Leave the response body and your key out of the logs. ### How can I test the loop without spending credits? Send a request with a deliberately invalid parameter. It returns `invalid_parameters` (422) with `X-Credits-Used: 0`, and the loop should raise on the first attempt without retrying. That confirms the fail-fast path and that a failed call is not debited. retries backoff rate limits credits error handling ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 9 Sept 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Handle Web Data API Errors in Python: 4xx, 5xx and Timeouts](https://perceptlayer.com/blog/handle-web-data-api-errors-python) Map the API's error codes to retry, fix or stop in Python: 429 and 503 honour Retry-After, 4xx stops, and failed calls cost 0 credits. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 15 Oct 2026 Perceptlayer 7 min read ## [HTTP 429 Too Many Requests: What It Means and How to Fix It](https://perceptlayer.com/blog/http-429-too-many-requests) A 429 Too Many Requests response means you hit a rate limit. Read Retry-After, wait that long, then retry; a tested Python loop and the headers to watch. --- title: "Summarise Restaurant Reviews with an AI Agent | Perceptlayer" description: "An AI review summarizer for Google Maps and Yelp: themes tied to review IDs, quotes checked against the text, and a flag for claims the reviews don't support." url: https://perceptlayer.com/blog/ai-restaurant-review-summary-agent --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Summarise Restaurant Reviews with an AI Agent 27 Jul 2026 Perceptlayer 7 min read An AI review summarizer is only useful if you can check it. This tutorial builds one in Python for a restaurant: it pulls the place's Google Maps and Yelp reviews, normalises them into one list with source-prefixed IDs, asks Claude for themes in a fixed JSON schema where every theme names its review IDs and quotes them word for word, then checks each quote against the cited reviews in code. A summary costs 3 credits per place. ## Key takeaways - Two endpoints feed the agent: `GET /v1/google-maps/reviews` by `business_id` and `GET /v1/yelp/reviews` by `business` alias, at 1 credit per call. - Every review gets an ID like `g:…` or `y:…`, and the model must cite those IDs and copy at least one quote per theme; a plain substring check catches quotes that aren't in the cited reviews. - All six recorded review texts end in an ellipsis and all six are 5-star, so summarise excerpts honestly and balance the sample with Yelp's `sort=lowest`. - Reviewer names and profile links are dropped before anything reaches the model. - The normalisation and the citation check were run on recorded responses; the Claude call wasn't run for this article. ## What does the agent do? It turns a pile of reviews into a short list of themes you can audit. Code does the parts that need to be exact: fetching, normalising, giving each review an ID, and checking the output. The model does the part that needs judgment: grouping reviews into themes and choosing quotes. That split is what makes the summary checkable. 1. Fetch Google Maps reviews for the place's `business_id` and Yelp reviews for its `business` alias. 2. Normalise both into `{id, source, rating, date, language, text}`, with no author fields. 3. Send the list to Claude with a JSON schema: themes, sentiment, review IDs and verbatim quotes. 4. Check every theme: do its IDs exist, and does each quote appear in the reviews it cites? 5. Print the themes and flag any that fail the check as unsupported. You need Python 3.10 or later, a Perceptlayer API key and an Anthropic API key. [Get a free API key](https://perceptlayer.com/signup); verified accounts get 100 free credits on signup. Install `pip install anthropic requests` and export `PERCEPTLAYER_API_KEY` and `ANTHROPIC_API_KEY`. ## Why not use the official review APIs? Because they return only a handful of reviews per place, which is too few to find themes. Google's Places API returns at most five reviews for a place, sorted by relevance ( [Google Places API](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places), 2026). Yelp's Places API returns up to three review excerpts on its Enhanced plan and up to seven on Premium ( [Yelp Places API plans](https://docs.developer.yelp.com/docs/plans), 2026). If you're showing a couple of reviews next to a map pin, those APIs are the right fit: they're first-party and their display terms are clear. For a summary across dozens of reviews, you need more of them. The [Google Maps reviews endpoint](https://perceptlayer.com/apis/google-maps/reviews) takes `page`, `pages`, `limit`, `sort` and `search`, and the [Yelp reviews endpoint](https://perceptlayer.com/apis/yelp/reviews) takes `sort` ( `relevance`, `newest`, `oldest`, `highest`, `lowest`, `elite`), `rating` and an `after` cursor. Data is collected from publicly available sources and returned as found at the time of the call. ## How do you fetch and normalise the reviews? Call each endpoint once and map its fields onto one shape. These are the exact requests behind the recordings used here; the Google `business_id` comes from a Google Maps search, and the Yelp alias is the last part of a Yelp business URL: ```bash curl "https://api.perceptlayer.com/v1/google-maps/reviews?business_id=0x60188b88b7d8f7ab%3A0x2133080e9923eaac" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/yelp/reviews?business=gary-danko-san-francisco&sort=newest" \ -H "X-API-Key: $API_KEY" ``` The two recordings are for two different places, a Tokyo café on Google Maps and a San Francisco restaurant on Yelp, so they show each source's shape rather than one place's reviews. Here's one Yelp review, trimmed with `…`, with the `author` object cut: ```json { "success": true, "data": { "business": { "alias": "gary-danko-san-francisco", "name": "Gary Danko", … }, "review_count": 6149, "reviews": [ { "id": "4qYbbI9JbtCDUOtQRcJfDA", "rating": 5, "text": "The staff is top notch.\nI really like the way their menu works, where you can pick any 3, 4, or 5 courses, fixed price. The cheese cart is ah-mazing, and really, only one person at the table needs to order it, for sharing. (depending on yo…", "language": "en", "created_at": "2026-10-22T21:21:22Z", … }, … ], "has_more": true, "next_after": "eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoib2Zmc2V0Iiwib2Zmc2V0Ijo5fQ" } } ``` Google Maps reviews come in `items`, with `review_id`, `rating`, a millisecond `timestamp`, and `review_text` and `review_language` as lists. Both sources also carry author names, profile links and photos; the normaliser keeps none of them. ```python """Summarise one place's Google Maps and Yelp reviews, with every theme tied to review IDs.""" import datetime import json import os import sys import anthropic import requests API = "https://api.perceptlayer.com/v1" HEADERS = {"X-API-Key": os.environ["PERCEPTLAYER_API_KEY"]} MODEL = os.environ.get("CLAUDE_MODEL", "claude-opus-5-5") def get(path, **params): r = requests.get(f"{API}/{path}", headers=HEADERS, params=params, timeout=90) r.raise_for_status() return r.json() def google_reviews(business_id): body = get("google-maps/reviews", business_id=business_id) for r in body.get("items", []): yield { "id": "g:" + r["review_id"], "source": "google", "rating": r["rating"], "date": datetime.datetime.fromtimestamp(r["timestamp"] / 1000, datetime.timezone.utc).date().isoformat(), "language": (r.get("review_language") or [None])[0], "text": " ".join(r.get("review_text") or []), } def yelp_reviews(business): body = get("yelp/reviews", business=business, sort="newest") for r in body["data"].get("reviews", []): yield { "id": "y:" + r["id"], "source": "yelp", "rating": r["rating"], "date": r["created_at"][:10], "language": r.get("language"), "text": r.get("text", ""), } ``` Run on the two recordings, with `requests.get` mocked, these produced six normalised reviews, three per source, 2,307 characters of JSON in all. Every one was rated 5, and every text ended in `…`. ## Why do the excerpts and the ratings matter? Because they decide what a summary can honestly say. The texts in both recordings are cut short with an ellipsis, so a theme like "the cheese cart is popular" can be supported, but anything about how a review ends can't. The system prompt below tells the model so. If you need full texts, check whether the single-review endpoint, [`/v1/google-maps/review`](https://perceptlayer.com/apis/google-maps/review), returns more; we haven't recorded it. The ratings matter more. Six 5-star reviews will produce a glowing summary, but that reflects the sample: recent reviews on a well-rated place. Balance it on purpose. Yelp's `sort=lowest` fetches the critical end, and a second call costs 1 more credit. Report the rating mix next to the themes, so a reader knows what the summary is based on. Our guide to [review data for sentiment analysis](https://perceptlayer.com/blog/product-review-data-sentiment-analysis) goes further into sampling. ## How do you make the model cite its sources? Give it IDs and require them in a schema. Structured outputs ( `output_config` with a JSON schema) make the response valid JSON in a fixed shape ( [Anthropic, structured outputs](https://docs.anthropic.com/en/docs/build-with-claude/structured-outputs), 2026). Each theme has a sentiment, the IDs of the reviews behind it, and quotes copied from those reviews. The prompt forbids guessing beyond the excerpts. ```python SCHEMA = { "type": "object", "properties": { "themes": { "type": "array", "items": { "type": "object", "properties": { "theme": {"type": "string"}, "sentiment": {"type": "string", "enum": ["positive", "negative", "mixed"]}, "review_ids": {"type": "array", "items": {"type": "string"}}, "quotes": {"type": "array", "items": {"type": "string"}}, }, "required": ["theme", "sentiment", "review_ids", "quotes"], "additionalProperties": False, }, } }, "required": ["themes"], "additionalProperties": False, } SYSTEM = """You summarise customer reviews of one place into themes. Every theme must list the IDs of the reviews that support it, and at least one quote copied word for word from one of those reviews. Use only the reviews given. Review texts may be cut short with an ellipsis; don't guess how they end.""" def summarise(reviews): client = anthropic.Anthropic() response = client.messages.create( model=MODEL, max_tokens=16000, system=SYSTEM, messages=[{"role": "user", "content": json.dumps(reviews, ensure_ascii=False)}], output_config={"format": {"type": "json_schema", "schema": SCHEMA}}, ) if response.stop_reason == "refusal": raise RuntimeError("the model declined") return json.loads(next(b.text for b in response.content if b.type == "text")) ``` ## How do you flag claims the reviews don't support? Check every theme in code. A theme fails if it cites an ID that isn't in the input, if it cites none, or if a quote doesn't appear in the text of the reviews it cites. The check is a plain substring match after trimming quote marks and ellipses: crude, but it catches the two failures that matter, invented quotes and quotes attributed to the wrong review. ```python def check(summary, reviews): """Flag themes whose IDs don't exist or whose quotes aren't in the cited reviews.""" by_id = {r["id"]: r for r in reviews} problems = [] for t in summary["themes"]: missing = [i for i in t["review_ids"] if i not in by_id] if missing: problems.append((t["theme"], f"unknown review IDs {missing}")) cited = " ".join(by_id[i]["text"] for i in t["review_ids"] if i in by_id) for q in t["quotes"]: if q.strip(" .…\"'") not in cited: problems.append((t["theme"], f"quote not found in cited reviews: {q!r}")) if not t["review_ids"]: problems.append((t["theme"], "no supporting reviews")) return problems if __name__ == "__main__": google_id, yelp_alias = sys.argv[1], sys.argv[2] reviews = list(google_reviews(google_id)) + list(yelp_reviews(yelp_alias)) summary = summarise(reviews) for t in summary["themes"]: print(f'- {t["theme"]} ({t["sentiment"]}, {len(t["review_ids"])} reviews): "{t["quotes"][0]}"') for theme, problem in check(summary, reviews): print(f"UNSUPPORTED {theme}: {problem}") ``` We tested `check` on the six recorded reviews with three themes we wrote as test input, not model output. A theme quoting "The cheese cart is ah-mazing" and citing the Yelp review it came from passed. The same quote cited against a Google review failed with "quote not found in cited reviews". A theme citing `y:doesnotexist` failed twice: unknown ID, and its quote not found. Run it with a Google `business_id` and a Yelp alias for the same restaurant: `python summarise.py `. ## What does a summary cost? Each call costs 1 credit on success, and failed calls cost nothing. One Google Maps reviews call and two Yelp calls, `newest` and `lowest`, make 3 credits a place; add 1 credit per extra page. The Claude call is billed separately by Anthropic. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Job | Calls | Credits | | --- | --- | --- | | One place, 3 calls | 3 | 3 | | One place, plus 2 more pages from each source | 7 | 7 | | 100 places, 3 calls each | 300 | 300 | | 100 places, re-summarised monthly for a year | 3,600 | 3,600 | Worked example: summarising 100 restaurants monthly at 3 calls each is 300 credits a month. The 100 free credits on signup cover a first run of 33 restaurants, and the monthly job needs a pack. A year of it, 3,600 credits, fits in a Starter pack of 10,000 credits, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. For paging and rate limits, see the [Yelp reviews API guide](https://perceptlayer.com/blog/yelp-reviews-api-json), the [Google Maps reviews guide](https://perceptlayer.com/blog/google-maps-reviews-api-parameters) and the [rate limits docs](https://docs.perceptlayer.com/rate-limits). ## What should you watch for in production? Three things, all about the reviews rather than the model. First, attribution: if you display review text, the source's terms apply; Google, for example, asks developers to show the author's name next to Google reviews they display through its API. This agent displays themes and short quotes without names, so decide what your use needs. Second, language: Google returns `review_language`, so filter or translate before summarising a mixed set. Third, recency: store each review's date and summarise a fixed window. To run it, [get a free API key](https://perceptlayer.com/signup) and look up a restaurant in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps) and the [Yelp API page](https://perceptlayer.com/apis/yelp). The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover the same endpoints over MCP, and the [errors docs](https://docs.perceptlayer.com/errors) list the codes a fetch can return. ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) - [Yelp **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/yelp) ## Frequently asked questions ### What is an AI review summarizer? A program that collects reviews of a place or product and has a language model group them into themes, such as service, value or a signature dish. This one pulls Google Maps and Yelp reviews as JSON, requires the model to cite review IDs and quote them, and checks every quote against the cited reviews before printing the result. ### How do I stop the summary from making things up? Give each review an ID, require IDs and verbatim quotes for every theme with a JSON schema, and check the quotes in code. A substring check catches quotes that don't exist and quotes attributed to the wrong review. Anything that fails is printed as unsupported rather than silently shown. ### Why are all the reviews positive? Because of the sample, not the place. Recent reviews of a well-rated restaurant skew high: all six recorded reviews used here are 5-star. Pull Yelp's `sort=lowest` as well, report the rating mix next to the themes, and summarise positive and negative reviews separately if you need both sides. ### How much does it cost to summarise a restaurant's reviews? 3 credits per place: one Google Maps reviews call and two Yelp reviews calls, at 1 credit per successful call. Extra pages cost 1 credit each, and failed calls cost nothing. Every account gets 100 free credits after verifying an email address. Model tokens are billed separately by your model provider. ### Does the agent store reviewers' names? No. The normaliser keeps each review's ID, source, rating, date, language and text, and drops author names, profile links and photos before anything reaches the model. If you later display reviews to users, check each source's attribution terms, which may require showing the author's name. review summarization ai agents google maps yelp restaurants python ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. --- title: "Scheduled AI Agent Runs: Budgeting Credits per Run" description: "Cap an agent at N calls per run with a Python ledger that reads X-Credits-Used, plus the math for hourly and daily runs on 100 credits on signup." url: https://perceptlayer.com/blog/scheduled-agent-credit-budget --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Scheduled AI Agent Runs: Budgeting Credits per Run 24 Jul 2026 Perceptlayer 7 min read Budget a scheduled agent by dividing your monthly credits by the number of runs, then enforcing the result as a hard call cap inside each run. On 100 credits on signup, a 10,000-credit Starter pack spread over 10 months, an hourly agent gets 1 call per run and a daily agent gets 32. A small Python ledger that reads the `X-Credits-Used` header keeps every run inside that cap. ## Key takeaways - Per-run cap = monthly credits ÷ runs per month, rounded down. A 31-day month has 744 hourly runs or 31 daily runs. - 100 credits on signup cover 744 hourly runs at 1 call each, or 31 daily runs at up to 32 calls each. The 100 free credits on signup are granted once, so they cover a test, not a schedule. - Count every attempt against the cap, and treat a timed-out call as spent, because a request whose reply was lost may have been billed. - Read `X-Credits-Used` and `X-Credits-Remaining` on each response so the ledger follows the real balance, not your estimate. - The service is prepaid. At a zero balance calls return `insufficient_credits` (402), so the balance is the absolute ceiling on spend. ## How do you set a credit budget for each agent run? Start from the monthly credits you are willing to spend and divide by the number of scheduled runs in the month. Round down, and that is the most calls one run may make. A successful call costs the credits shown on its endpoint, which is 1 credit for every [Google Search API](https://perceptlayer.com/apis/google-search) endpoint, so the call cap and the credit cap are the same number. ```text runs per month = runs per day × days in the month calls per run = floor(monthly credits ÷ runs per month) monthly spend = runs per month × calls per run ``` Failed calls cost nothing, so a cap based on attempts is slightly conservative. That is the right direction to be wrong in. If you want the broader picture of spend limits for agents, [AI agent API cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs) covers it; this article is the per-run, scheduled case. ## What does an hourly or daily schedule cost against a monthly budget? Every account gets 100 free credits once, after verifying an email address, with no credit card. They don't renew, so use them to test a schedule: 100 credits cover 3 daily runs at 32 calls (96 credits) or 100 hourly runs at 1 call. A running schedule draws on a prepaid pack. A budget of 100 credits on signup, which is a 10,000-credit Starter pack spread over 10 months, is enough for one call on each of 744 hourly runs in a 31-day month, or 32 calls on each of 31 daily runs. The table shows the arithmetic for other schedules and budgets. | Schedule | Runs in a 31-day month | Credits available | Calls per run | Credits used | | --- | --- | --- | --- | --- | | Daily | 31 | 1,000 (Starter over 10 months) | 32 | 31 × 32 = 992 | | Every 6 hours | 124 | 1,000 (Starter over 10 months) | 8 | 124 × 8 = 992 | | Hourly | 744 | 1,000 (Starter over 10 months) | 1 | 744 × 1 = 744 | | Every 15 minutes | 2,976 | 1,000 (Starter over 10 months) | 0 | Not possible on 1,000 a month | | Daily | 31 | 10,000 (Starter pack) | 322 | 31 × 322 = 9,982 | | Hourly | 744 | 10,000 (Starter pack) | 13 | 744 × 13 = 9,672 | | Hourly | 744 | 50,000 (Build pack) | 67 | 744 × 67 = 49,848 | Two things stand out. Frequency matters far more than depth: hourly runs are 24 times as frequent as daily ones, so the per-run allowance falls from 32 calls to 1 on 100 credits on signup, and from 322 to 13 on a whole Starter pack in one month. And a 15-minute schedule needs at least 2,976 credits a month before it can make a single call per run. [Pricing](https://perceptlayer.com/pricing) has what credits cost; purchased credits last 12 months, so an unspent month doesn't vanish. ## Which request will the agent spend its credits on? For a research agent, the workhorse is `GET /v1/google-search/search`, which returns organic results, related searches, local results and more as JSON for 1 credit. The parameters below are the ones an agent usually sets. The full list is on the [Search endpoint page](https://perceptlayer.com/apis/google-search/search). | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `query` | string | yes | The search text. | | `hl` | string | no | Interface language, up to 2 characters. | | `gl` | string | no | Country, up to 2 characters. | | `safe` | string | no | One of `active`, `off`. | | `page` | integer | no | Result page. | | `amount` | integer | no | Integer parameter, see the endpoint page. | A single call looks like this: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` The response is a JSON object with named fields. A recorded response, trimmed: ```json { "search_information": { "query_displayed": "best restaurants in Berlin", "organic_results_count": 6 }, "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. …", "source": "Anders & Kaitlin" }, … ], "related_searches": […], … } ``` The cost is on the response headers, not in the body: `X-Credits-Used` is what this call cost and `X-Credits-Remaining` is the balance afterwards. Those two headers are all the ledger below needs. The [credits documentation](https://docs.perceptlayer.com/credits) describes them. ## How do you enforce a per-run call cap in Python? Wrap every request in one function that checks the cap before the call and records the cost after it. Three limits do the work: a maximum number of attempts per run, a monthly credit limit read from a local ledger, and a reserve you never touch. When any of them trips, the function raises an exception instead of making the request. ```python import os import sqlite3 import uuid import requests BASE = "https://api.perceptlayer.com" KEY = os.environ["API_KEY"] class BudgetExceeded(Exception): pass class Ledger: def __init__(self, path="credits.db"): self.db = sqlite3.connect(path) self.db.execute( """CREATE TABLE IF NOT EXISTS calls ( ts TEXT, run_id TEXT, path TEXT, status INTEGER, credits INTEGER, remaining INTEGER)""" ) def add(self, run_id, path, status, credits, remaining): self.db.execute( "INSERT INTO calls VALUES (datetime('now'), ?, ?, ?, ?, ?)", (run_id, path, status, credits, remaining), ) self.db.commit() def month_spent(self): row = self.db.execute( "SELECT COALESCE(SUM(credits), 0) FROM calls " "WHERE ts >= date('now', 'start of month')" ).fetchone() return row[0] class RunBudget: def __init__(self, ledger, max_calls, month_limit, reserve=0): self.ledger = ledger self.max_calls = max_calls self.month_limit = month_limit self.reserve = reserve self.run_id = uuid.uuid4().hex[:8] self.calls = 0 self.remaining = None # last balance seen in a response header def get(self, path, **params): if self.calls >= self.max_calls: raise BudgetExceeded(f"call cap of {self.max_calls} reached") if self.ledger.month_spent() + 1 > self.month_limit: raise BudgetExceeded("monthly credit limit reached") if self.remaining is not None and self.remaining <= self.reserve: raise BudgetExceeded("balance is at the reserve") self.calls += 1 try: r = requests.get( BASE + path, params=params, headers={"X-API-Key": KEY}, timeout=30, ) except requests.Timeout: # The reply was lost; the call may have succeeded and been billed. self.ledger.add(self.run_id, path, 0, 1, None) raise used = int(r.headers.get("X-Credits-Used", 0)) left = r.headers.get("X-Credits-Remaining") if left is not None: self.remaining = int(left) self.ledger.add(self.run_id, path, r.status_code, used, self.remaining) if r.status_code == 402: raise BudgetExceeded("insufficient_credits") r.raise_for_status() return r.json() ``` The timeout branch is the part most budget code gets wrong. Requests have no idempotency key, so a client timeout can hide a call that went through. The ledger records it at the endpoint's 1 credit, the worst case, and the next successful response's `X-Credits-Remaining` corrects the picture. The `timeout=30` argument bounds how long `requests` waits for the server ( [Requests timeouts](https://requests.readthedocs.io/en/latest/user/advanced/#timeouts)). [Retry web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) goes deeper on that. The ledger's "start of month" is the calendar month. Treat the ledger as a local guard rail and `X-Credits-Remaining` as the source of truth. SQLite's date functions are documented in the [SQLite date and time functions reference](https://www.sqlite.org/lang_datefunc.html) if you want to move the window. ## How do you hand the capped function to an agent? Expose one tool to the model, backed by `RunBudget.get`, and make the cap visible in the tool's result. When the budget is spent, return a plain message instead of raising, so the model finishes with what it has instead of looping. ```python def make_search_tool(budget): def search_web(query: str) -> str: try: data = budget.get( "/v1/google-search/search", query=query, hl="en" ) except BudgetExceeded as e: return f"No more searches this run ({e}). Answer from what you have." except requests.RequestException as e: return f"Search failed ({type(e).__name__}). Answer from what you have." rows = data.get("organic_results", [])[:5] return "\n".join( f"{r['position']}. {r['title']} - {r['link']}\n {r.get('snippet', '')}" for r in rows ) return search_web ledger = Ledger() budget = RunBudget(ledger, max_calls=32, month_limit=992, reserve=8) search_web = make_search_tool(budget) ``` Passing only five rows with four fields also keeps the model's context small, which is a separate saving covered in [trimming API responses for LLM context](https://perceptlayer.com/blog/trim-api-responses-llm-context). For the tool definition itself, see the [tool schema checklist](https://perceptlayer.com/blog/agent-tool-schema-design-web-apis). If you connect the agent through the [MCP server](https://docs.perceptlayer.com/ai-agents) instead, the same rule applies. `search_endpoints` and `get_endpoint` only look up the catalogue and cost nothing; `call_endpoint` spends credits on success and reports the credits used and remaining, so your harness can tally those numbers into the same ledger and stop the loop at the cap. The [MCP vs function calling comparison](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) helps you choose between the two. ## What should happen when a run hits a limit? End the run, log why, and let the next scheduled run start fresh. Don't retry inside the same run to "finish the job", because that is how a capped run turns into an uncapped one. Each limit maps to a different response, and the [error reference](https://docs.perceptlayer.com/errors) lists the codes. | Signal | Meaning | What the run does | | --- | --- | --- | | `BudgetExceeded` from the call cap | The run used its allowance | Return a partial answer and exit | | 402 `insufficient_credits` | Balance is empty; nothing more is debited | Stop, alert a human, no retry | | 429 `rate_limited` | Too many requests this minute | End the run and let the next one start fresh | | 503 `temporarily_unavailable` | The service is briefly unavailable | End the run and let the next one start fresh | | Timeout | Reply lost, may have been billed | Log at 1 credit, do not repeat blindly | The 429 and 503 responses carry a `Retry-After` header with the seconds to wait. Free accounts get 1 request a second (60 a minute); [rate limits](https://docs.perceptlayer.com/rate-limits) explains how the per-minute counting works, and [concurrent requests in Python](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) covers the parallel case. For Python error handling in general, see [handling API errors](https://perceptlayer.com/blog/handle-web-data-api-errors-python). ## How do you stretch a budget without lowering the cap? Reduce repeated work rather than the number of runs. If an hourly agent asks the same query every time and the answer is unlikely to change within the hour, a local cache with a sensible TTL answers repeats without making a call, so they spend no credits; [caching API responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses) shows the TTL choices. Next, spend the allowance where it matters: let the agent plan its queries first, run the one or two that answer the question, and skip the rest. Last, match frequency to how fast the data changes. Search results for a stable topic don't need an hourly check. Moving from hourly to every 6 hours on 100 credits on signup takes the allowance from 1 call to 8 per run. For a worked example of an agent that combines several searches, read the [market research agent](https://perceptlayer.com/blog/market-research-agent-search-trends). To try the numbers on your own schedule, [get a free API key](https://perceptlayer.com/signup), paste in the ledger above and set `max_calls` from the table. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How many credits does a scheduled agent use per month? Runs per month multiplied by calls per run, times the credits per call. Hourly runs in a 31-day month are 744; at 3 calls of 1 credit each, that is 744 × 3 = 2,232 credits, which is above a 1,000-credit monthly budget. The same agent on a daily schedule uses 31 × 3 = 93 credits. ### Do failed calls count against the agent's budget? Not in credits. A failed call costs nothing and returns `X-Credits-Used: 0`. The ledger above still counts every attempt against the per-run call cap, which keeps a run from looping on errors. The one exception worth recording is a client timeout, which may have been billed even though you saw no reply. ### What happens when the agent runs out of credits? The service is prepaid with no automatic top-up. When the balance reaches zero, calls return `insufficient_credits` with HTTP 402 and nothing more is debited. Your agent should treat that as a stop signal, not a retry case. Buy a pack, then let the next run proceed. ### Can I read the remaining balance without making a billable call? Every response carries `X-Credits-Remaining`, including errors, so the balance arrives with the calls you already make. The `search_endpoints` and `get_endpoint` MCP tools only look up the catalogue and cost nothing. For your balance, rely on the header from your last call. ai agents credits budgeting scheduling python google search ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 18 Jul 2026 Updated 10 Nov 2026 Perceptlayer 11 min read ## [LangChain Custom Tool for Live Web Data: Python Tutorial](https://perceptlayer.com/blog/langchain-custom-tool-web-data) Build a LangChain tool in Python for Google Search and News: typed arguments, retries on 429, 502 and 503 only, and a per-run credit cap. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 12 Jul 2026 Perceptlayer 7 min read ## [AI Agent API Cost Control: Cap Web Data Spend](https://perceptlayer.com/blog/ai-agent-web-data-costs) Cap an agent's web data spend per run: credit arithmetic for 8 and 20 calls per task, a Python budget wrapper, and why failed calls cost 0 credits. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. --- title: "Trivago Hotel Prices API: Deals and Search as JSON" description: "Call trivago suggest, search and deals as JSON: 1 credit per call, a recorded Paris search response, and the provider_count field in a metasearch result." url: https://perceptlayer.com/blog/trivago-api-hotel-prices --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Trivago Hotel Prices API: Deals and Search as JSON 24 Jul 2026 Perceptlayer 8 min read The Perceptlayer Trivago API returns data from trivago, the hotel metasearch site, as JSON through 6 endpoints. With the [Trivago API](https://perceptlayer.com/apis/trivago), `suggest` turns a place name into a destination, `search` lists hotels for your dates, and `deals` returns offers for one hotel. Each call is a GET with the `X-API-Key` header and costs 1 credit. A failed call costs nothing. This guide shows a recorded Paris `search` response. We recorded only that one, so `suggest` and `deals` are described from their parameters, not shown as output. The recorded `search` has no per-night offer price for each hotel: it returns `forecast_price`, `price_range` and `price_histogram`, and offers come from `deals`. ## Key takeaways - The Trivago API has 6 endpoints ( `suggest`, `search`, `deals`, `hotel`, `reviews`, `filters`), and every one costs 1 credit per successful call. - `search` needs `destination_id`, `check_in` and `check_out`; a recorded Paris call reported `total: 2500` hotels and `has_more: true`. - Each hotel in a search result carries a `provider_count` (7 and 16 in the recorded excerpt) but no per-provider price breakdown. - Page with `offset`: the response returns `next_offset` and `has_more` so a loop knows when to stop. - Your free tier is 100 credits, once, on signup, enough for 100 calls with no card on file. ## What does the Trivago API return? The Perceptlayer Trivago API (trivago, the hotel metasearch site, 6 endpoints) returns hotel search results, single-hotel details, reviews, price deals for specific dates and the filters available for a destination, all as JSON with named fields. The endpoints sit under `/v1/trivago/`, all GET requests, all at 1 credit. The [Trivago API page](https://perceptlayer.com/apis/trivago) has a playground for running any of them with your key. | Endpoint | Returns | Required parameters | | --- | --- | --- | | `/v1/trivago/suggest` | Suggest | `query` | | `/v1/trivago/search` | Search | `destination_id`, `check_in`, `check_out` | | `/v1/trivago/deals` | Deals | `hotel_id`, `check_in`, `check_out` | | `/v1/trivago/hotel` | Hotel | `hotel_id` | | `/v1/trivago/reviews` | Reviews | `hotel_id` | | `/v1/trivago/filters` | Filters | `destination_id` | Most flows chain them: a name goes into `suggest`, the destination goes into `search`, and a hotel you care about goes into `deals`, [`hotel`](https://perceptlayer.com/apis/trivago/hotel) or [`reviews`](https://perceptlayer.com/apis/trivago/reviews). Trivago is one of the sites in the [Travel APIs](https://perceptlayer.com/verticals/travel) area of the catalogue. ### What price data does search return? The Perceptlayer Trivago API `search` endpoint returns price summaries, not per-night offers. In the recorded call, each hotel has a `forecast_price` (a month, a `price_per_night` and a `currency`), and the result set has a `price_range` and a `price_histogram`. It has no per-provider price for a stay. Per-hotel offers for your dates are what `deals` is for. | Endpoint | What it returns | Price data | Recorded here | | --- | --- | --- | --- | | `search` | A page of hotels for a destination and dates | `forecast_price` per hotel, `price_range` and `price_histogram` for the result set | Yes, Paris | | `deals` | Offers for one `hotel_id` and one stay | Per-hotel offers for your dates | No | | `hotel` | Details for one `hotel_id` | Not a price endpoint | No | One caveat covers the rest of this article: the endpoint documentation lists parameters and types only, so we describe response fields only as they appear in the recorded Paris call. ## How do you find a destination ID? The Trivago API `suggest` endpoint turns a place name into the ID that other calls need. `GET /v1/trivago/suggest` takes one required parameter, `query` (up to 100 characters), and an optional `market`. It's the lookup step that feeds every other call, because `search` and `filters` want a numeric `destination_id` rather than a city name. ```bash curl "https://api.perceptlayer.com/v1/trivago/suggest?query=Berlin" \ -H "X-API-Key: $API_KEY" ``` `market` accepts one of `us`, `de`, `uk`, `fr`, `es`, `it` or `nl`. We haven't recorded a Suggest response, so none is shown; the [Suggest playground](https://perceptlayer.com/apis/trivago/suggest) runs the call with your key. The recorded search below uses `destination_id=22235`, which came back with a city centre named Paris. Don't have a key yet? [Get a free API key](https://perceptlayer.com/signup) and the call above works as written. ## How do you search hotels for your dates? The Perceptlayer Trivago `search` endpoint, `GET /v1/trivago/search`, takes a `destination_id`, a `check_in` date and a `check_out` date and returns a page of hotels. The recorded request below used only those three required parameters. Dates in the recorded call are written as `YYYY-MM-DD`, the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) calendar-date form. ```bash curl "https://api.perceptlayer.com/v1/trivago/search?destination_id=22235&check_in=2026-11-20&check_out=2026-11-23" \ -H "X-API-Key: $API_KEY" ``` The optional parameters narrow and order the list: | Parameter | Type | Notes | | --- | --- | --- | | `adults`, `rooms` | integer | Party size and room count | | `children_ages[]` | list of integer | One entry per child | | `currency` | string | Price currency; the recorded call came back as `USD` | | `market` | string | One of `us`, `de`, `uk`, `fr`, `es`, `it`, `nl` | | `limit`, `offset` | integer | Page size and start position | | `sort` | string | `relevance`, `price_asc`, `rating` or `price_desc` | | `min_price`, `max_price` | integer | Price bounds | | `stars[]` | list of integer | Any of 1, 2, 3, 4, 5 | | `min_rating` | string | One of `7.0`, `7.5`, `8.0`, `8.5` | | `property_type[]`, `amenities[]` | list of integer | Property and amenity filters | Defaults and maximum page sizes aren't documented, so we don't state them. The [Search endpoint page](https://perceptlayer.com/apis/trivago/search) lists them as the catalogue does. ### What does the search response look like? The Trivago API search response wraps the result in `success`, `data` and `meta`. The top of `data` echoes your search and reports the size of the result set: `total` was 2500, `limit` was 35, `has_more` was `true` and `next_offset` was 35. Here is that header, trimmed: ```json { "success": true, "data": { "destination_id": 22235, "check_in": "2026-11-20", "check_out": "2026-11-23", "market": "us", "currency": "USD", "sort": "relevance", "total": 2500, "limit": 35, "offset": 0, "has_more": true, "next_offset": 35, "city_center": { "name": "Paris", "coordinates": { "latitude": 48.856445, "longitude": 2.352231 } }, "price_range": { "min": 2, "max": 600 }, … ``` `price_range` and `price_histogram` summarise the whole result set, so you can see the spread before you fetch a single hotel. In the recorded excerpt the range ran from 2 to 600 in `USD`. The histogram buckets each carry `from`, `to` and `count`. Each entry in `hotels` is one property. Here is the first one, trimmed: ```json { "id": 49992, "position": 1, "name": "Residence Hoteliere Champ de Mars", "type": "Hotel", "stars": 3, "rating": 8.3, "review_count": 1284, "location": "Paris, France", "distance": "0.5 miles to Eiffel tower", "free_wifi": true, "provider_count": 7, "sponsored": false, "forecast_price": { "month": "2027-01", "price_per_night": 91, "currency": "USD" } … } ``` These are the hotel fields in the recorded excerpt: | Field | Recorded value (first hotel) | Meaning | | --- | --- | --- | | `id` | `49992` | Integer ID of the property | | `position` | `1` | Entry number in the list (2 for the second hotel) | | `name`, `type` | `Residence Hoteliere Champ de Mars`, `Hotel` | Property name and type | | `stars`, `rating`, `review_count` | `3`, `8.3`, `1284` | Star class, rating, number of reviews | | `location`, `distance` | `Paris, France`, `0.5 miles to Eiffel tower` | Place and distance to a landmark | | `free_wifi` | `true` | Wi-Fi flag | | `provider_count` | `7` | Per-hotel number, undefined in the docs; the second hotel shows `16` | | `sponsored` | `false` | Sponsored flag | | `forecast_price` | `price_per_night` 91 USD for `2027-01` | A forecast month and nightly price, not an offer for your dates | The first hotel's `id` is the value this article passes as `hotel_id` to `deals` below. ## How is a metasearch result different from a single-site price? In a recorded Perceptlayer Trivago API search for Paris, each of the two hotels shown carries a `provider_count` field (7 and 16). It counts how many sources trivago compares for that hotel. The response gives `price_range` and a `price_histogram` for the whole result set but no per-provider price. Per-hotel offers for your dates come from `GET /v1/trivago/deals`, which costs 1 credit per successful call. That changes the question you can ask. A single-site guide such as the ones linked below answers "what does this site charge?", which suits rate monitoring against one channel. A Perceptlayer Trivago API result adds `provider_count`, a way to see how many sources sit behind each hotel before you spend a `deals` call on it. If you want one site's own prices instead, compare with the [Booking.com hotel prices guide](https://perceptlayer.com/blog/booking-com-hotel-prices-api), the [Expedia hotels guide](https://perceptlayer.com/blog/expedia-hotels-api-search-json) and the [Google Hotels guide](https://perceptlayer.com/blog/google-hotels-api). ## What does the Deals endpoint add? The Trivago API `deals` endpoint, `GET /v1/trivago/deals`, returns the deals for one hotel and one stay. It requires `hotel_id`, `check_in` and `check_out`, and accepts `adults`, `rooms`, `children_ages[]`, `currency` and `market`. Reuse the same dates as your search so the two calls describe the same stay. The example below uses the first recorded hotel's `id` as `hotel_id`. ```bash curl "https://api.perceptlayer.com/v1/trivago/deals?hotel_id=49992&check_in=2026-11-20&check_out=2026-11-23&adults=2" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a Deals response, so none is shown here. The [Deals endpoint page](https://perceptlayer.com/apis/trivago/deals) links to the playground, which runs the call with your key. ## What does the Filters endpoint take? `GET /v1/trivago/filters` takes a required `destination_id` and an optional `market` (us, de, uk, fr, es, it or nl) and costs 1 credit per successful call. The recorded Paris `search` response also includes an `available_filters` list. Each entry has a `concept` code and a `hotels` count (the recorded entry is `"concept": "416-6"` with `"hotels": 0`), so the filter values you pass to `search` as `property_type[]` and `amenities[]` can be traced back to hotel counts. The `search` parameters are lists of integers. We have no recorded Filters response, so the [Filters playground](https://perceptlayer.com/apis/trivago/filters) is where to run it. ## How do you page through all results? The Trivago search endpoint pages with `offset`: a recorded Paris call returned `limit` 35 of `total` 2,500 hotels, with `has_more` true and `next_offset` 35. Loop until `has_more` is false and cap the page count in code, since each page is one call at 1 credit. ```python import os import requests URL = "https://api.perceptlayer.com/v1/trivago/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} params = { "destination_id": 22235, "check_in": "2026-11-20", "check_out": "2026-11-23", "sort": "price_asc", } hotels, offset, pages = [], 0, 0 MAX_PAGES = 3 while pages < MAX_PAGES: r = requests.get(URL, headers=HEADERS, params={**params, "offset": offset}, timeout=30) r.raise_for_status() data = r.json()["data"] hotels.extend(data["hotels"]) pages += 1 if not data["has_more"]: break offset = data["next_offset"] print(len(hotels), "hotels in", pages, "calls") ``` Each page is one call, so the loop above spends at most 3 credits. For a longer treatment of safe loops, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python), and for the error side, the [Errors docs](https://docs.perceptlayer.com/errors). Rate-limited (429) responses carry a `Retry-After` header with the seconds to wait; the [rate limits](https://docs.perceptlayer.com/rate-limits) page has the per-account numbers. ## What does the Trivago API cost? All six Trivago API endpoints cost 1 credit per successful call; failed calls cost nothing and return `X-Credits-Used: 0`. A suggest call, one search and deals for 10 hotels is 1 + 1 + 10 = 12 credits. The free tier of 100 credits on signup covers that 8 times, with no card needed. You verify an email address to get the free credits. Purchased credits come in prepaid packs and last 12 months. [Pricing](https://perceptlayer.com/pricing) shows what credits cost. Checking deals for 50 hotels once a day for 30 days is 50 × 30 = 1,500 credits. The free credits cover the first 2 days of that, and the Starter pack of 10,000 credits covers it with room to spare. The [Credits docs](https://docs.perceptlayer.com/credits) explain the `X-Credits-Used` and `X-Credits-Remaining` headers. If you hold direct access through a partner arrangement with the site, use that for production booking flows. This API suits research, monitoring and prototypes where you want hotel data without maintaining a scraper. For the wider picture, read [hotel price data for rate monitoring](https://perceptlayer.com/blog/hotel-price-data-rate-monitoring). Next step: [get a free API key](https://perceptlayer.com/signup), then run the Berlin `suggest` call above and follow its destination into `search`. [Authentication](https://docs.perceptlayer.com/authentication) covers the header and the `api_key` query parameter. ## APIs in this post - [Trivago **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/trivago) ## Frequently asked questions ### Does the Trivago API return a price per night for each hotel? Not in `search`: the recorded Paris search gives each hotel a `forecast_price` (a month and a `price_per_night`), and offers for your dates come from `deals`. ### Which markets does the Trivago API support? The optional `market` parameter takes one of seven values: `us`, `de`, `uk`, `fr`, `es`, `it` or `nl`. The recorded Paris search used `us` and returned prices in USD. Pass the market your users book from, and use the same one for `search` and `deals` so the two calls compare like with like. ### How many calls does a hotel price check take? A search plus `deals` for 10 hotels is 11 calls and 11 credits, or 12 with a `suggest` call first. ### Can an AI agent call the Trivago API? Yes: the MCP server at `https://perceptlayer.com/mcp` has a `call_endpoint` tool that spends 1 credit on a successful Trivago call, and its lookup tools cost nothing (see the [AI agents docs](https://docs.perceptlayer.com/ai-agents)). ### What happens when a Trivago API call fails? A failed call is not billed and returns `X-Credits-Used: 0`, with an HTTP status and a JSON `error` body; the [Errors docs](https://docs.perceptlayer.com/errors) list the codes. ### Does this replace a direct trivago partner feed? No. The Perceptlayer Trivago API returns data collected from publicly available sources, as found at the time of the call, so use a direct partner arrangement for production booking flows. trivago hotels travel hotel prices metasearch ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Aug 2026 Updated 23 Oct 2026 Perceptlayer 8 min read ## [Booking.com Hotel Prices API: Search, Rooms and Reviews](https://perceptlayer.com/blog/booking-com-hotel-prices-api) Eleven Booking.com endpoints as JSON: search, prices, rooms and reviews, with parameters and a 1,000-hotel price check costed in credits. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [Google Hotels API: Hotel Prices for Your Dates as JSON](https://perceptlayer.com/blog/google-hotels-api) One GET to /v1/google-hotels/search returns Paris hotels with nightly rate, total rate and rating for your dates as JSON. Parameters, a response and cost. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 5 Jul 2026 Perceptlayer 7 min read ## [Expedia Hotels API: Search Hotels and Rooms as JSON](https://perceptlayer.com/blog/expedia-hotels-api-search-json) Search Expedia hotels by region and dates, then list rooms and rate plans as JSON. Real parameters, a recorded response and 1 credit per call. --- title: "UK Sold House Price Data: What Listing Sites Add" description: "Land Registry's Price Paid Data is the free record of sold prices. What Zoopla and Rightmove add (asking prices, agents, valuation history) and fields to keep." url: https://perceptlayer.com/blog/uk-house-price-data-sold-prices --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # UK Sold House Price Data: What Listing Sites Add 24 Jul 2026 Updated 31 Oct 2026 Perceptlayer 7 min read For UK sold house prices, start with HM Land Registry's Price Paid Data: it is free, covers residential sales in England and Wales, and is the authoritative record of what was paid. Listing sites add what the register leaves out: the asking price and how it changed, the agent, rooms and size, and valuation history. The useful dataset joins the two, and since August 2026 Land Registry publishes a UPRN for new sales, which makes that join exact. ## Key takeaways - Price Paid Data gives the price, completion date, postcode, address, property type ( `D`, `S`, `T`, `F`, `O`), new-build flag and tenure for each sale, under the Open Government Licence. - It has no asking price, agent, bedrooms or floor area, and the latest two months are incomplete because registration lags the sale. - A recorded Rightmove search gives the asking side: `price.amount`, `bedrooms`, `tenure.tenureType`, `displaySize`, `customer.branchDisplayName` and `listingUpdate`, but its `displayAddress` is often only street and outcode. - Land Registry's new transaction-to-UPRN lookup lets you join a sale to Zoopla's UPRN endpoints, such as `/v1/zoopla/property-valuation-history`, at 1 credit per call. - Comparing median asking and sold prices by outcode and property type is a fair first measure of the asking-to-sold gap; a property-level gap needs an exact address or UPRN match. ## Where should UK sold prices come from? From HM Land Registry, for England and Wales. Its Price Paid Data covers residential property sold for value and lodged for registration, is free to use for commercial and non-commercial purposes under the Open Government Licence, and is updated monthly ( [HM Land Registry](https://www.gov.uk/guidance/about-the-price-paid-data), 2026). It is the register, so it is the figure to use for "what did this sell for". Each row has a transaction ID, the price from the transfer deed, the completion date, the postcode and address parts, a property type code ( `D` detached, `S` semi-detached, `T` terraced, `F` flat, `O` other), an `Old/New` flag ( `Y` for a new build), a duration ( `F` freehold or `L` leasehold) and a PPD category ( `A` for standard sales, `B` for additional types such as repossessions and buy-to-lets). The files have no header row; the columns come in that documented order. It has limits worth knowing before you build on it. The two most recent months are incomplete, because the gap between a sale and its registration typically runs from two weeks to two months. Prices are transaction prices, not market values: a transfer within a family can be fixed far from market value. And it covers England and Wales only, so Scotland and Northern Ireland need other sources. ## What do listing sites add to sold prices? The context around the sale. Land Registry records the end of the process, the price paid. A listing site records the process itself: what the seller asked, when the property was listed, whether the price was cut, who the agent was, and the rooms and size buyers saw. Zoopla also exposes valuation history and nearby sales for a property by its UPRN. The table maps each question to the source that answers it. | Question | Best source | Endpoint or field | | --- | --- | --- | | What did it sell for, and when? | HM Land Registry | Price, Date of Transfer | | What was the asking price? | Rightmove, Zoopla listings | `price.amount` on [Rightmove search](https://perceptlayer.com/apis/rightmove); [`/v1/zoopla/listing`](https://perceptlayer.com/apis/zoopla/listing) | | Was the price reduced? | Rightmove | `addedOrReduced`, `listingUpdate.listingUpdateReason` | | Which agent handled it? | Rightmove, Zoopla | `customer.branchDisplayName`; `/v1/zoopla/property-agents` | | Bedrooms, size, tenure | Rightmove | `bedrooms`, `displaySize`, `tenure.tenureType` | | How has its estimated value moved? | Zoopla | `/v1/zoopla/property-valuation-history` by `uprn` | | What sold nearby? | Zoopla, Rightmove | `/v1/zoopla/property-nearby-sold`; `/v1/rightmove/sold-properties` | Rightmove's `sold-properties` endpoint filters by `postcode`, `property_type` ( `DETACHED`, `FLAT`, `TERRACED`, `SEMI_DETACHED`), `tenure` and `sold_in` (3, 6, 12, 24 or 120 months). Zoopla's `sold` endpoint takes a `location` and sale-date bounds. Both are listing-site views of completed sales, useful for joining to listings; for the price itself, the register wins. ## Which listing fields are worth keeping? Keep the fields that explain a price, and the ones you need to match records. Our recorded Rightmove search for `location=London&channel=BUY` shows the asking side. This excerpt is its first listing, trimmed with `…`: ```json { "id": 90486465, "bedrooms": 3, "bathrooms": 2, "displayAddress": "Cavaye Place, Chelsea, London, SW10", "location": { "latitude": 51.486678, "longitude": -0.180225 }, "propertySubType": "Apartment", "tenure": { "tenureType": "LEASEHOLD" }, "listingUpdate": { "listingUpdateReason": "new", "listingUpdateDate": "2026-07-03T22:30:31Z" }, "price": { "amount": 1495000, "currencyCode": "GBP", … }, "customer": { "branchId": 298991, "branchDisplayName": "OB Private, Mayfair", … }, "displaySize": "1,285 sq. ft.", "channel": "BUY", "addedOrReduced": "Added on 03/07/2026", … } ``` | Field | Keep it because | Watch out for | | --- | --- | --- | | `price.amount` | The asking price, numeric | It's what the seller wants, not what the buyer paid | | `listingUpdate.listingUpdateReason`, `listingUpdateDate` | Why and when the listing last changed ( `new` in the recording) | Store every observation to see changes over time | | `addedOrReduced` | The site's own text, such as `Added on 03/07/2026` | Display text; parse the date carefully | | `bedrooms`, `bathrooms` | Explain price differences within a type | Land Registry has no room counts to check against | | `displaySize` | Floor area when the agent gives it | Text, sometimes empty | | `tenure.tenureType` | Matches Land Registry's `F`/ `L` duration | Leasehold length isn't in either excerpt | | `propertySubType` | Maps roughly to `D`, `S`, `T`, `F` | "Apartment" and "Flat" both map to `F` | | `customer.branchDisplayName`, `branchId` | Agent share and agent-level analysis | A branch, not a person | | `channel` | Filters out commercial stock | The same response has a `COMMERCIAL_BUY` listing | | `location` | Distance to sales and to each other | Use it for distance, not to identify an address | Two details from the same recording matter for sold-price work. The second listing in it is `Land` at `65000000` with `channel` `COMMERCIAL_BUY`, inside a residential `BUY` search, so filter on `channel` and `propertySubType` before computing anything. And two of the three `displayAddress` values stop at the street and outcode ( `SW10`, `W1W`), which is too coarse to match one listing to one Land Registry sale. ## How do you join a sale to a listing? By UPRN where you can, by address where you must. HM Land Registry now publishes a lookup from Price Paid transaction IDs to UPRNs. It was first published on 28 August 2026, isn't back-dated, includes a UPRN only where Land Registry can reliably link the title address to an addressable location, and carries its own licence conditions and an Ordnance Survey attribution ( [HM Land Registry](https://www.gov.uk/government/statistical-data-sets/transaction-unique-identifier-and-uprn-look-up-table-dataset), 2026). With a UPRN, every Zoopla property endpoint is one call: `/v1/zoopla/property`, `property-valuation-history`, `property-agents` and `property-nearby-sold` each take `uprn` and cost 1 credit. That turns a bare sale row into a sale with its valuation history and agents. We don't have a recorded Zoopla response, so check which fields each returns in the playground on the [Zoopla API page](https://perceptlayer.com/apis/zoopla) before you design your tables. For older sales, or for Rightmove, match on address. Normalise the postcode (upper case, single space), the house number or name ( `PAON`), the flat ( `SAON`) and the street, and treat a match as certain only when all of them agree. The article on [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers the matching method. Where the listing address stops at the outcode, don't force a property-level match; use the aggregate comparison below instead. ## How do you measure the asking-to-sold gap for an area? Compare like with like at area level: median asking price from current listings against median sold price from the register, for the same outcode and property type. This works without any property-level match. It measures the market, not individual negotiations, so it's a first look rather than a precise discount. The script reads a Price Paid CSV by column position, which follows Land Registry's documented order, and pages a Rightmove search for one outcode. ```python import csv import os import statistics import requests OUTCODE, LR_TYPE, RM_TYPES = "SW10", "F", {"Flat", "Apartment"} # Land Registry Price Paid Data: no header row; columns in documented order. sold = [] with open("pp-2026.csv", newline="") as f: for row in csv.reader(f): price, postcode, ptype, category = int(row[1]), row[3], row[4], row[14] if postcode.split(" ")[0] == OUTCODE and ptype == LR_TYPE and category == "A": sold.append(price) asking, credits = [], 0 for page in range(1, 6): r = requests.get("https://api.perceptlayer.com/v1/rightmove/search", params={"location": OUTCODE, "channel": "BUY", "page": page}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=60) if r.status_code != 200: break credits += int(r.headers["X-Credits-Used"]) data = r.json()["data"] for p in data["properties"]: if p["channel"] == "BUY" and p.get("propertySubType") in RM_TYPES: asking.append(p["price"]["amount"]) if not data.get("has_next_page"): break if sold and asking: s, a = statistics.median(sold), statistics.median(asking) print(f"{OUTCODE} flats: median sold {s:,.0f} (n={len(sold)}), " f"median asking {a:,.0f} (n={len(asking)}), gap {(s - a) / a:+.1%}") print("credits used:", credits) ``` We tested the script on a sample row and the recorded Rightmove fields, not against live calls. It keeps only category `A` sales, which drops repossessions and other non-standard transfers, and only `BUY` listings of flats. Read the result with its sample sizes. The two sets differ in timing (sales completed months ago against today's asking prices) and in mix (which flats happen to be listed now), so a gap of a few per cent can be noise. Run it monthly per outcode and watch the trend. ## What does the listing side cost? Land Registry's data is free. Each listing-site call is 1 credit on success and 0 on failure, so the cost is pages and lookups. The script above reads up to 5 Rightmove pages per outcode: 20 outcodes monthly is at most 20 × 5 = 100 credits. Adding Zoopla valuation history and agents for 200 sales with a UPRN is 200 × 2 = 400 credits. | Step | Calls a month | Credits | | --- | --- | --- | | Rightmove search, 20 outcodes × 5 pages | 100 | 100 | | Zoopla `property-valuation-history` + `property-agents`, 200 UPRNs | 400 | 400 | | **Total** | **500** | **500** | That's 500 credits a month. The 100 free credits every verified account gets once cover one month of the Rightmove step, and a 10,000-credit Starter pack covers the whole job for the 12 months purchased credits last (12 × 500 = 6,000). The [credits docs](https://docs.perceptlayer.com/credits) explain the balance and [pricing](https://perceptlayer.com/pricing) has what packs cost. The [Rightmove API guide](https://perceptlayer.com/blog/rightmove-api-property-data) covers search paging and its record cap; to start, run a `sold-properties` call for your own postcode in the playground on the [Rightmove API page](https://perceptlayer.com/apis/rightmove). ## APIs in this post - [Zoopla **1 credit per call** · 17 endpoints](https://perceptlayer.com/apis/zoopla) - [Rightmove **1 credit per call** · 8 endpoints](https://perceptlayer.com/apis/rightmove) ## Frequently asked questions ### Is HM Land Registry sold price data free? Yes. Price Paid Data is free to download and use, for commercial or non-commercial purposes, under the Open Government Licence, with an attribution statement. It covers residential sales in England and Wales sold for value and is updated monthly. The transaction-to-UPRN lookup has its own licence conditions, so read those before you use it. ### Why are the latest months missing sales? Price Paid Data follows registration, not completion. HM Land Registry says the gap between a sale and its registration typically runs from two weeks to two months, so the two most recent months are incomplete. Don't read a drop in recent volumes as a market change until those months fill in. ### Can listing sites tell me the actual sold price? They show completed sales, and Rightmove's `sold-properties` and Zoopla's `sold` endpoints return them, but the authoritative price for England and Wales is the Land Registry record. Use listing-site sold data to join a sale to its listing, agent and valuation history, and the register for the price itself. ### How do I match a Rightmove listing to a Land Registry sale? Only when both have the full address. The recorded Rightmove search shows some `displayAddress` values with only the street and outcode, which can't identify one property. Match on normalised postcode, house number or name, flat and street when they're all present; otherwise compare at outcode level by property type. ### What does it cost to add listing data to Land Registry sales? Land Registry data costs nothing. Listing calls are 1 credit each when they succeed and nothing when they fail: 100 Rightmove search pages and 400 Zoopla UPRN lookups a month is 500 credits. The 100 free credits on signup are granted once, so a monthly job needs a pack; a 10,000-credit Starter pack covers 12 months of it. The [pricing page](https://perceptlayer.com/pricing) has what credit packs cost. uk property sold prices land registry house prices real estate data ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 31 Oct 2026 Perceptlayer 9 min read ## [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check. --- title: "Deduplicate Listings Across Sources: Matching Without IDs" description: "Match car listings from AutoScout24 and AutoTrader UK with no shared ID: normalise make and model, block, then score year, price and mileage in Python." url: https://perceptlayer.com/blog/deduplicate-listings-across-sources --- [Blog](https://perceptlayer.com/blog) / [Data engineering](https://perceptlayer.com/blog/category/data-engineering) # Deduplicate Listings Across Sources: Matching Without IDs 22 Jul 2026 Perceptlayer 10 min read Two sources never share a listing ID, so you match on what the car is: normalised make and model, first-registration year, price and mileage. Group candidates by make and model, score each pair on the remaining fields, and accept only pairs that clear a threshold. This tutorial builds that matcher in Python against the AutoScout24 and AutoTrader UK search endpoints, and states where it will get things wrong. ## Key takeaways - Block on normalised make and model first, then score year, price and mileage inside each block. Comparing every listing with every other one is both slow and noisy. - Mileage is the strongest signal. The matcher weights it 3, price 2 and year 1, and it never auto-accepts a pair when one side has no mileage. - Two sources can name the same model differently. AutoScout24's recorded `model_group` is `3er`, and AutoTrader writes `5 Series`, so the matcher needs a normaliser for model names. - The pipeline costs 1 credit per search page: 5 pages from each source is 10 credits per run. - A threshold is a trade-off. Raise it and you keep duplicates; lower it and you merge two different cars. ## Why can't you deduplicate listings by ID? Each marketplace issues its own identifiers. AutoScout24 returns a `listing_id` UUID, and AutoTrader UK returns an `advert_id`; neither means anything on the other site. A dealer who advertises one car in both places creates two records with no key in common, so a join on ID finds nothing and you have to compare attributes instead. That's record linkage, a problem statisticians formalised long before web data existed ( [Fellegi and Sunter, A Theory for Record Linkage, Journal of the American Statistical Association](https://doi.org/10.1080/01621459.1969.10501049), 1969; see also the [overview of record linkage](https://en.wikipedia.org/wiki/Record_linkage)). The practical recipe hasn't changed: normalise the fields, generate candidate pairs, score them, and decide. Two caveats before the code. The two sources may overlap less than you'd expect, since AutoTrader UK covers the UK and AutoScout24 takes a `market` parameter for other countries, so check how many matches your own filters produce. The same matcher works unchanged for two feeds of the same market, and for duplicates inside one source (a dealer relisting a car). And the matcher gives you probabilities of sameness, not proof. ## Which fields do the two sources share? Both search endpoints return make, model, year and price, but under different names and units. AutoScout24 gives the model group, first-registration year, price and mileage in kilometres. AutoTrader's recorded search response carries make, model, year and price inside `tracking_context`, and it has no mileage field. That gap shapes the whole design. | Concept | AutoScout24 `search` | AutoTrader UK `search` | | --- | --- | --- | | Source ID | `listing_id` | `advert_id` | | Make | `make` | `tracking_context.make` | | Model | `model_group` ( `model` is the narrower `316`) | `tracking_context.model` | | Year | `first_registration.year` | `tracking_context.year` | | Price | `price.amount`, `price.currency` ( `EUR` in the recording) | `price.amount`, `price.currency` ( `GBP` in the recording) | | Mileage | `mileage.value_km` | not in the recorded search response | Here's the shape of the AutoScout24 fields we use, trimmed from the recorded response: ```json { "listing_id": "f81b29b2-19e3-4418-8801-03578ed51631", "price": { "amount": 5700, "currency": "EUR", … }, "mileage": { "value_km": 215000, … }, "first_registration": { "raw": "06/2013", "year": 2013, "month": 6 }, "make": "BMW", "model": "316", "model_group": "3er", … } ``` And the AutoTrader UK fields, also trimmed from its recorded response: ```json { "advert_id": "202606063062554", "title": "BMW 5 Series", "price": { "amount": 2200, "currency": "GBP", "display": "£2,200" }, … "tracking_context": { "price": 2200, "make": "BMW", "model": "5 Series", "year": 2014, … } } ``` I haven't got a recorded AutoTrader listing-detail response, so I won't claim that [the listing endpoint](https://perceptlayer.com/apis/autotrader-uk/listing) returns mileage. If you find it does, fetch it only for candidate pairs and feed it into the same scorer; the code below already handles a mileage that is present on one side only. ## How do you fetch both sources? Call each search endpoint with the filters you care about and read the `listings` array. Each page costs 1 credit on either endpoint, so five pages from each source is 5 × 2 × 1 = 10 credits per run. Send the key in the `X-API-Key` header, as described in [authentication](https://docs.perceptlayer.com/authentication). The request for AutoScout24 uses `market`, `make_id`, `model_id`, `sort`, `page` and `limit`; the request for AutoTrader uses `postcode`, `make`, `price_search_type`, `sort` and `page`. Both come from the endpoint parameter lists on the [AutoScout24 search page](https://perceptlayer.com/apis/autoscout24/search) and the [AutoTrader UK search page](https://perceptlayer.com/apis/autotrader-uk/search). ```python import os, re, time from collections import defaultdict from dataclasses import dataclass from itertools import combinations from typing import Optional import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, params): for _ in range(3): r = requests.get(BASE + path, params=params, headers=HEADERS, timeout=30) if r.status_code in (429, 503): time.sleep(int(r.headers.get("Retry-After", "5"))) continue r.raise_for_status() return r.json()["data"] raise RuntimeError(f"gave up on {path}") ``` The `get` helper waits for the `Retry-After` seconds on a 429 or 503, which the [rate limits](https://docs.perceptlayer.com/rate-limits) page describes. It deliberately doesn't retry timeouts: a request whose reply was lost may have succeeded and been billed, a case covered in [retrying web API calls without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) and [handling errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python). ## Step 1: Normalise each listing into one record Convert both shapes into a single `Car` record before comparing anything. Every later step then reads one schema, and every source-specific quirk lives in one small function per source. Prices stay in their original currency, with a property that converts to euros using a rate you supply. ```python TO_EUR = {"EUR": 1.0, "GBP": float(os.environ["GBP_TO_EUR"])} @dataclass class Car: uid: str make: str model: str year: int price: float currency: str km: Optional[float] = None @property def eur(self): return self.price * TO_EUR[self.currency] def from_autoscout24(l): return Car( uid="as24:" + l["listing_id"], make=l["make"], model=l.get("model_group") or l["model"], year=l["first_registration"]["year"], price=l["price"]["amount"], currency=l["price"]["currency"], km=l["mileage"]["value_km"], ) def from_autotrader(l): t = l["tracking_context"] return Car( uid="at:" + l["advert_id"], make=t["make"], model=t["model"], year=t["year"], price=l["price"]["amount"], currency=l["price"]["currency"], ) ``` Set `GBP_TO_EUR` from a rate source you trust on the day you run. Don't hard-code one: a stale rate quietly widens every price gap. Add a source by writing one more `from_…` function and, if it uses another currency, one more entry in `TO_EUR`. Next come the fetchers. They stop when `pagination.has_more` is false, which both recorded responses include. For longer loops with safe stopping rules, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ```python def fetch_autoscout24(pages=5): cars = [] for page in range(1, pages + 1): data = get("/v1/autoscout24/search", { "market": "de", "make_id": "13", "model_id": "1639", "sort": "price", "page": page, "limit": 20, }) cars += [from_autoscout24(l) for l in data["listings"]] if not data["pagination"]["has_more"]: break return cars def fetch_autotrader(pages=5): cars = [] for page in range(1, pages + 1): data = get("/v1/autotrader-uk/search", { "postcode": "SW1A1AA", "price_search_type": "total", "make": "BMW", "sort": "relevance", "page": page, }) cars += [from_autotrader(l) for l in data["listings"]] if not data["pagination"]["has_more"]: break return cars ``` ## Step 2: How do you normalise make and model names? Compare names after stripping case, spaces and punctuation, then map known spelling differences to one form. This is the hand-maintained part of any matcher, because marketplaces disagree on names. The recorded AutoScout24 listing has `model_group` set to `3er`, while AutoTrader's recorded model for a 5-series car is `5 Series`. ```python MAKE_ALIASES = {"vw": "volkswagen", "mercedes": "mercedesbenz"} def make_key(text): t = re.sub(r"[^a-z0-9]", "", text.lower()) return MAKE_ALIASES.get(t, t) def model_key(text): t = re.sub(r"[^a-z0-9]", "", text.lower()) return re.sub(r"^(\d)(er|series)$", r"\1series", t) ``` Here `model_key("3er")` and `model_key("3 Series")` both return `3series`, and `model_key("X5")` returns `x5`. Those three outputs are from running this code. Only `3er` and `5 Series` come from recorded responses; `3 Series` is my test input, written in the same style as the recorded `5 Series`, and I haven't recorded AutoTrader returning it. Check the spelling against your own data. Keep the alias tables short and grow them from review output. The [AutoScout24 taxonomy endpoint](https://perceptlayer.com/apis/autoscout24/taxonomy) takes `include[]` values `makes` and `models`, and the [AutoTrader UK taxonomy endpoint](https://perceptlayer.com/apis/autotrader-uk/taxonomy) takes `postcode` and an optional `make`. Compare what each returns for your make to find the spellings that disagree. ## Step 3: How do you cut down the pairs to compare? Group listings into blocks that share the normalised make and model, and only compare pairs inside a block. A block is the cheap filter that makes fuzzy scoring affordable. Without it, N listings produce N(N-1)/2 comparisons, and most of them pit a Golf against an X5. ```python def compare(cars): blocks = defaultdict(list) for c in cars: blocks[(make_key(c.make), model_key(c.model))].append(c) for group in blocks.values(): for a, b in combinations(group, 2): s, parts = score(a, b) yield a, b, round(s, 3), parts, label(s, parts) ``` Blocking on make and model assumes both sources spell them well enough to land in the same block. A pair whose model names normalise differently is never compared, and that's a missed match you won't see. Review the biggest singleton blocks now and then to catch spellings your alias tables don't cover yet. ## Step 4: How do you score a candidate pair? Score each field from 0 to 1, weight the scores, and average over the fields both records have. Year, price and mileage each get a closeness score, and mileage counts most because two different cars rarely share an odometer reading. Tolerances absorb the noise: asking prices drift, and exchange rates move. ```python PRICE_TOL = 0.10 KM_TOL, KM_FLOOR = 0.03, 1000 WEIGHTS = {"year": 1, "price": 2, "mileage": 3} MATCH, REVIEW = 0.85, 0.80 def closeness(a, b, rel, floor=0): width = max(max(a, b) * rel, floor) return max(0.0, 1 - abs(a - b) / width) if width else 1.0 def score(a, b): """Score two cars from the same block: 0 (different) to 1 (same).""" if abs(a.year - b.year) > 1: return 0.0, {} parts = { "year": 1.0 if a.year == b.year else 0.5, "price": closeness(a.eur, b.eur, PRICE_TOL), } if a.km is not None and b.km is not None: parts["mileage"] = closeness(a.km, b.km, KM_TOL, KM_FLOOR) total = sum(WEIGHTS[k] * v for k, v in parts.items()) return total / sum(WEIGHTS[k] for k in parts), parts def label(s, parts): if "mileage" not in parts: return "review" if s >= REVIEW else "different" if s >= MATCH: return "match" return "review" if s >= REVIEW else "different" ``` A few choices deserve a sentence each: - **Year allows a gap of one.** Sources may define the year differently (registration versus manufacture), so a one-year gap scores 0.5 rather than failing outright. Two years apart is rejected. - **Price tolerance is 10% of the larger price, after conversion.** It covers the exchange rate and asking-price drift. Tighten it if you match within one currency. - **Mileage tolerance is 3%, with a floor of 1,000 km.** The floor stops a small odometer difference from zeroing the score on a low-mileage car. - **No mileage means no automatic match.** Without the heaviest signal, year and price alone can clear the bar for two different cars, so `label` caps those pairs at `review`. These numbers are starting points I chose, not measured optima. Tune them on pairs you've labelled yourself. ## Step 5: How do you group matches into clusters? Union the pairs labelled `match`, and treat each connected set as one physical car. A union-find structure does this in near-linear time ( [disjoint-set data structure](https://en.wikipedia.org/wiki/Disjoint-set_data_structure)). It also merges chains, so A matching B and B matching C puts all three together even if A and C would not match directly. ```python def clusters(cars, pairs): parent = {c.uid: c.uid for c in cars} def find(x): while parent[x] != x: parent[x] = parent[parent[x]] x = parent[x] return x for a, b, _, _, lab in pairs: if lab == "match": parent[find(a.uid)] = find(b.uid) groups = defaultdict(list) for c in cars: groups[find(c.uid)].append(c.uid) return list(groups.values()) if __name__ == "__main__": cars = fetch_autoscout24() + fetch_autotrader() pairs = list(compare(cars)) for a, b, s, parts, lab in pairs: if lab != "different": print(lab, s, a.uid, b.uid, parts) print(clusters(cars, pairs)) ``` Send `review` pairs to a person or a second check rather than into the clusters. They're the ones where an extra signal, such as comparing photos or calling the listing endpoint for more fields, earns its credit. ## What does the matcher do on real listings? On the two recorded AutoScout24 listings it correctly refuses to merge a near-miss. Both are BMW 3-series diesels at about €5,700 to €5,800, so a price-only matcher would fold them together. Their mileage separates them: 215,000 km against 177,000 km. I ran the code above on the recorded fields to see what it does. | Pair | Year score | Price score | Mileage score | Total | Label | | --- | --- | --- | --- | --- | --- | | Recorded 2013 (€5,700, 215,000 km) vs recorded 2012 (€5,800, 177,000 km) | 0.5 | 0.828 | 0.0 | 0.359 | `different` | The recorded AutoTrader listings ( `BMW 5 Series`, 2014, £2,200, and `BMW X5`, 2005, £2,700) land in different blocks from the AutoScout24 pair and from each other, so nothing is compared. That is the right outcome, but it doesn't show a true match, and the recordings contain none. To exercise the match path I built a synthetic test pair, which is my input and not API output: a `3er` from 2013 at €5,700 and 215,000 km, and a `3 Series` from 2013 at £4,900 and 215,000 km, with `GBP_TO_EUR=1.15` as a test value, not a quoted rate. The scorer returns 0.962 and labels it `match`. Take away the second car's mileage and the score is 0.923, labelled `review`. The clusters function then returns the first two as one group, with the mileage-less third car left alone. ## What are the false-match trade-offs? Every threshold trades two errors against each other. Raise `MATCH` and you leave true duplicates apart, which inflates counts and averages. Lower it and you merge two different cars, which deletes a real listing from your data. Which error costs more depends on what you do with the output. | Use | Cheaper error | Lean towards | | --- | --- | --- | | Counting distinct cars on the market | Missed duplicates | A high `MATCH`, more `review` | | Average asking price per model | Either, in moderation | The default thresholds | | Alerting on a specific car | Missed duplicates (an extra alert) | A high `MATCH` | | Showing one row per car to users | Merged different cars | A high `MATCH` and manual review | Some errors are structural, whatever you tune: - **Identical twins.** A dealer with three same-year, same-spec cars at similar prices and mileage will look like one car. Group by seller or location as an extra guard if your data has them. - **Chained merges.** Union-find propagates one bad link into a whole cluster. Cap cluster size and inspect anything larger than the number of sources. - **Price changes between fetches.** A dealer who cuts the price after your first call pushes a true pair apart. The wider the time gap between fetches, the more you rely on mileage. - **Missing fields.** Any source without mileage leaves you with year and price, which is why those pairs stop at `review`. Measure instead of guessing. Label a few hundred pairs by hand, including the `review` band, then count how many confirmed matches fall below `MATCH` and how many rejected pairs sit above it. The data quality checks in [web data quality checks](https://perceptlayer.com/blog/web-data-quality-monitoring-checklist) show where to put that measurement in a pipeline. ## What does a run cost? A run costs 1 credit per search call, one call per page. Five pages from each source is 10 credits. Running that daily for 30 days is 30 × 10 = 300 credits. The 100 free credits every account gets once, after verifying an email address, cover the first 10 runs; after that, the Starter pack's 10,000 credits cover a year of daily runs (12 × 300 = 3,600). See [credits](https://docs.perceptlayer.com/credits) for how billing works and [pricing](https://perceptlayer.com/pricing) for what credits cost. Failed calls cost nothing and return `X-Credits-Used: 0`. If you'd rather not refetch pages you've already seen, [caching API responses](https://perceptlayer.com/blog/cache-web-data-api-responses) cuts credits further. Rate limits are per account and counted per minute; if you fetch both sources at once, see [concurrent requests under rate limits](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit). Run the fetchers with your own filters next. Get a free API key at [sign-up](https://perceptlayer.com/signup), try a search in the playground on the [AutoScout24 API page](https://perceptlayer.com/apis/autoscout24) or the [AutoTrader UK API page](https://perceptlayer.com/apis/autotrader-uk), then paste the output into `compare`. For the fields these sources expose, read [used car listing data for price analysis](https://perceptlayer.com/blog/used-car-listing-data-price-analysis), and for loading the result, [loading API JSON into Postgres](https://perceptlayer.com/blog/load-web-data-json-into-postgres). ## APIs in this post - [AutoScout24 **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/autoscout24) - [AutoTrader UK **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/autotrader-uk) ## Frequently asked questions ### Can I deduplicate listings without a shared ID? Yes. Normalise make, model and year, group listings that share them, then score price and mileage within each group. Accept pairs above a threshold and send borderline pairs to review. Mileage carries the most weight in this tutorial's matcher, so a source without it can only produce `review` pairs, never automatic matches. ### How much does it cost to fetch both sources? A successful search call costs 1 credit on both the AutoScout24 and AutoTrader UK endpoints. Five pages from each is 5 × 2 × 1 = 10 credits per run. Failed calls cost nothing. Every account gets 100 free credits after verifying an email address, and [pricing](https://perceptlayer.com/pricing) lists what credits cost. ### Why not match on titles with fuzzy string similarity? Titles mix trim, engine and marketing text that differ by site: one recorded title is `BMW 316 Touring 316d`, another is `BMW 5 Series`. String distance scores those as unrelated or as similar for the wrong reasons. Structured fields give a more reliable signal. Titles are useful as a tie-breaker inside a block, not as the key. ### Does this work for sources other than cars? The method does. Normalise the identifying fields, block on a cheap key, and score the numeric fields with tolerances. For property listings you might block on postcode and bedrooms and score price and floor area. You choose the fields and weights from your own data; the car-specific parts here are the make and model normalisers. ### How do I handle currency differences? Convert to a single currency with a rate you supply, then compare within a tolerance wide enough to cover rate movement and asking-price drift. The matcher keeps the original price and currency on each `Car` and converts at comparison time, so you can re-run with a new rate without refetching. deduplication record linkage used cars python data quality ## More from the blog 1. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 30 Aug 2026 Updated 21 Oct 2026 Perceptlayer 7 min read ## [Web Data Quality Checks for Scraped and API Data](https://perceptlayer.com/blog/web-data-quality-monitoring-checklist) Seven web data quality checks in Python, with code written against a recorded Zillow search response: schema drift, null rates, duplicate zpids and outliers. 2. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 26 Oct 2026 Perceptlayer 7 min read ## [API Pagination: Cursors, Pages and Offsets in Practice](https://perceptlayer.com/blog/api-pagination-patterns) Offset, page-number and cursor pagination with recorded responses from Indeed, Craigslist and Google Play, a loop that stops correctly, and 1 credit per page. 3. [Data engineering](https://perceptlayer.com/blog/category/data-engineering) 25 Oct 2026 Perceptlayer 7 min read ## [API Rate Limiting: How Limits Work and How to Stay Under](https://perceptlayer.com/blog/api-rate-limiting-explained) API rate limiting from the client side: per-minute limits, the RateLimit and Retry-After headers, and a Python pacer that runs 3,000 searches in 50 minutes. --- title: "eBay API: Search Results, Items and Autocomplete as JSON" description: "Use the eBay API to get search results, items and autocomplete as JSON with one key. Real parameters, a recorded response and the cost: 1 credit per call." url: https://perceptlayer.com/blog/ebay-item-search-data-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # eBay API: Search Results, Items and Autocomplete as JSON 22 Jul 2026 Updated 10 Nov 2026 Perceptlayer 8 min read The eBay API here returns eBay search results as JSON with one GET request to `/v1/ebay/search`, authenticated with an `X-API-Key` header. Your key is the only credential you need. The same API has an item endpoint and an autocomplete endpoint. Each successful call costs 1 credit, and failed calls cost nothing. ## Key takeaways - `GET /v1/ebay/search` takes a required `q` and returns `results`, each with `product_id`, `title`, `link`, `price`, `sponsored` and `location`, plus `total_results` and `has_more` for paging. - `GET /v1/ebay/item` takes a single required `item_id`, and `GET /v1/ebay/autocomplete` takes a single required `q`. - All seven eBay endpoints cost 1 credit per successful call; a failed call returns `X-Credits-Used: 0`. - The free tier is 100 credits, once, after you verify an email address, so your first 100 searches cost nothing and need no credit card. - `per_page` accepts 60, 120 or 240, and each page you request is one call and 1 credit. ## How do you get eBay search results as JSON? Send a GET request to `https://api.perceptlayer.com/v1/ebay/search` with a query in `q` and your key in the `X-API-Key` header. The response is JSON with a `results` array, one object per listing, so there's no HTML to parse. Here is the request we recorded a response for: ```bash curl "https://api.perceptlayer.com/v1/ebay/search?q=coffee+maker&page=1&per_page=60" \ -H "X-API-Key: $API_KEY" ``` To get a key, [sign up for a free API key](https://perceptlayer.com/signup). Keys start with `sk_live_`, and [the authentication docs](https://docs.perceptlayer.com/authentication) cover the header and the `api_key` query parameter for places where you can't set headers. If you'd rather try it before writing code, the [eBay API page](https://perceptlayer.com/apis/ebay) has a playground. Pick an endpoint, fill in the parameters and run a real call with your key. ## Which parameters does the search endpoint take? The search endpoint has one required parameter, `q`, and twelve optional ones for category, paging, sorting and filtering. Only `q`, `per_page`, `sort` and `location_postal` carry documented limits or allowed values. Boolean filters like `free_shipping` take true or false. The full list is on the [eBay Search endpoint page](https://perceptlayer.com/apis/ebay/search). | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `q` | string | yes | Up to 255 characters | | `category` | integer | no | A category ID | | `page` | integer | no | Page number | | `per_page` | integer | no | One of 60, 120, 240 | | `sort` | integer | no | One of 1, 7, 10, 12, 15, 16 | | `buy_it_now` | boolean | no | Filter for Buy It Now listings | | `auction` | boolean | no | Filter for auction listings | | `condition[]` | list of integer | no | One or more condition IDs | | `price_min` | number | no | Lower price bound | | `price_max` | number | no | Upper price bound | | `free_shipping` | boolean | no | Filter for free shipping | | `preferred_location` | integer | no | Location ID | | `location_postal` | string | no | Up to 20 characters | The values for `sort`, `category`, `condition[]` and `preferred_location` are numeric IDs. The catalogue doesn't document what each ID means, so don't guess. Run the playground with a value, look at the order or the listings that come back, and note what you find. ### A filtered search Filters combine in one request. This one asks for 120 results per page, priced between 20 and 80, with free shipping: ```bash curl -G "https://api.perceptlayer.com/v1/ebay/search" \ --data-urlencode "q=coffee maker" \ --data-urlencode "per_page=120" \ --data-urlencode "price_min=20" \ --data-urlencode "price_max=80" \ --data-urlencode "free_shipping=true" \ -H "X-API-Key: $API_KEY" ``` ## What does a search response look like? A search response wraps everything in `success` and `data`. Inside `data` you get the echoed `query`, `page` and `per_page`, a `has_more` flag, the `results` array, `total_results`, `related_searches` and `categories`. This is an excerpt of the real response to the coffee maker request above, trimmed with `…`: ```json { "success": true, "data": { "query": "coffee maker", "page": 1, "per_page": 60, "has_more": true, "results": [ { "product_id": "366702966104", "title": "Mr. Coffee 4-in-1 Single-Serve Latte, Iced, and Hot Coffee", "link": "https://www.ebay.com/itm/366702966104", "price": { "raw": "$60.00", "extracted": 60, "currency": "USD" }, "sponsored": true, "subtitle": "Brand New", "thumbnail": "https://i.ebayimg.com/images/g/fhEAAeSwuP5qvcJe/s-l500.webp", "location": "United States" }, { "product_id": "167322718667", "title": "New Keurig Green Mountain K4000 Cafe System Commercial K-Cup Coffee Maker", "link": "https://www.ebay.com/itm/167322718667", "price": { "raw": "$428.98", "extracted": 428.98, "currency": "USD" }, "sponsored": true, "subtitle": "Brand New", "thumbnail": "https://i.ebayimg.com/images/g/UVIAAOSwdnFnmqXS/s-l500.webp", "location": "United States" }, … ], "total_results": 110000, "related_searches": [ { "query": "keurig coffee maker", "link": "https://www.ebay.com/sch/i.html?_nkw=keurig+coffee+maker&_sop=12" }, … ], "categories": [ { "id": 11700, "name": "Home & Garden" }, … ] } } ``` ### Fields worth knowing Prices come as an object: `raw` is the display string, `extracted` is a number you can sort on, and `currency` is the code. That saves you from stripping a dollar sign. In the excerpt, the first result's `extracted` is `60` and the second's is `428.98`, so it's a plain number whether or not there are cents. The `sponsored` flag lets you drop or separate promoted listings. | Field | What it holds | | --- | --- | | `product_id` | The listing's ID | | `title`, `subtitle` | Listing title and the condition line, such as "Brand New" | | `link`, `thumbnail` | Listing URL and image URL | | `price.extracted` | Numeric price | | `sponsored` | Whether the listing is promoted | | `location` | A location string, such as "United States" | ## How do you page through results? Paging uses `page` and `per_page`, and `has_more` in the response tells you when to stop. Request page 1, process `results`, then increment `page` while `has_more` is true. Each page is one call at 1 credit, whatever `per_page` you pick, so a crawl's cost is the number of pages you request, and you can cap it in your own loop. ```python import os import requests URL = "https://api.perceptlayer.com/v1/ebay/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} page, listings = 1, [] while page <= 3: r = requests.get( URL, headers=HEADERS, params={"q": "coffee maker", "page": page, "per_page": 120}, timeout=30, ) r.raise_for_status() data = r.json()["data"] listings.extend(data["results"]) if not data["has_more"]: break page += 1 print(len(listings), "listings") ``` The loop stops after three pages as a guard. Remove the cap once you know what a full crawl costs. Three pages is 3 credits, however many listings each page holds. ## How do you fetch a single item? Call `GET /v1/ebay/item` with `item_id`, its only parameter and a required string of up to 20 characters, to look up one listing. In the recorded search response, `product_id` is the same number as the listing's `/itm/` link, so the example below passes it as `item_id`; confirm in the playground that the IDs line up for your listings. The call costs 1 credit, and the response headers `X-Credits-Used` and `X-Credits-Remaining` show what it cost and what's left. You can try it in the playground first. The [eBay Item endpoint page](https://perceptlayer.com/apis/ebay/item) has the details. ```bash curl "https://api.perceptlayer.com/v1/ebay/item?item_id=366702966104" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded an item or autocomplete response for this article, so we won't show one. Run the calls in the playground to see what they return before you build against them. ## What does the autocomplete endpoint do? `GET /v1/ebay/autocomplete` is for query suggestions as a user types. Its only parameter is `q`, a required string of up to 255 characters, such as a partial search term. It costs 1 credit per successful call, so a suggestion lookup per keystroke adds up quickly; a failed call returns `X-Credits-Used: 0`. The playground on the eBay API page lets you see what comes back. The [eBay Autocomplete endpoint page](https://perceptlayer.com/apis/ebay/autocomplete) has the details. ```bash curl "https://api.perceptlayer.com/v1/ebay/autocomplete?q=coffee+mak" \ -H "X-API-Key: $API_KEY" ``` ## What does each call cost? Every eBay endpoint costs 1 credit per successful call. A failed call costs nothing and returns `X-Credits-Used: 0`. Successful responses carry `X-Credits-Used` and `X-Credits-Remaining`, so you can watch your balance without a separate request. [The credits docs](https://docs.perceptlayer.com/credits) explain the accounting. | Pack | Credits | eBay calls at 1 credit | | --- | --- | --- | | Free | 100, once | 100 | | Starter | 10,000 | 10,000 | | Build | 50,000 | 50,000 | | Growth | 200,000 | 200,000 | Here is a worked example. Say you track 500 keywords daily with one search call each, 20 days a month: 500 × 20 = 10,000 calls × 1 credit = 10,000 credits. That is exactly one Starter pack of 10,000 credits, so a month with a few retries or extra item lookups would need a larger pack. Purchased credits last 12 months, and there's no subscription. The service is prepaid, so when the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. See [pricing](https://perceptlayer.com/pricing) for the current packs. ## When should you look at eBay's own API? Perceptlayer's eBay endpoints are read-only: search, item and autocomplete. Use eBay's own API when you need to write to eBay or build on eBay's own program terms. That means creating or managing listings, or relying on eBay's own search features. Two cases are concrete. First, selling. eBay's [Sell APIs](https://developer.ebay.com/develop/guides/sell/get-started-with-ebay-apis) are for building selling applications: configuring account settings, listing inventory, marketing listings and reporting on seller performance. Nothing in a read-only search endpoint does that, so if your product publishes or edits listings, go to eBay. Second, buying features built on eBay's own platform. eBay's [Browse API](https://developer.ebay.com/api-docs/buy/static/api-browse.html) lets you search by keyword, category, image, product ID (EPID) or GTIN, and retrieve item details such as return policy terms and product review data. Our search endpoint takes keyword, category and filter parameters only, so image search or GTIN lookups are a reason to use eBay's. So is any need for an agreement directly with eBay. This API fits when you want listings as JSON today, with one key and one header, and you want the same key to cover other sites. Data is collected from publicly available sources and returned as found at the time of the call, so check the output against your own needs before you depend on it. ## Can an AI agent call these endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing; `call_endpoint` spends the endpoint's credits on success only. An agent can find the eBay search endpoint, read its parameters and call it. The [MCP docs](https://docs.perceptlayer.com/ai-agents) show the setup. For wiring an agent end to end, see [Claude MCP Web Search: Live Results for an Agent](https://perceptlayer.com/blog/claude-agent-live-search-mcp). To keep spend predictable once an agent is looping over searches, read [AI Agent API Cost Control: Cap Web Data Spend](https://perceptlayer.com/blog/ai-agent-web-data-costs). ## What should you build first? Start with one search in the playground, then copy the cURL call and swap in your own `q`. Once the fields look right, add `price_min`, `price_max` and `free_shipping`, and loop over `page` while `has_more` is true. Add the item endpoint for listings you want to look at individually. Other marketplace and listing guides follow the same pattern: [Zillow Listings API: Get Property Data as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) and [Airbnb Listings Data API: Search, Details and Reviews](https://perceptlayer.com/blog/airbnb-listings-data-api). The [Marketplaces APIs](https://perceptlayer.com/verticals/marketplaces) page lists the rest of the area, and the [API guides](https://perceptlayer.com/blog/category/api-guides) category collects the step-by-step posts. [Get a free API key](https://perceptlayer.com/signup) and run your first eBay search. ## APIs in this post - [eBay **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/ebay) ## Frequently asked questions ### How much does an eBay search API call cost? Each successful call to `/v1/ebay/search`, `/v1/ebay/item` or `/v1/ebay/autocomplete` costs 1 credit. The free tier gives 100 credits once, after you verify an email. Paid packs start at 10,000 credits, which is 10,000 eBay calls; see [pricing](https://perceptlayer.com/pricing) for what credits cost. Failed calls cost nothing. ### What happens when a request fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. Codes include `invalid_api_key` (401), `insufficient_credits` (402), `invalid_parameters` (422), `rate_limited` (429) and `source_error` (502). Failed calls return `X-Credits-Used: 0`. See [the errors docs](https://docs.perceptlayer.com/errors) for the full list. ### Can I search by category, price and condition? Yes. `/v1/ebay/search` accepts `category` as an integer, `price_min` and `price_max` as numbers, and `condition[]` as a list of integers. It also takes `buy_it_now`, `auction` and `free_shipping` as booleans. The catalogue doesn't document what each category or condition ID means, so test values in the playground first. ### How many results does one call return? Set `per_page` to 60, 120 or 240 and use `page` to move through the results. The response includes `total_results` and a `has_more` flag. Each page is one call at 1 credit. The recorded example returned `total_results: 110000` for "coffee maker". ### Are there rate limits? Yes. Limits are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second; paying accounts get at least 5 a second. A request over the limit returns `rate_limited` (429) and, like any failed call, isn't charged. Both 429 and 503 responses carry a `Retry-After` header with the seconds to wait. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) describe how they work, and the [requests docs](https://docs.perceptlayer.com/requests) cover the call format. Space out a large crawl and retry after a 429 instead of resending in a tight loop. ### Is this the official eBay API, or an eBay scraper? Neither. eBay runs its own developer program, and its APIs need a registered application and OAuth access tokens. A scraper is code you write and maintain against eBay's pages. This eBay API returns public search results, items and autocomplete as named JSON fields with one key, at 1 credit per successful call. Use eBay's own APIs when you sell on eBay or need account data. ebay marketplaces search api listings json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 27 Oct 2026 Updated 10 Nov 2026 Perceptlayer 9 min read ## [eBay Scraper or API: Prices Without the Parsing](https://perceptlayer.com/blog/ebay-scraper-vs-api) Compare an eBay scraper with eBay search at 1 credit a call: a recorded coffee maker search with price.extracted, sponsored flags and 110,000 results. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 27 Oct 2026 Perceptlayer 8 min read ## [News API Options: Google News and Search as JSON](https://perceptlayer.com/blog/news-api-comparison) Compare three news API routes: Google News returns headline, source.name, iso\_date and link per article; web search endpoints don't. 1 credit a query. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 21 Aug 2026 Updated 6 Nov 2026 Perceptlayer 6 min read ## [DuckDuckGo Search API: Web Results as JSON](https://perceptlayer.com/blog/duckduckgo-search-api-json) DuckDuckGo's Instant Answer API returns topic summaries, not ranked links. GET /v1/duckduckgo/search returns organic results and paging at 1 credit per query. --- title: "Immobilienscout24 API: German Property Listings as JSON" description: "Search ImmobilienScout24 rentals and sales by city with one GET call. Parameters, a recorded Berlin response, and the cost: 1 credit per call." url: https://perceptlayer.com/blog/immobilienscout24-api-listings --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Immobilienscout24 API: German Property Listings as JSON 20 Jul 2026 Updated 10 Nov 2026 Perceptlayer 6 min read To get ImmobilienScout24 listings as JSON, call `GET /v1/immobilienscout24/search` with a `location` and an optional `type` such as `apartment-rent`. It returns listings with price, rooms, size in square metres, address, coordinates and a link to the original exposé. Each call costs 1 credit, and a failed call costs nothing. Three more endpoints, Locations, Property and Price Insights, are listed below with their parameters and cost. Only `search` has a recorded response in this article. ## Key takeaways - Four endpoints: `locations` (by `query`), `search` (by `location`), `property` (by `id`) and `price-insights` (by `location`, market context). Each costs 1 credit. Only `search` has a recorded response here. - `search` takes `type` with four values ( `apartment-rent`, `apartment-buy`, `house-rent`, `house-buy`) plus price, room and size ranges, and `page` and `per_page` for paging. - The recorded Berlin rental search reported `total_results` of 11396 across `total_pages` of 570, so walking every page costs 570 credits. - The `published` field is German relative text such as "vor 16 Tagen", not a date, so parse it before you sort or deduplicate. - Free accounts get 100 credits on signup with no card, enough for 100 calls. ## Which ImmobilienScout24 endpoints are there? The [ImmobilienScout24 API](https://perceptlayer.com/apis/immobilienscout24) has four endpoints, all `GET`, all 1 credit per successful call. The endpoints are [Locations](https://perceptlayer.com/apis/immobilienscout24/locations), [Search](https://perceptlayer.com/apis/immobilienscout24/search), [Property](https://perceptlayer.com/apis/immobilienscout24/property) and [Price Insights](https://perceptlayer.com/apis/immobilienscout24/price-insights). This article has a recorded response for Search only, so it covers that endpoint in depth and the other three briefly. The API sits in the [real estate area](https://perceptlayer.com/verticals/real-estate) of the catalogue, which has 480 websites and 2,782 endpoints in total. | Endpoint | Returns | Required | Optional | Credits | | --- | --- | --- | --- | --- | | `/v1/immobilienscout24/locations` | Locations | `query` | `limit` | 1 | | `/v1/immobilienscout24/search` | Search | `location` | `type`, `price_min`, `price_max`, `rooms_min`, `rooms_max`, `size_min`, `size_max`, `page`, `per_page` | 1 | | `/v1/immobilienscout24/property` | Property | `id` | none | 1 | | `/v1/immobilienscout24/price-insights` | Price Insights | `location` | none | 1 | ## How do you search listings in a city? Pass the city as `location` and pick a listing `type`. The request below asks for apartments to rent in Berlin. Authenticate with the `X-API-Key` header; keys start with `sk_live_`, and [authentication](https://docs.perceptlayer.com/authentication) covers the details. You can get a key at [signup](https://perceptlayer.com/signup) and try the same call in the playground on the API page. ```bash curl "https://api.perceptlayer.com/v1/immobilienscout24/search?location=Berlin&type=apartment-rent" \ -H "X-API-Key: $API_KEY" ``` Here is an excerpt of the recorded response for exactly that request, trimmed with `…`: ```json { "success": true, "total_results": 11396, "page": 1, "total_pages": 570, "results": [ { "id": "168052908", "title": "Naturverbunden wohnen in kompakter 2-Zimmer-Gartenwohnung mit WBS-140-Förderung", "price": 362, "is_tenant_network": false, "price_formatted": "362 €", "rooms": 2, "size_m2": 52, "address": "Hellersdorfer Straße 91, 12619 Berlin, Kaulsdorf (Hellersdorf)", "lat": 52.52485, "lon": 13.58695, "url": "https://www.immobilienscout24.de/expose/168052908", "is_private": false, "published": "vor 16 Tagen" }, … ] } ``` ### Which search parameters can you set? All filters other than `location` are optional. Combine them to narrow the result set before you pay for pages you don't need. | Parameter | Type | Notes | | --- | --- | --- | | `location` | string, required | Up to 255 characters | | `type` | string | One of `apartment-rent`, `apartment-buy`, `house-rent`, `house-buy` | | `price_min`, `price_max` | integer | Price range | | `rooms_min`, `rooms_max` | number | Room range; a number, so half rooms are possible | | `size_min`, `size_max` | integer | Size range | | `page`, `per_page` | integer | Paging | A filtered example: rentals in Berlin with at least two rooms and 50 square metres. ```bash curl "https://api.perceptlayer.com/v1/immobilienscout24/search?location=Berlin&type=apartment-rent&rooms_min=2&size_min=50" \ -H "X-API-Key: $API_KEY" ``` ## What do the response fields mean? Each item in `results` is one listing, and the response wraps them with `total_results`, `page` and `total_pages`. Read `total_pages` to know when to stop paging. The listing fields are plain: `id` is a string, `price` a number with `price_formatted` as display text, `rooms` and `size_m2` numbers, and `url` links to the original exposé on the portal. Three details from the recorded sample matter if you store this data: - **`published` is relative German text.** The sample has "vor 16 Tagen" (16 days ago) and "vor einem Monat" (a month ago). Convert it against the time of your call and keep both the raw string and your computed date. Month-level text gives you a rough date only. - **Coordinates can be shared.** The two sample listings have different house numbers but identical `lat` and `lon`. Treat them as approximate and use `address` when you need a precise match. - **`price` is a number.** In the sample it is 362 for one listing and 760 for another, both 52 square metres. Prices in raw listings vary widely, so check for outliers before you average. For the rest of the fields, run the call in the playground. The recorded excerpt above is all this article quotes. ## What about Locations, Property and Price Insights? These three endpoints have no recorded response in this article, so it shows their requests and cost only. Each is `GET`, 1 credit per successful call. `locations` takes a `query` (up to 255 characters) and an optional `limit`. `property` takes an `id`. `price-insights` takes a `location` (up to 255 characters) and returns market context. For response fields, see the API pages: [Locations](https://perceptlayer.com/apis/immobilienscout24/locations), [Property](https://perceptlayer.com/apis/immobilienscout24/property) and [Price Insights](https://perceptlayer.com/apis/immobilienscout24/price-insights). Check the shape there before you build a parser. ```bash curl "https://api.perceptlayer.com/v1/immobilienscout24/locations?query=Kaulsdorf&limit=5" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/immobilienscout24/property?id=168052908" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/immobilienscout24/price-insights?location=Berlin" \ -H "X-API-Key: $API_KEY" ``` ## How do you page through every result? Loop on `page` until it reaches `total_pages`. The recorded Berlin rental search reported 570 pages, so a full walk is 570 calls × 1 credit = 570 credits. Narrow with `price_max`, `rooms_min` or `size_min` first and the loop shrinks. The same pattern is covered in [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ```python import os import requests BASE = "https://api.perceptlayer.com/v1/immobilienscout24/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def search_all(location, listing_type, max_pages=5, **filters): page = 1 while page <= max_pages: params = {"location": location, "type": listing_type, "page": page, **filters} resp = requests.get(BASE, headers=HEADERS, params=params, timeout=30) resp.raise_for_status() body = resp.json() yield from body["results"] if page >= body["total_pages"]: break page += 1 for item in search_all("Berlin", "apartment-rent", max_pages=2, rooms_min=2): print(item["id"], item["price_formatted"], item["size_m2"], item["address"]) ``` The `max_pages` cap is a budget guard, not a limit of the API. Handle failures with the status and code in the JSON error body; [errors](https://docs.perceptlayer.com/errors) lists them, and [handling API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) shows retry logic. A `429` carries a `Retry-After` header with the seconds to wait. ## What does it cost? A successful call costs 1 credit on every ImmobilienScout24 endpoint, and failed calls cost nothing and return `X-Credits-Used: 0`. Free accounts get 100 credits after email verification, with no credit card. Every response carries `X-Credits-Used` and `X-Credits-Remaining`, so you can track spend per call. [Credits](https://docs.perceptlayer.com/credits) explains the rules. | Job | Calls | Credits | | --- | --- | --- | | 20 `locations` calls | 20 × 1 | 20 | | Walk the 570 pages of the Berlin rental search once | 570 × 1 | 570 | | Same walk, every day for 30 days | 17,100 × 1 | 17,100 | | Add 50 `property` lookups and 5 `price-insights` calls a day for 30 days | 1,650 × 1 | 1,650 | The daily Berlin walk plus the lookups comes to 18,750 credits a month, more than the Starter pack's 10,000 credits and within the Build pack's 50,000, unless you narrow the filters first. For what credits cost, see [pricing](https://perceptlayer.com/pricing). Purchased credits last 12 months, and there's no subscription. ## When is the official ImmobilienScout24 API a better fit? ImmobilienScout24 runs its own developer API, documented at the [ImmobilienScout24 API docs](https://api.immobilienscout24.de/api-docs/tutorials/customer-website/). It is built for partners, mainly brokers and property software that publish and manage their own listings. If you're a broker syncing your own exposés into your website or CRM, the official route fits better: it's the sanctioned channel for your own objects, and it needs a registration with the portal. Perceptlayer fits the other direction: reading public listings across a city or a market, for research, price monitoring, lead lists or an AI agent, with no partner agreement. Data is collected from publicly available sources and returned as found at the time of the call, so a listing can change or vanish after you pull it. Check the portal's own terms for how you may use listing content. ## What's the next step? Get a free key at [signup](https://perceptlayer.com/signup), run the Berlin search above, and look at `total_pages` before you decide how much to pull. If you're building an agent, the same endpoints are available as tools through the MCP server; [AI agents (MCP)](https://docs.perceptlayer.com/ai-agents) shows how. For other markets, the same pattern works in the [Rightmove API guide](https://perceptlayer.com/blog/rightmove-api-property-data) for UK listings, and [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) covers matching the same flat across portals. All guides are in the [API guides](https://perceptlayer.com/blog/category/api-guides) category. ## APIs in this post - [ImmobilienScout24 **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/immobilienscout24) ## Frequently asked questions ### Is there an official ImmobilienScout24 API? Yes, but it is aimed at partners such as brokers who manage their own listings, and it requires registering with the portal. Perceptlayer's ImmobilienScout24 endpoints are for reading public listings by location. They need only an API key, and a successful call costs 1 credit. ### How many credits does an ImmobilienScout24 search cost? One credit per successful call, on all four endpoints. A search for one page is 1 credit. The recorded Berlin rental search reported 570 pages, so reading all of them is 570 credits. Failed calls cost nothing. You get 100 free credits after verifying an email address. ### Which listing types can I search? The `type` parameter accepts `apartment-rent`, `apartment-buy`, `house-rent` and `house-buy`. It is optional. You can also filter by `price_min`, `price_max`, `rooms_min`, `rooms_max`, `size_min` and `size_max`, and page with `page` and `per_page`. ### Can the listing data go stale? Yes. Data is returned as found at the time of the call, and listings on the portal change or get removed. The `published` field is relative German text such as "vor 16 Tagen", so store the date of your own call next to it and re-run the search before acting on an old record. ### How fast can I call it? Limits are per account and counted per minute. Free accounts get 1 request a second, and paying accounts run at least 5 a second. A `429` response includes a `Retry-After` header with the seconds to wait. See [rate limits](https://docs.perceptlayer.com/rate-limits) for pack rates. real estate immobilienscout24 germany listings rentals ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 20 Oct 2026 Perceptlayer 6 min read ## [MLS API: How to Get MLS Listing Data](https://perceptlayer.com/blog/mls-api-listing-data) An MLS API means a RESO Web API feed licensed through an MLS or broker. Compare it with Zillow and Redfin listing endpoints at 1 credit a call. --- title: "LLM Tool Schema Design: A Checklist for Web APIs" description: "LLM tool schema design checklist, applied to the Google Maps simple-search endpoint: a before and after schema that cuts 28 result fields to 7." url: https://perceptlayer.com/blog/agent-tool-schema-design-web-apis --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # LLM Tool Schema Design: A Checklist for Web APIs 20 Jul 2026 Perceptlayer 7 min read A good LLM tool schema exposes only the parameters a model should choose, names them for what they do, constrains values with enums and limits, and returns a trimmed result. Copying a web API's parameter list one-to-one gives you a schema that works but wastes tokens and invites bad calls. This checklist applies eight rules to the Google Maps `simple-search` endpoint, with a before and after schema. ## Key takeaways - The raw `simple-search` endpoint takes 7 parameters; a model only needs to choose 3 or 4 of them. Fix the rest in code. - Each recorded result item has 28 top-level fields. Keeping 7 of them cuts the two recorded items from 3,114 to 531 characters, about 83% less. - Put the enum, the range and the example in the schema, not in a prompt. Schema constraints travel with the tool. - Return structured errors and a `has_more` flag so the model can correct itself instead of guessing. - Every call costs 1 credit and failed calls cost nothing, so a schema that prevents a bad call saves tokens, not credits. ## What does a model need from a tool schema? A model reads your tool's name, description and parameter schema as plain text and decides from that text alone whether to call it and with what arguments. Both [Anthropic's tool use docs](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview) and the [MCP specification's tools page](https://modelcontextprotocol.io/specification/2025-06-18/server/tools) (2025) define a tool by a name, a description and a [JSON Schema](https://json-schema.org/) for the input. Those are the fields that carry your intent to the model, so ambiguity there becomes a wrong call at runtime. The [Google Maps API](https://perceptlayer.com/apis/google-maps) is a good test case because its search endpoint has parameters of different kinds: one the model must fill, some it shouldn't touch, and a result with far more fields than a reasoning step needs. ## What does the one-to-one schema look like? The one-to-one schema mirrors the endpoint's parameter list exactly. For `GET /v1/google-maps/simple-search` that means `query` (required) plus `hl`, `gl`, `google_domain`, `limit`, `page` and `fields`, with no descriptions. It's valid, and it's what you get from generating a tool straight from an OpenAPI file. Here's that version as a tool definition: ```json { "name": "simple_search", "description": "Search Google Maps.", "input_schema": { "type": "object", "properties": { "query": { "type": "string" }, "hl": { "type": "string" }, "gl": { "type": "string" }, "google_domain": { "type": "string" }, "limit": { "type": "integer" }, "page": { "type": "integer" }, "fields": { "type": "string" } }, "required": ["query"] } } ``` A model has to guess what `hl` means, whether `google_domain` is worth setting, and what to put in `fields`. It will sometimes set all three to plausible but wrong values. ## The checklist Work through these in order. Each item is a decision you make once, in the tool wrapper, rather than a rule you repeat in every prompt. 1. **Name the tool for the task, not the endpoint.** `search_places` tells a model when to reach for it; `simple_search` doesn't. If you expose several Google Maps endpoints, name them as verbs on nouns: `search_places`, `get_business_details`, `get_reviews`. 2. **Write the description as a decision rule.** Say what the tool returns, when to use it and what to call next. Mention that it returns a `business_id` that other tools take as input. Add the cost in credits so a cost-aware agent can plan; the endpoint costs 1 credit per successful call. 3. **Rename parameters that only make sense to the API.** Expose `gl` as `country` and drop `hl` from the schema entirely. The reference types both only as strings, so what `country` should hold is your decision (see item 5). Your wrapper maps `country` back to `gl` when it builds the request. 4. **Remove parameters the model shouldn't choose.** `google_domain`, `hl` and `fields` are configuration, not decisions. Set them in code. Fewer parameters means fewer ways to produce an invalid call. 5. **Turn free strings into enums.** If your agent only serves three markets, `country` is an enum of those three values. The model can't invent a fourth. Test each value in the playground on the Google Maps page before you commit to it; the reference only types `gl` as a string and doesn't list allowed values. 6. **Bound numbers and say what they do.** Give `limit` a `minimum`, a `maximum`, a `default` and a description. Pick the numbers yourself: the endpoint reference documents `limit` only as an integer, so any cap or default is your policy, not the API's. Put the default in the schema and use the same value in the wrapper, so the model sees what happens when it omits `limit`. 7. **Add one example per free-text field.** `"ramen in Berlin"` in the `query` description steers the model toward place-plus-location phrasing better than a paragraph of instructions. 8. **Trim the output before the model sees it.** Return the fields the next step needs, plus a `has_more` flag, and nothing else. ## Which fields does the model actually need? A search result is only useful to an agent if it can pick a place and hand its ID to the next tool. The recorded `simple-search` response for `query=restaurants in new york` returns items with 28 top-level fields, including `name`, `rating`, `review_count`, `business_id`, `subtypes` and `full_address`. It also carries owner IDs and links, a `photos_sample` array of photo objects, an `attributes` object and several near-duplicate address fields. ```json { "name": "Altair Restaurant NYC", "review_count": 1225, "rating": 4.8, "website": "https://www.altairnyc.com/", "business_id": "0x89c2591598891521:0x4ebcde18610e64", "subtypes": ["New American restaurant", "Restaurant"], "full_address": "351 W 38th St, New York, NY 10018, United States", … } ``` Seven fields cover search, ranking and follow-up: `name`, `rating`, `review_count`, `business_id`, `full_address`, `subtypes` and `website`. The rest is real data, but it belongs to a different question. To put a number on it, we compared the first recorded item with a copy holding only those seven fields. Method: compact JSON (no whitespace) of each item, counting characters. The full item is 1,573 characters and the trimmed one 274, an 83% cut; across both recorded items it's 3,114 against 531. The recording already shortens two long URLs with `…`, so real full items are somewhat larger. Characters aren't tokens, so treat this as a size ratio, not a token bill. A ten-place result carries that overhead ten times. If a later step needs phone numbers, call [Business Details](https://perceptlayer.com/apis/google-maps/business-details) for that one place instead of carrying every result's `phone_numbers` through the whole conversation. ## What does the after schema look like? The after schema applies all eight items: a task-named tool, a decision-rule description, three model-facing parameters plus an optional page, an enum and a bounded integer with a default. The country values below are an example; choose the markets you serve. ```json { "name": "search_places", "description": "Find places on Google Maps from a text query. Returns up to `limit` places with name, rating, review_count, full_address, subtypes, website and business_id, plus has_more. Pass business_id to other Google Maps tools. Costs 1 credit per successful call.", "input_schema": { "type": "object", "properties": { "query": { "type": "string", "description": "What and where, for example 'ramen in Berlin'." }, "country": { "type": "string", "enum": ["US", "GB", "DE"], "description": "Market to search in." }, "limit": { "type": "integer", "minimum": 1, "maximum": 10, "default": 5, "description": "Number of places to return." }, "page": { "type": "integer", "description": "Only set this when the previous result had has_more true." } }, "required": ["query"] } } ``` The wrapper that runs when the model calls it does the other half of the work. Its `limit=5` matches the schema default. It maps `country` to `gl`, sends the request and projects each item down to the seven fields. ```python import os import requests KEEP = ["name", "rating", "review_count", "business_id", "full_address", "subtypes", "website"] def search_places(query, country=None, limit=5, page=None): params = {"query": query, "limit": limit} if country: params["gl"] = country if page is not None: params["page"] = page r = requests.get( "https://api.perceptlayer.com/v1/google-maps/simple-search", params=params, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) body = r.json() if not r.ok: # Hand the model the code and message so it can correct the call. return {"error": body["error"]["code"], "message": body["error"]["message"]} return { "places": [{k: p.get(k) for k in KEEP} for p in body["items"][:limit]], "has_more": body["pagination"]["has_more"], } ``` An `invalid_parameters` (422) error, for instance, reaches the model as a short code and message, not a stack trace. See [the error reference](https://docs.perceptlayer.com/errors) for the full list of codes. ## Does a tighter schema change what you pay? A tighter schema doesn't change the credit cost of a call. Every successful `simple-search` call costs 1 credit whatever you do with the response, and failed calls cost nothing ( [credits](https://docs.perceptlayer.com/credits)). What it changes is tokens and retries: fewer fields in the result means a smaller tool message in the model's context, and fewer free-form parameters means fewer malformed calls. Retries are where the schema affects spend most. An agent that makes 20 searches per task spends 20 credits at 1 credit each, and a loop that repeats a search because the model misread `page` adds credits without adding answers. Our post on [capping agent data spend](https://perceptlayer.com/blog/ai-agent-web-data-costs) covers hard limits, and [MCP rate limiting](https://perceptlayer.com/blog/mcp-server-rate-limiting-agents) covers request rates. If you'd rather skip writing wrappers for each endpoint, the [MCP server](https://docs.perceptlayer.com/ai-agents) exposes `search_endpoints`, `get_endpoint` and `call_endpoint`, so a model discovers parameters from the catalogue at run time. The trade-off is that your own curated schema, as above, constrains the model more tightly. [MCP vs function calling](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) compares the two approaches. Next step: copy the wrapper above, then run the same query in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps) to check each enum value before you ship it. You can [get a free API key](https://perceptlayer.com/signup) to do it. ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### How many parameters should a tool schema have? As few as the model needs to decide. For `simple-search`, the endpoint has 7 parameters, but a model only needs `query`, a market, a limit and a page. Hold the rest constant in code. Each parameter you expose is another value the model can set wrongly, and another line in every request's context. ### Should I generate tool schemas from the OpenAPI file? Use it as a starting draft, not the final schema. A generated schema mirrors the API, which is built for programs that read documentation, not models that read descriptions. Add task-focused names, descriptions with examples and enums, and drop configuration-only parameters. The generated file is still useful for checking types and required fields. ### Where should output trimming happen? In your wrapper, before the result goes back to the model. Trimming in code is guaranteed, whereas asking the API for a subset depends on the format of the `fields` parameter, which the reference documents only as a string. Test `fields` in the playground if you want to trim at the source as well. ### Does the model need to know the cost of a call? It helps when the agent plans multi-step work. Stating "costs 1 credit per successful call" in the description lets a cost-aware agent budget searches. Failed calls cost nothing and return `X-Credits-Used: 0`, so the model doesn't need to worry about retrying after an error. See [credits](https://docs.perceptlayer.com/credits) for how billing works. tool calling mcp json schema google maps ai agents ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Sept 2026 Perceptlayer 7 min read ## [MCP Server Too Many Tools: Keeping Agent Context Small](https://perceptlayer.com/blog/mcp-too-many-tools-context) One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small. --- title: "Trustpilot Reviews API: Any Company's Reviews as JSON" description: "Get any company's Trustpilot reviews as JSON with one GET to /v1/trustpilot/company-reviews. Parameters, a real Amazon response and 1 credit per call." url: https://perceptlayer.com/blog/trustpilot-reviews-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Trustpilot Reviews API: Any Company's Reviews as JSON 20 Jul 2026 Updated 23 Oct 2026 Perceptlayer 9 min read To get a company's Trustpilot reviews as JSON, call `GET /v1/trustpilot/company-reviews` with the company's domain in `company_domain`. The response opens with the business profile (trust score, review counts, categories), then lists reviews with a star rating, title, text, dates and language for each. Each successful call costs 1 credit and a failed call costs nothing. The endpoint is addressed by a company's domain, so one request shape works for any company you look up. ## Key takeaways - `GET /v1/trustpilot/company-reviews` takes one required parameter, `company_domain`, and is addressed by the company's domain rather than your own account. - Filter with `rating`, `verified`, `with_replies`, `query`, `date_posted`, `sort` and `languages`; page with `page` and `per_page`. - Use `/v1/trustpilot/company-search` to find a domain from a name, and `/v1/trustpilot/company-details` for the profile alone. - Every Trustpilot endpoint costs 1 credit on success. 100 calls cost 100 credits, which fits the free tier of 100 credits on signup. - The recorded Amazon response shows `numberOfReviews: 49830` and `trustScore: 1.5`, then `reviews` and `relevantReviews` arrays whose entries carry `rating`, `title`, `text`, `dates` and `language`. - Review entries also include a `consumer` object with a display name, so decide before you store or republish anything. ## Can you get any company's reviews from Trustpilot's official API? Trustpilot's developer site describes its Trustpilot for Business API as a way to send invitations, showcase reviews and reply to feedback ( [Trustpilot Developers](https://developers.trustpilot.com/), 2026). Access to Trustpilot's global database of business profiles and consumer reviews is listed there as a separate offering, Data Solutions. That page doesn't spell out account requirements for either, so check Trustpilot's terms for the access you'd need. If you're managing your own reviews, the Business API is described for that job. This guide covers a different shape: one GET addressed by a company's domain, which suits reading reviews for competitors, suppliers, merchants or a list of domains. ## How do you make your first call? You need an API key and one request. [Get a free API key](https://perceptlayer.com/signup), which gives you 100 free credits after you verify an email address, with no credit card. Keys start with `sk_live_` and go in the `X-API-Key` header, as described in [the authentication docs](https://docs.perceptlayer.com/authentication). Then search for the company to confirm its domain: ```bash curl "https://api.perceptlayer.com/v1/trustpilot/company-search?query=amazon" \ -H "X-API-Key: $API_KEY" ``` Pass the domain you find to the reviews endpoint: ```bash curl "https://api.perceptlayer.com/v1/trustpilot/company-reviews?company_domain=amazon.com&languages=all" \ -H "X-API-Key: $API_KEY" ``` You can also run either call in the playground on [the Trustpilot API page](https://perceptlayer.com/apis/trustpilot) before writing any code. The [quick start](https://docs.perceptlayer.com/quickstart) covers the same steps for other APIs. ## Which endpoints does the Trustpilot API have? The Trustpilot API has six endpoints, all `GET`, all 1 credit. Three of them do most of the work for a review workflow: search to resolve a name to a domain, details for the profile, and reviews for the review text itself. The other three list businesses by category, categories and countries. | Path | Returns | Required parameters | Credits | | --- | --- | --- | --- | | [`/v1/trustpilot/company-search`](https://perceptlayer.com/apis/trustpilot/company-search) | Company Search | `query` | 1 | | [`/v1/trustpilot/company-details`](https://perceptlayer.com/apis/trustpilot/company-details) | Company Details | `company_domain` | 1 | | [`/v1/trustpilot/company-reviews`](https://perceptlayer.com/apis/trustpilot/company-reviews) | Company Reviews | `company_domain` | 1 | | [`/v1/trustpilot/businesses`](https://perceptlayer.com/apis/trustpilot/businesses) | Businesses | `category` | 1 | | [`/v1/trustpilot/categories`](https://perceptlayer.com/apis/trustpilot/categories) | Categories | none | 1 | | [`/v1/trustpilot/countries`](https://perceptlayer.com/apis/trustpilot/countries) | Countries | none | 1 | The `businesses` endpoint lists companies in a category and takes optional `trustscore`, `claimed`, `country` and `sort` filters. `categories` and `countries` take no parameters and return the category and country lists. ## What parameters does the company reviews endpoint take? `company-reviews` has one required parameter, `company_domain` (up to 255 characters), and eleven optional ones that filter, sort and page the results. The catalogue documents the types and allowed values below and nothing more, so test a filter in the playground on the [Company Reviews page](https://perceptlayer.com/apis/trustpilot/company-reviews) before relying on it. | Parameter | Type | Notes | | --- | --- | --- | | `company_domain` | string, required | Up to 255 characters | | `page` | integer | Page number | | `per_page` | integer | Reviews per page | | `verified` | boolean | Optional | | `with_replies` | boolean | Optional | | `query` | string | Up to 200 characters | | `rating` | string | Optional | | `sort` | string | `relevance` or `recency` | | `locale` | string | One of 23 values, such as `en-US`, `de-DE`, `fr-FR`, `pt-BR`, `ja-JP` | | `languages` | string | Review languages; the recorded call below uses `all` | | `fields` | string | Up to 500 characters | | `date_posted` | string | `any`, `last_12_months`, `last_6_months`, `last_3_months` or `last_30_days` | A call that sets `verified`, `sort` and `date_posted` looks like this: ```bash curl "https://api.perceptlayer.com/v1/trustpilot/company-reviews?company_domain=amazon.com&verified=true&sort=recency&date_posted=last_30_days" \ -H "X-API-Key: $API_KEY" ``` ## What does the response look like? We recorded a call for Amazon with `languages=all`. The excerpt below is the start of that response, trimmed with `…`. It opens with `businessUnit`, the profile, and the figures are a snapshot, so the counts will differ when you run it. ```json { "pageUrl": "https://www.trustpilot.com/review/www.amazon.com?languages=all", "businessUnit": { "id": "46ad346800006400050092d0", "displayName": "Amazon", "identifyingName": "www.amazon.com", "numberOfReviews": 49830, "numberOfReviewsLast12Months": 9156, "trustScore": 1.5, "websiteUrl": "https://www.amazon.com", "stars": 1.5, "categories": [ { "id": "shoe_store", "name": "Shoe Store", "isPrimary": false }, … ], "isClaimed": true, "isClosed": false, "countryCode": "GB", "activity": { "claimedDate": "2015-02-18T19:08:43.000Z", "replyBehavior": { "averageDaysToReply": 0, "negativeReviewsWithRepliesCount": 0, "replyPercentage": 0, "totalNegativeReviewsCount": 7932 }, … } }, "reviews": [ { "text": "Disgusting company run by disgusting and greedy people …", "rating": 1, "labels": { "verification": { "isVerified": false, "verificationLevel": "not-verified" } }, "title": "Disgusting company run by disgusting…", "likes": 0, "source": "Organic", "dates": { "experiencedDate": "2026-10-22T00:00:00.000Z", "publishedDate": "2026-10-23T01:55:36.000Z" }, "language": "en", … }, … ], "relevantReviews": [ … ], … } ``` The review above is one entry from the recording, with fields trimmed and the `consumer` block left out. Field names stay as the source uses them, so the response is easy to map into a table. `numberOfReviews` and `numberOfReviewsLast12Months` give volume, `trustScore` and `stars` give the rating, and `activity.replyBehavior` holds reply figures for negative reviews: `averageDaysToReply: 0`, `negativeReviewsWithRepliesCount: 0`, `replyPercentage: 0` and `totalNegativeReviewsCount: 7932`. Treat them as a snapshot of what the API returned, not as a statement about how Amazon behaves. Each review carries a `rating`, a `title`, `text`, a `likes` count, a `source`, a `language` code, and a `dates` object with `experiencedDate` and `publishedDate`. `labels.verification.isVerified` flags verification. In the recording, review text and titles that run long end in `…`. ### Why are there `reviews` and `relevantReviews`? The recorded response has two separate arrays with the same entry shape. Both hold individual reviews with the fields above. In the recording, `reviews` holds two entries, both published on 2026-10-23, while `relevantReviews` holds entries published on 2026-10-22 and 2026-10-19, one of them with `likes: 2`. The recording doesn't show how either list is chosen, so read both and de-duplicate on each entry's `id` if you merge them. The `filters` block comes after the lists. `filters.pagination` shows `currentPage: 1`, `totalPages: 2340`, `totalResults: 46782` and `perPage: 20`, and `filters.reviewStatistics.ratings` gives star counts: `one: 33636`, `two: 3004`, `three: 1869`, `four: 2423` and `five: 8898`. Note that `ratings.total` is 49830 while `totalNumberOfReviews` is 46782 in the same recording, so pick one figure and say which you used. Trustpilot explains how it calculates TrustScore in its [Trust Centre](https://corporate.trustpilot.com/trust) (2026), so read that before you compare `trustScore` across companies with very different review counts. ## How do you read these fields in Python? Call `company-search`, pick the domain, then call `company-reviews` and read the profile and the review entries. We have no recorded `company-search` response, so its fields aren't shown here and the script doesn't parse them. It prints the start of the result so you can find the domain yourself, then sets `domain` by hand. The fields it reads afterwards are the ones in the Amazon recording. ```python import json import os import requests BASE = "https://api.perceptlayer.com/v1/trustpilot" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): r = requests.get(f"{BASE}/{path}", headers=HEADERS, params=params, timeout=30) r.raise_for_status() print("credits remaining:", r.headers.get("X-Credits-Remaining")) return r.json() search = get("company-search", query="amazon") print(json.dumps(search)[:500]) # inspect this to find the company's domain domain = "amazon.com" # set by hand from the search output data = get("company-reviews", company_domain=domain, languages="all") unit = data["businessUnit"] reply = unit["activity"]["replyBehavior"] print(unit["trustScore"], unit["numberOfReviews"]) print(reply["totalNegativeReviewsCount"], reply["replyPercentage"]) for review in data["reviews"]: print( review["rating"], review["dates"]["publishedDate"], review["text"][:80], ) ``` Against the recorded call, the two profile lines read `1.5 49830` and `7932 0`, and the loop prints one line per entry in `reviews`, such as `1 2026-10-23T01:55:36.000Z Disgusting company run by disgusting and greedy people`. Two calls cost 2 credits. Loop over `data["relevantReviews"]` the same way if you want that list too. Skip `review["consumer"]` unless you have a reason to read it. ## How do you get just the company profile? Call `company-details` when you only need the profile, such as a trust score for a list of suppliers. It takes `company_domain` (required) and an optional `locale`, and costs 1 credit. ```bash curl "https://api.perceptlayer.com/v1/trustpilot/company-details?company_domain=amazon.com" \ -H "X-API-Key: $API_KEY" ``` It costs the same 1 credit as a `company-reviews` call. We have no recorded response for this endpoint, so the [Company Details page](https://perceptlayer.com/apis/trustpilot/company-details) is the place to see its fields. ## How do you page through every review? `page` and `per_page` are the paging parameters, both integers. The recording's `filters.pagination` block reports `currentPage`, `totalPages` and `perPage`, which is the place to check how far you have left to go. Each page is a separate call at 1 credit, so a limit on pages is also a limit on spend. Two habits are a general paging pattern. Stop when a page comes back with no reviews rather than at a fixed count, and log the `X-Credits-Remaining` header the API returns on every success. The [pagination guide](https://perceptlayer.com/blog/paginate-web-data-api-python) has a safe loop in Python. ## What does it cost? Every Trustpilot endpoint costs 1 credit per successful call, and failed calls cost nothing and return `X-Credits-Used: 0`. The free tier gives 100 credits on signup. Purchased credits last 12 months, with no subscription and no seats; the [credits docs](https://docs.perceptlayer.com/credits) and [pricing page](https://perceptlayer.com/pricing) have the detail. | Pack | Credits | Requests a second included | | --- | --- | --- | | Free | 100, once, on signup | 1 | | Starter | 10,000 | 5 | | Build | 50,000 | 5 | | Growth | 200,000 | 5 | | Pro | 500,000 | 5 | | Scale | 1,000,000 | 10 | | Volume | 5,000,000 | 20 | A worked example: checking the trust score of 500 suppliers with `company-details` is 500 calls × 1 credit = 500 credits: the free tier's 100 credits cover the first 100 suppliers, and the rest needs a pack. Pulling 20 review pages for each of 100 companies is 100 × 20 = 2,000 calls × 1 credit = 2,000 credits, which fits the Starter pack's 10,000. Scaling up, 500,000 review pages is 500,000 calls × 1 credit = 500,000 credits, exactly one Pro pack. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Rate limits are per account and counted per minute; the pricing page also lists the faster rates you can choose at checkout. ## How do you handle errors and limits? Errors return an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. For this API, check parameter values against the table above: `invalid_parameters` (422) is the code for bad parameters, alongside `not_found` (404) and `insufficient_credits` (402). Rate-limited (429) and temporarily unavailable (503) responses include a `Retry-After` header with the seconds to wait. Treat 429 and 503 as retryable after that delay, and 4xx errors as bugs in the request. The [errors docs](https://docs.perceptlayer.com/errors) list every code and the [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover 429 behaviour. Data is collected from publicly available sources and returned as found at the time of the call. ## Can an AI agent call this? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only look up the catalogue and cost nothing; `call_endpoint` takes an endpoint ID and its parameters and spends 1 credit on success only. An agent can then resolve a company name with `company-search`, fetch `company-reviews` and summarise recent complaints. See [the MCP docs](https://docs.perceptlayer.com/ai-agents) for setup, and [MCP vs function calling](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) for when each approach fits. For other review sources, the [Google Maps reviews guide](https://perceptlayer.com/blog/google-maps-reviews-api-parameters), the [App Store reviews guide](https://perceptlayer.com/blog/app-store-reviews-api), the [Google Play guide](https://perceptlayer.com/blog/google-play-store-api) and the [Glassdoor guide](https://perceptlayer.com/blog/glassdoor-salary-data-api) work the same way. Next step: run the Amazon call above in the playground on [the Trustpilot API page](https://perceptlayer.com/apis/trustpilot), then swap in the domain you care about. ## APIs in this post - [Trustpilot **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/trustpilot) ## Frequently asked questions ### Do I need a Trustpilot account to use this? You need a Perceptlayer API key, which is free to create, and the company's domain. The catalogue documents `company_domain` as the only required input and no Trustpilot credentials. Trustpilot's official Trustpilot for Business API is described as a way to send invitations, showcase reviews and reply to feedback ( [Trustpilot Developers](https://developers.trustpilot.com/), 2026). This endpoint is addressed by a company's domain instead. ### How much does it cost to pull a company's reviews? One credit per successful call, whichever Trustpilot endpoint you use, so 1,000 calls × 1 credit = 1,000 credits. The free tier gives 100 credits on signup, enough for 100 calls, and failed calls are never billed. [Pricing](https://perceptlayer.com/pricing) shows what credits cost in the 10,000 to 5,000,000 credit packs. ### Do the responses include reviewer names? Yes. Each review entry in the recording has a `consumer` object with a display name, an image URL, a country code and a review count. We left that block out of the excerpts and don't reproduce the names. Display names identify real people, so we'd leave them out of anything you publish. Check the terms and any privacy rules that apply to your use before you store them. ### Can I filter reviews by star rating or date? The endpoint has a `rating` parameter (a string with no allowed values listed) and `date_posted`, which takes one of `any`, `last_12_months`, `last_6_months`, `last_3_months` or `last_30_days`. `sort` takes `relevance` or `recency`. Try the combination in the playground. Each call is 1 credit. ### How do I find a company's domain? Call `company-search` with `query` set to the company name. You can narrow it with `country`, `min_rating` ( `any`, `3`, `4` or `4.5`) and `min_review_count` ( `any`, `25`, `50`, `100`, `250` or `500`). Then pass the domain you chose as `company_domain` to the reviews or details endpoint. reviews trustpilot reputation api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 7 min read ## [Trustpilot Scraper or API: Ratings and Review History](https://perceptlayer.com/blog/trustpilot-scraper-vs-api) A Trustpilot scraper vs a 1-credit company-reviews call: the recorded Amazon response, its star breakdown, and 2,340 pages × 1 credit for a full history. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Jul 2026 Updated 7 Nov 2026 Perceptlayer 8 min read ## [Google Maps Reviews API: Parameters, Requests and Cost](https://perceptlayer.com/blog/google-maps-reviews-api-parameters) Call GET /v1/google-maps/reviews with a business\_id from Simple Search. Every parameter, the sort values 1 to 4, and the cost: 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. --- title: "LangChain Custom Tool for Live Web Data: Python Tutorial" description: "Build a LangChain tool in Python for Google Search and News: typed arguments, retries on 429, 502 and 503 only, and a per-run credit cap." url: https://perceptlayer.com/blog/langchain-custom-tool-web-data --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # LangChain Custom Tool for Live Web Data: Python Tutorial 18 Jul 2026 Updated 10 Nov 2026 Perceptlayer 11 min read A LangChain custom tool for an API is a Python function with a typed argument schema and a docstring the model can read. This tutorial wraps two Perceptlayer endpoints, Google Search and Google News, in that shape. You get validated arguments, retries only for errors that are worth retrying, and a hard credit cap per agent run. The whole thing is one file of Python, and a successful call costs 1 credit. ## Key takeaways - A tool is a function plus a Pydantic `args_schema`; the field descriptions and the docstring are what the model sees when it decides how to call it. - Retry only `rate_limited` (429), `source_error` (502) and `temporarily_unavailable` (503), and honour `Retry-After` when it's present. Never retry 401, 402, 403 or 422: they won't change on a second try. - HTTP error responses cost nothing and return `X-Credits-Used: 0`, so retrying them can't add to the bill. A request whose reply is lost to a timeout is different: there's no idempotency key, so it may have succeeded and been billed. Don't resend it, and count it against the cap. - A small `CreditBudget` object reserves each call's cost under a lock before the request and settles to `X-Credits-Used` afterwards, so a looping agent, even one making parallel tool calls, can't spend more than the cap. - Project responses to the few fields the model needs before truncating, and return errors as short strings instead of raising. ## What does a LangChain custom tool for an API need? A tool needs four things: a name, a description, an input schema and a function that returns text. LangChain builds the schema the model sees from your type hints, and you can supply a Pydantic model for richer constraints and field descriptions, as the [LangChain tools documentation](https://docs.langchain.com/oss/python/langchain/tools) describes. The model never sees your code, only that schema and the docstring. For a web data API, that means three decisions. Which endpoint parameters to expose, which to hide, and what the function returns when something goes wrong. Exposing every parameter makes the schema noisy and the model sloppy. Exposing too few leaves the agent unable to narrow a search by language or country. We'll expose the parameters an agent actually reasons about and leave the rest out. You can add more later from the endpoint pages, such as [the Search Light parameters](https://perceptlayer.com/apis/google-search/search-light). ## Which endpoints and parameters does the tool call? The tool calls two endpoints, each costing 1 credit on success. `GET /v1/google-search/search-light` takes a required `query` and a set of optional filters. `GET /v1/google-news/news` has no required parameter at all, though in practice you'll pass `q`. Both are on the [Google Search API](https://perceptlayer.com/apis/google-search) and [Google News API](https://perceptlayer.com/apis/google-news) pages, where you can run them in the playground first. | Endpoint | Required | Parameters we expose | Credits | | --- | --- | --- | --- | | `/v1/google-search/search-light` | `query` | `num`, `page`, `hl`, `gl`, `safe`, `sort` | 1 | | `/v1/google-news/news` | none | `q`, `gl`, `hl`, `page` | 1 | Some constraints come straight from the catalogue. `hl` and `gl` accept up to 2 characters. `safe` is one of `active` or `off`. `sort` is one of `date`, `date:r` or `date:d`. `query` on Search Light is capped at 2048 characters, and `q` on News at 500. The schema below encodes exactly these, so a malformed call fails locally, before the network, and costs nothing. Search Light is one of seven Google Search endpoints. If your agent needs more filters, [Search Advanced](https://perceptlayer.com/apis/google-search/search-advanced) takes many more optional parameters, such as `tbs`, `tbm` and `device`, and [Search AI Overview](https://perceptlayer.com/apis/google-search/search-ai-overview) is a separate endpoint. ## How do you set up the project? Setup is one install and one environment variable. You need Python 3.10 or later (the [LangChain install docs](https://docs.langchain.com/oss/python/langchain/install) list 3.10+ as the requirement), a model provider key for the agent in step 5, and a Perceptlayer key. Free accounts get 100 credits after verifying an email address, no credit card, so everything here fits in the free tier. [Get a free API key](https://perceptlayer.com/signup) and export it. ```bash pip install langchain langchain-anthropic httpx pydantic export API_KEY="sk_live_..." export ANTHROPIC_API_KEY="..." ``` Keys start with `sk_live_` and go in the `X-API-Key` header, which the client below sets once. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the query-parameter alternative for places where you can't set headers. The LangChain packages come from the same install docs: `langchain` plus a provider package, here `langchain-anthropic`. We use `httpx` because it lets you set [separate connect, read, write and pool timeouts](https://www.python-httpx.org/advanced/timeouts/), but `requests` works the same way. ## Step 1: How do you define typed arguments? Define one Pydantic model per tool, with a `Field(description=...)` on every attribute. The model reads those descriptions as instructions, so write them for it: say what the value is for, not just what type it is. Pydantic's `Field` accepts constraints such as `max_length` ( [Pydantic field docs](https://pydantic.dev/docs/validation/latest/concepts/fields/)), and a `Literal` type limits a value to a fixed set, so we encode the catalogue's limits in the schema instead of leaving them to the API. ```python from typing import Literal, Optional from pydantic import BaseModel, Field class SearchInput(BaseModel): query: str = Field( max_length=2048, description="The search query, as you would type it into Google.", ) num: Optional[int] = Field( default=None, description="Number of results to request." ) page: Optional[int] = Field( default=None, description="Results page to fetch, for follow-up queries." ) hl: Optional[str] = Field( default=None, max_length=2, description="Interface language, e.g. 'en'." ) gl: Optional[str] = Field( default=None, max_length=2, description="Country code for results, e.g. 'us'." ) safe: Optional[Literal["active", "off"]] = Field( default=None, description="SafeSearch setting." ) sort: Optional[Literal["date", "date:r", "date:d"]] = Field( default=None, description="Sort order. Leave unset for relevance." ) class NewsInput(BaseModel): q: Optional[str] = Field( default=None, max_length=500, description="News search query." ) gl: Optional[str] = Field( default=None, max_length=2, description="Country code, e.g. 'us'." ) hl: Optional[str] = Field( default=None, max_length=2, description="Language code, e.g. 'en'." ) page: Optional[int] = Field(default=None, description="Results page to fetch.") ``` Every optional field defaults to `None`, and the client drops `None` values before sending. That keeps us from stating defaults the catalogue doesn't document: if the model doesn't set a parameter, the API applies its own behaviour. ## Step 2: How do you build a budget that caps credits per run? A credit budget is a counter with a ceiling. Before each call the client reserves the call's cost, and only if the reservation fits under the cap does the request go out. Afterwards it settles the reservation to the `X-Credits-Used` value from the response. Every successful response carries that header, plus `X-Credits-Remaining` for the account balance after the call. Reserving matters because agents can issue several tool calls at once. A plain check-then-record counter would let every parallel call pass the check before any of them recorded a cost. A lock around the reservation closes that gap. ```python import threading class CreditBudget: def __init__(self, cap: int): self.cap = cap self.spent = 0 # settled spend plus reservations still in flight self._lock = threading.Lock() def reserve(self, cost: int) -> bool: with self._lock: if self.spent + cost > self.cap: return False self.spent += cost return True def settle(self, reserved: int, used: int) -> None: with self._lock: self.spent += used - reserved ``` Why a cap in your own code when the account is prepaid anyway? Because prepaid protects the account, not the run. When the balance hits zero, calls return `insufficient_credits` (402) and nothing more is debited. LangGraph already bounds a run with a [recursion limit](https://docs.langchain.com/oss/python/langgraph/graph-api) that raises `GraphRecursionError` when exceeded, and you can lower it per call with `config={"recursion_limit": 5}`. That limit counts graph steps, not credits. The cap is a second limit, denominated in the thing you pay for, so "the agent got stuck" becomes a bounded, known cost. The cost-control article [AI Agent API Cost Control](https://perceptlayer.com/blog/ai-agent-web-data-costs) goes further on budgets across runs. The arithmetic is simple. A cap of 10 credits at 1 credit per call is at most 10 calls. A run at the ceiling is 10 calls × 1 credit = 10 credits, which is 10 of the 100 free credits you get on signup, or 10 of the 10,000 in a Starter pack. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ## Step 3: Which errors should the tool retry? Retry the three codes that describe a temporary condition and nothing else. `rate_limited` (429), `source_error` (502) and `temporarily_unavailable` (503) can clear on their own. `invalid_api_key` (401), `insufficient_credits` (402), `restricted_endpoint` (403), `not_found` (404) and `invalid_parameters` (422) are properties of your request or account. Resending the same call gets the same answer. Errors arrive as an HTTP status and a JSON body shaped `{"error": {"code", "message", "request_id"}}`. The [errors docs](https://docs.perceptlayer.com/errors) are the place to check how errors are reported. An HTTP error response returns `X-Credits-Used: 0`, so retrying one that fails again costs nothing. You're spending time, not credits. Keep the attempt count low so a stuck call doesn't stall the agent, and see the [rate limit docs](https://docs.perceptlayer.com/rate-limits) if you hit 429 often. Two cases need more care. First, `429` and `503` responses carry a `Retry-After` header with the seconds to wait, so the loop uses it when present and falls back to exponential backoff when it's missing. Second, a call with no response at all is a different animal. Requests have no idempotency key, so one lost to a read timeout may have succeeded and been billed. The client therefore resends only when the connection itself failed, which means the request never arrived. For any other transport error it keeps the reserved credits counted against the cap and tells the model not to repeat the call. ```python import json import os import random import time import httpx BASE_URL = "https://api.perceptlayer.com" RETRYABLE_STATUS = {429, 502, 503} STOP_CODES = {"invalid_api_key", "insufficient_credits", "restricted_endpoint"} MAX_ATTEMPTS = 3 MAX_WAIT = 30 # seconds; if Retry-After asks for more, give up instead MAX_CHARS = 6000 # our own limit, to protect the model's context window # Fields from the recorded Search and News responses that a model can use. KEEP = ("position", "title", "link", "snippet", "source", "iso_date") RESULT_KEYS = ("organic_results", "news_results") def project(text: str) -> str: """Keep a few fields per result, then drop whole results to fit MAX_CHARS.""" try: data = json.loads(text) except ValueError: return text[:MAX_CHARS] items = next((data[k] for k in RESULT_KEYS if isinstance(data.get(k), list)), None) if items is None: # a shape we have no recorded sample for return text[:MAX_CHARS] kept = [] for item in items: row = {k: item[k] for k in KEEP if k in item} if isinstance(row.get("source"), dict): # News nests the name row["source"] = row["source"].get("name") if len(json.dumps(kept + [row])) > MAX_CHARS: break kept.append(row) return json.dumps(kept) class PerceptlayerClient: def __init__(self, budget: CreditBudget): self.budget = budget self.http = httpx.Client( base_url=BASE_URL, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) def get(self, path: str, params: dict, cost: int = 1) -> str: if not self.budget.reserve(cost): return ( f"Credit cap reached: {self.budget.spent} of {self.budget.cap} " "credits used this run. Do not call again; answer from the " "results you already have." ) clean = {k: v for k, v in params.items() if v is not None} for attempt in range(1, MAX_ATTEMPTS + 1): try: resp = self.http.get(path, params=clean) except (httpx.ConnectError, httpx.ConnectTimeout) as exc: # No connection, so the request never arrived: safe to resend. if attempt < MAX_ATTEMPTS: time.sleep(self._backoff(attempt)) continue self.budget.settle(cost, 0) return f"Could not connect after {attempt} attempts: {type(exc).__name__}." except httpx.TransportError as exc: # The reply was lost. The call may have succeeded and been # billed, so keep the reservation and do not resend. return ( f"No reply ({type(exc).__name__}). The call may have been " "billed, so it counts against the cap. Do not repeat it." ) if resp.is_success: used = int(resp.headers.get("X-Credits-Used", cost)) self.budget.settle(cost, used) return project(resp.text) code, message = self._parse_error(resp) if resp.status_code in RETRYABLE_STATUS and attempt < MAX_ATTEMPTS: delay = self._delay(resp, attempt) if delay is not None: time.sleep(delay) continue self.budget.settle(cost, 0) # an error response is not billed hint = " Do not retry." if code in STOP_CODES else "" return f"Request failed ({resp.status_code} {code}): {message}{hint}" self.budget.settle(cost, 0) return "Request failed." @staticmethod def _parse_error(resp: httpx.Response) -> tuple[str, str]: try: err = resp.json()["error"] return err.get("code", f"http_{resp.status_code}"), err.get("message", "") except (ValueError, KeyError, TypeError, AttributeError): return f"http_{resp.status_code}", "" @staticmethod def _backoff(attempt: int) -> float: return 2 ** (attempt - 1) + random.uniform(0, 0.5) def _delay(self, resp: httpx.Response, attempt: int) -> float | None: """Seconds to wait before a retry, or None to stop retrying.""" header = resp.headers.get("Retry-After") if header is None: return self._backoff(attempt) try: seconds = max(float(header), 0.0) except ValueError: return self._backoff(attempt) return seconds if seconds <= MAX_WAIT else None ``` Four details matter here. The reservation happens before the request, so a capped run never touches the network, and parallel calls can't all pass the check at once. The loop returns strings for every failure instead of raising, so the model reads "422 invalid\_parameters: …" and can correct its next call. `Retry-After` wins over the backoff schedule when it's there, and a wait longer than `MAX_WAIT` ends the retries rather than stalling the agent. And `project` keeps only fields that appear in the recorded responses before it applies `MAX_CHARS`. Why project at all? The recorded Search response carries `redirect_link` tokens on each result, and the recorded News response carries `thumbnail`, `story_token` and a `menu_links` list. Those cost context and tell the model nothing. Cutting raw JSON at a character count also lands mid-field. `project` drops whole results instead, so the output stays valid JSON. The trade-off is that fields outside `KEEP`, such as `related_questions` or `local_results`, never reach the model; add the ones your agent needs. The recorded sample is from the Search endpoint, and we haven't recorded Search Light, so if its response has neither `organic_results` nor `news_results`, `project` falls back to the raw text cut at `MAX_CHARS`. Check the shape in the playground and adjust `RESULT_KEYS` if it differs. ## Step 4: How do you turn the client into LangChain tools? Wrap the client in a factory so each run gets its own budget. Inside, decorate one function per endpoint with `@tool`, pass the `args_schema`, and write a docstring that tells the model when to pick this tool over the other. The docstring is the tool description, so it's the most important text in the file after the schema. ```python from langchain.tools import tool def build_tools(budget: CreditBudget): client = PerceptlayerClient(budget) @tool("google_search", args_schema=SearchInput) def google_search( query: str, num: Optional[int] = None, page: Optional[int] = None, hl: Optional[str] = None, gl: Optional[str] = None, safe: Optional[str] = None, sort: Optional[str] = None, ) -> str: """Search Google and return the results as JSON text. Use for general questions, documentation and anything that is not breaking news.""" return client.get( "/v1/google-search/search-light", {"query": query, "num": num, "page": page, "hl": hl, "gl": gl, "safe": safe, "sort": sort}, ) @tool("google_news", args_schema=NewsInput) def google_news( q: Optional[str] = None, gl: Optional[str] = None, hl: Optional[str] = None, page: Optional[int] = None, ) -> str: """Search Google News and return recent articles as JSON text. Use for current events and anything where recency matters.""" return client.get( "/v1/google-news/news", {"q": q, "gl": gl, "hl": hl, "page": page}, ) return [google_search, google_news] ``` You can test a tool without any model. Call `build_tools(CreditBudget(cap=5))[1].invoke({"q": "technology"})` and you get a JSON string: the projected results, not the raw response. Pass `{"query": "x" * 3000}` to the search tool and the schema rejects it before a request is sent. What does the model actually see? Here is the recorded News response for `q=technology`, trimmed to two results. The bulky fields are marked with `…`. ```json { "news_results": [ { "position": 1, "title": "Top Strategic Technology Trends for 2027", "link": "https://www.gartner.com/en/articles/top-technology-trends-2027", "snippet": "Explore Gartner's Top Strategic Technology Trends for 2027 — 10 trends that will shape autonomy, resilience and governance in the years...", "iso_date": "2026-10-20T15:59:45+00:00", "thumbnail": "https://www.gartner.com/ngw/globalassets/…/itsym-top-tech-trends.webp", "source": { "name": "Gartner", "icon": "…", "title": "Gartner" }, "story_token": "CBMib0FVX3lxTE1zMGNN…", … }, … ], "menu_links": [ { "title": "U.S.", "link": "…", "topic_token": "…" }, … ] } ``` After `project`, the news tool returns this instead, with `thumbnail`, `story_token`, `menu_links` and the nested source object gone: ```json [{"position": 1, "title": "Top Strategic Technology Trends for 2027", "link": "https://www.gartner.com/en/articles/top-technology-trends-2027", "snippet": "Explore Gartner's Top Strategic Technology Trends for 2027 — 10 trends that…", "source": "Gartner", "iso_date": "2026-10-20T15:59:45+00:00"}, …] ``` The recorded Search response for `query=best restaurants in Berlin` works the same way. Each item in `organic_results` has `position`, `title`, `link`, `snippet` and `source`, plus a long `redirect_link` that the projection drops: ```json { "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "redirect_link": "https://www.google.com/goto?url=CAESegHrOzAV7vOTOiRY…", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. …", "source": "Anders & Kaitlin", … }, … ], … } ``` That recording is from `/v1/google-search/search`, a sibling of Search Light, so treat it as the shape to expect rather than a guarantee. To see a real Search Light or News response with your own parameters, run the call in the playground on the [Search Light page](https://perceptlayer.com/apis/google-search/search-light) or the [News page](https://perceptlayer.com/apis/google-news/news). ## Step 5: How do you run the agent with a credit cap? Create one budget per run, build the tools from it, and hand them to the agent. `create_agent` is imported from `langchain.agents`, takes a `"provider:model"` string and a `system_prompt`, as the [LangChain agents docs](https://docs.langchain.com/oss/python/langchain/agents) show. The model ID below, `claude-sonnet-5-5`, is the Claude Sonnet 5.5 API ID listed on [Anthropic's models overview](https://platform.claude.com/docs/en/about-claude/models/overview) (2026); the agents docs use a different Claude example ID, so check the models page for the current one. Print the budget at the end so every run reports what it spent. The cap is enforced in the tools, not in the prompt, and each call reserves its credits under a lock before the request goes out, so neither a persuasive model nor parallel tool calls can push the run past it. ```python from langchain.agents import create_agent MODEL = "anthropic:claude-sonnet-5-5" # swap for any chat model LangChain supports def run(question: str, max_credits: int = 10) -> str: budget = CreditBudget(cap=max_credits) agent = create_agent( MODEL, tools=build_tools(budget), system_prompt=( "Answer using the tools. Use google_news for recent events and " "google_search otherwise. If a tool says the credit cap is " "reached, stop calling tools and answer with what you have." ), ) result = agent.invoke({"messages": [{"role": "user", "content": question}]}) print(f"Credits used this run: {budget.spent} of {budget.cap}") return result["messages"][-1].content if __name__ == "__main__": print(run("What changed in the news about AI agent frameworks this week?")) ``` What the run prints is two things: the model's final answer, which depends on the model and on whatever the news is that day, and one line in the form `Credits used this run: N of 10`, where N is the number of successful calls at 1 credit each, plus any call whose reply was lost. We haven't recorded an agent run, so we won't show an answer here. If the agent loops, the first call past the cap comes back with the cap message instead of data, and the run ends at your ceiling. The credit line prints on every run, which is also a cheap way to spot a prompt that makes the agent over-search. ## When should you use MCP instead of a custom tool? Use a custom tool when you want control: typed arguments you chose, your own retry rules and a budget in code. Use the MCP server when you want breadth. It exposes `search_endpoints`, `get_endpoint` and `call_endpoint` at `https://perceptlayer.com/mcp`, so an agent can discover endpoints across the whole catalogue of 480 websites and 2,782 endpoints without you writing a wrapper for each. The two compose well. Searching the catalogue and reading endpoint details cost nothing; `call_endpoint` spends the endpoint's credits on success only. A custom tool is the better fit when the agent needs one or two sources and you want predictable arguments. MCP fits an agent that has to pick its own sources. The [MCP docs](https://docs.perceptlayer.com/ai-agents) and the [Claude MCP search tutorial](https://perceptlayer.com/blog/claude-agent-live-search-mcp) cover that route. Your next step: [get a free API key](https://perceptlayer.com/signup), paste the code into one file, and run it with a cap of 5 credits. Then browse the [full list of APIs](https://perceptlayer.com/apis) and add a second wrapper for the next source your agent needs. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Google News **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-news) ## Frequently asked questions ### How much does a LangChain tool call cost? Each successful call to the two endpoints in this tutorial costs 1 credit. HTTP error responses cost nothing and return `X-Credits-Used: 0`. A free account gets 100 credits once, on signup, so 100 calls × 1 credit = 100 credits fits the free tier. Paid credits come in prepaid packs starting at 10,000 credits (Starter). See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits). ### Why return error strings instead of raising exceptions? A string goes back to the model as the tool result, so it can correct an `invalid_parameters` argument or stop on a cap message. LangChain's [tools docs](https://docs.langchain.com/oss/python/langchain/tools) handle tool errors with agent middleware that catches the exception and returns a custom error message, which is the same idea applied after the fact. Returning short, specific strings from the tool itself needs no extra configuration and gives the model what it needs to decide its next step. ### Which errors are safe to retry? Retry `rate_limited` (429), `source_error` (502) and `temporarily_unavailable` (503), waiting for `Retry-After` when the response has one. Don't retry `invalid_api_key`, `insufficient_credits`, `restricted_endpoint`, `not_found` or `invalid_parameters`; the same request will fail the same way. Error responses cost no credits, but a timeout leaves you without a response, and that request may have been billed. Details are in the [errors docs](https://docs.perceptlayer.com/errors). ### Can I use other endpoints in the same pattern? Yes. The endpoints in this post are GETs with named parameters, and each endpoint page lists its method, so each new one needs a Pydantic model, a small function and a path. Take the paths and parameter limits from the endpoint page. Some endpoints cover social, personal or SEO data and need the restricted-endpoint terms accepted in the dashboard first. ### Is the credit cap shared across runs? No. `CreditBudget` lives in memory for one run, because `build_tools` creates a new one each time. For a daily or monthly limit, persist the spent total yourself, or watch `X-Credits-Remaining` on the account balance. The prepaid model is the backstop: when credits run out, calls return `insufficient_credits` (402) and nothing more is debited. langchain python tool calling google search ai agents ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 24 Jul 2026 Perceptlayer 7 min read ## [Scheduled AI Agent Runs: Budgeting Credits per Run](https://perceptlayer.com/blog/scheduled-agent-credit-budget) Cap an agent at N calls per run with a Python ledger that reads X-Credits-Used, plus the math for hourly and daily runs on 100 credits on signup. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 14 Jul 2026 Perceptlayer 7 min read ## [AI Shopping Agent: Compare Prices Across Marketplaces](https://perceptlayer.com/blog/ai-shopping-agent-compare-prices) A Python AI shopping agent that searches Google Shopping, Walmart and AliExpress, normalises offers into one table and stops at a credit cap of 6 per question. --- title: "MCP Server Rate Limiting: Keep Agent Tool Calls in Check" description: "Where to rate limit MCP agent tool calls, with a worked loop against a 60-requests-a-minute account, Retry-After handling and the credit math." url: https://perceptlayer.com/blog/mcp-server-rate-limiting-agents --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # MCP Server Rate Limiting: Keep Agent Tool Calls in Check 18 Jul 2026 Perceptlayer 9 min read Rate limiting an MCP server means capping how many tool calls an agent can make per minute, and the cap belongs in three places at once: a pacing check in the agent's own code, a per-account limit at the gateway, and respect for whatever the source website tolerates. The gateway limit is the one you can't skip, because an agent loop will find it. This article shows where each limit sits and walks through a loop that hits one. It is written from the side of an agent that consumes a limited gateway; if you are building the limiter into your own MCP server, the short section on that below covers what to enforce. ## Key takeaways - Put the hard limit at the gateway, per account, so one runaway agent can't spend another team's request budget. Put a soft pacing check in the client so the agent rarely reaches the hard one. - Perceptlayer limits requests per account, counted per minute: free accounts get 1 request a second (60 a minute), and paying accounts get at least 5 a second (300 a minute). - A `429` carries a `Retry-After` header with the seconds to wait, and a failed call costs 0 credits, so retrying after a `429` doesn't bill you. - Don't blindly retry a client timeout: with no idempotency key, the original request may have succeeded and been billed. - Hand the model a plain "wait N seconds" tool result instead of a stack trace, so it can decide whether to pause or change plan. ## Why do MCP tool calls need rate limiting at all? An agent decides how many tool calls to make, and nobody reviews that decision in advance. A model that fans out eight searches per step, over ten steps, produces 80 calls in whatever time the loop takes. Without a limit, that is also your credit balance, the source websites' goodwill and your other users' latency, spent by a prompt. The [Model Context Protocol tools specification](https://modelcontextprotocol.io/specification/latest/server/tools) defines how a client lists and calls tools, and its security considerations say servers must rate limit tool invocations. It doesn't set a number or a window, so each server picks its own policy (MCP specification, 2026). That's why the limit has to live somewhere you control, not in the model's instructions. "Please make at most one call a second" in a system prompt is a request the model may or may not honour. Two things make agents different from a normal API client. First, they can retry: nothing stops a model from answering an error by sending the same call again, or a near-identical one, straight away, so plan for it rather than hoping it won't happen. Second, they can parallelise: by default, Claude may call multiple tools in a single response, and it's up to your code whether those run concurrently or one at a time ( [Anthropic parallel tool use docs](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use), 2026). Both patterns can turn a polite average rate into bursts. ## Where should the limit live: client, gateway or source? Each layer protects something different, so the question isn't which one to pick. The gateway limit protects the account and the service, the client limit protects the agent from wasting its own turns, and the source website's limit is the constraint you inherit and can only respect, not set. | Layer | What it protects | Who sets it | What happens when it trips | | --- | --- | --- | --- | | Client (agent code) | Your own latency, token budget and credit balance | You | The agent waits or drops a call before it is sent | | Gateway (the MCP server and API) | The account, other accounts, the service | The provider, per account | `429` with `Retry-After`; nothing is billed | | Source (the website behind the data) | The source's tolerance for traffic | The source | Can show up as a slow or failed call; you don't control it | The client layer is soft and advisory: you can change it any time, but a bug bypasses it. The gateway layer is hard: it applies to every client, including the one with the bug. If you only build one, build the gateway layer (see the section on building it below). If you consume someone else's gateway, as you do with Perceptlayer, your job is the client layer: read the headers the gateway gives you and stay under them. ## What does the Perceptlayer rate limit look like? Limits are per account, shared by all of the account's keys, and counted per minute ( [rate limits docs](https://docs.perceptlayer.com/rate-limits)). A free account gets 1 request a second, which is 60 a minute. Each credit pack includes a rate: 5 a second for Starter through Pro, 10 for Scale, 20 for Volume, 25 for Volume 10M and Volume 25M, and 50 for Volume 50M. Paying accounts run at the rate of the credits they are using, and at least 5 a second (300 a minute). A faster rate can be chosen at checkout for a higher price, up to a maximum that depends on the pack; [pricing](https://perceptlayer.com/pricing) has the details and what credits cost. Because the limit is per account, a second API key doesn't add capacity. Two agents sharing one account share one budget. Every response says where you stand: | Header | Meaning | | --- | --- | | `RateLimit-Limit` | Requests allowed per minute | | `RateLimit-Remaining` | Requests left this minute | | `RateLimit-Reset` | Seconds until the minute resets | | `RateLimit-Policy` | The policy the limit follows | | `Retry-After` | On `429` and `503`: seconds to wait | | `X-Credits-Used` / `X-Credits-Remaining` | What the call cost, and the balance after it | A `429` follows the standard in [RFC 6585](https://www.rfc-editor.org/rfc/rfc6585#section-4), and `Retry-After` is defined in [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110#field.retry-after). The error body is `{"error": {"code", "message", "request_id"}}` with the code `rate_limited`; the [errors docs](https://docs.perceptlayer.com/errors) list the rest. ## What happens when an agent loop hits the limit? On a free account, a loop that issues 80 calls in under a minute is over the budget: the limit is 60 requests a minute, so about 20 calls are rejected with `rate_limited` (429). Requests are counted per minute, so the first 60 in the minute go through and the rest get `rate_limited` until `RateLimit-Reset` says the minute has started over. Rejected calls cost nothing: failed calls return `X-Credits-Used: 0`. Here is the loop. An agent researches a topic. At each of 10 steps, the model asks for 8 searches through `call_endpoint`, using the [Google Search API](https://perceptlayer.com/apis/google-search) `search-light` endpoint (1 credit per call). | Quantity | Value | | --- | --- | | Calls the loop wants to make | 10 steps × 8 searches = 80 calls | | Free-account limit | 60 requests a minute | | Calls the minute's budget covers | 60 | | Calls over budget, rejected with `429` | 20 | | Credits spent on 60 accepted calls | 60 calls × 1 credit = 60 credits | | Credits spent on 20 rejected calls | 20 × 0 = 0 credits | | Credits once all 80 eventually succeed | 80 calls × 1 credit = 80 credits | Two outcomes are possible, and they differ in cost to you in tokens, not credits. If the tool returns the raw error, the model may retry at once and burn turns on more `429` responses. If the tool or the client waits the `Retry-After` seconds, the loop finishes a little later and each rejected call is made once more, for 80 credits in total. On a paying account with at least 5 requests a second (300 a minute), the same 80 calls fit inside the 300-a-minute limit without any waiting. This is why the account's rate, not the number of keys, is the figure to plan around. ## How do you pace calls in the client? Read `RateLimit-Remaining` and `RateLimit-Reset` on every response, and sleep when the budget is spent. That keeps most calls from ever seeing a `429`. Treat `Retry-After` as the authority when you do get one. The wrapper below does both, and it is the function you would expose to the model as a tool. ```python import os import time import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} resume_at = 0.0 # when the minute's budget is back, after a call used it up def search(query: str, max_tries: int = 4) -> dict: global resume_at time.sleep(max(0.0, resume_at - time.monotonic())) wait, remaining = 0, 0 for attempt in range(max_tries): r = requests.get( f"{BASE}/v1/google-search/search-light", params={"query": query}, headers=HEADERS, timeout=30, ) if r.status_code in (429, 503): # Failed calls cost 0 credits, so waiting and retrying is safe. wait = int(r.headers.get("Retry-After", 2 ** attempt)) remaining = int(r.headers.get("RateLimit-Remaining", 0)) if attempt < max_tries - 1: time.sleep(wait) continue r.raise_for_status() # 402 insufficient_credits, 422, etc. stop here if int(r.headers.get("RateLimit-Remaining", 1)) == 0: # Budget used up: return this result now, and wait before the next call. resume_at = time.monotonic() + int(r.headers.get("RateLimit-Reset", 1)) return r.json() # Out of retries: hand the model a small result instead of raising. return { "code": "rate_limited", "retry_after_seconds": wait, "calls_remaining": remaining, } ``` Three details matter. A `requests.Timeout` isn't caught on purpose: the request may have succeeded and been billed, because requests carry no idempotency key. Decide per call whether a repeat is acceptable; [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers the patterns. A `402` ( `insufficient_credits`) isn't retried either, since the service is prepaid and nothing tops up automatically. And `max_tries` bounds the loop, so a stuck limit ends in a small result the model can act on, not a spin. For concurrent tool calls, put a semaphore or a shared token bucket around `search`, sized so a burst from one model turn can't use up the minute's budget on its own. ## What should the model see when a limit trips? Give the model a short, actionable result and keep the retry logic out of its context. A model reasons well about "rate limited, wait 12 seconds, 31 searches still pending" and badly about a raw traceback or an HTML error page. Handle the wait in code when you can; surface it to the model only when waiting changes the plan. When retries run out, the `search` function above returns this instead of raising: ```json { "code": "rate_limited", "retry_after_seconds": 12, "calls_remaining": 0 } ``` `code` tells the model what kind of problem it is, `retry_after_seconds` is the `Retry-After` value (12 here is an illustration), and `calls_remaining` is the `RateLimit-Remaining` budget for this minute. If you expose `search` through an MCP server, report it as a tool execution error ( `isError: true`), which the specification says clients should pass to the model so it can recover ( [MCP tools specification](https://modelcontextprotocol.io/specification/latest/server/tools), 2026). Don't include request or response bodies in logs; log the `request_id` from the error body instead, which is what support needs to trace a call. If you run the Perceptlayer MCP server at `https://perceptlayer.com/mcp` (Streamable HTTP), remember that limits are per account, so pace it the way you would any other client of your key, and `call_endpoint` reports credits used and remaining on each call. `search_endpoints` and `get_endpoint` only look up the catalogue and cost nothing in credits. Your client-side pacing still matters, because the server can only say no; it can't make the agent plan fewer calls. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) cover setup, and [MCP server for web scraping](https://perceptlayer.com/blog/mcp-server-for-web-scraping) shows the three tools in use. ## What if you are building the limiter into your own MCP server? Enforce three things on the server, keyed by account rather than by connection or API key. Count requests per window and reject over-budget calls before doing any work. Return the same result shape on every rejection: a code, the seconds to wait and the budget left. Only charge for calls that succeed, so a rejected call is free for the caller. A token bucket or fixed window both work; the choice mostly decides how bursts are treated. Behind a gateway, the gateway usually does the counting and the MCP server just passes the headers through. Rate limits cap speed, not spend. For a ceiling on total credits per run, pair pacing with a budget, as described in [capping web data spend for an agent](https://perceptlayer.com/blog/ai-agent-web-data-costs). The [credits docs](https://docs.perceptlayer.com/credits) explain how debits work. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Do rejected requests cost credits? No. Only a successful response debits credits, and a failed call returns `X-Credits-Used: 0`. A `429` is a failed call, so a loop that gets rate limited and waits spends the same total as one that was never limited: each successful call costs the credits shown on its endpoint, which is 1 credit for nearly all of them. ### Does a second API key raise my rate limit? No. Limits are per account and shared by all of its keys, so extra keys don't add capacity. To go faster, use a pack with a higher included rate, or choose a faster rate at checkout up to the pack's maximum. The [pricing page](https://perceptlayer.com/pricing) lists the details, and the rate limits docs explain how the rate follows the credits in use. ### How long should the agent wait after a 429? Wait the number of seconds in the `Retry-After` header. If it's missing, fall back to exponential backoff with a small cap. `RateLimit-Reset` tells you how many seconds remain until the minute resets, which is a useful upper bound when you are pacing before a `429` happens. ### Is it safe to retry a call that timed out? Not automatically. Requests have no idempotency key, so a request whose reply was lost may have succeeded and been billed. Retry on a timeout only when the call is cheap to repeat, such as a 1-credit search, and keep a cap on attempts. For a deeper treatment, see the article on retrying without paying twice. ### Where do I start? Get a free key at [signup](https://perceptlayer.com/signup): 100 free credits after verifying an email address, no credit card. Then run the `search-light` call from this article in a loop of your own and watch `RateLimit-Remaining` fall on each response. The [Search Light endpoint page](https://perceptlayer.com/apis/google-search/search-light) has a playground for a first call. mcp rate limiting ai agents tool calling retry-after ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Sept 2026 Perceptlayer 7 min read ## [MCP Server Too Many Tools: Keeping Agent Context Small](https://perceptlayer.com/blog/mcp-too-many-tools-context) One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small. --- title: "Airbnb Listings Data API: Search, Details and Reviews" description: "Search Airbnb listings by place and dates as JSON: price, rating, beds and coordinates from a recorded response, plus the listing and reviews calls." url: https://perceptlayer.com/blog/airbnb-listings-data-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Airbnb Listings Data API: Search, Details and Reviews 16 Jul 2026 Updated 26 Oct 2026 Perceptlayer 7 min read You can get Airbnb listings as JSON with three GET endpoints: `/v1/airbnb/search` for a place and dates, `/v1/airbnb/listing` for one listing, and `/v1/airbnb/reviews` for its reviews. Each successful call costs 1 credit, and you authenticate with one `X-API-Key` header. This guide shows the search request, a recorded response, the parameters of all three endpoints and what a market snapshot costs. ## Key takeaways - Airbnb's own API is offered through API programs that require signed agreements ( [Airbnb Help Center, API Terms](https://www.airbnb.com/help/article/3418), 2026), so a search by place and dates needs another route. The Airbnb API on Perceptlayer has 3 endpoints: `search`, `listing` and `reviews`. - `/v1/airbnb/search` requires only `place`. With `checkin`, `checkout` and `adults` it returns each listing's price for the stay in `price.amount`, `price.currency` and `price.nights`. - Search results include `id`, `url`, `rating`, `review_count`, `bedrooms`, `beds`, `bathrooms`, `latitude`, `longitude` and `images`. The `id` is what you pass as `listing_id` to the other two endpoints. - Every successful call is 1 credit, and failed calls return `X-Credits-Used: 0`. The 100 free credits on signup cover the first 100 calls of a 620-call snapshot, and a Starter pack of 10,000 credits covers the whole snapshot 16 times. ## Can you get Airbnb listings from the official API? Usually not. Airbnb's API terms say participation in an API Program requires signing Airbnb's standard mutual nondisclosure agreement, agreeing to the API Terms and completing a data security review, and that Airbnb decides which Scopes (sets of access permissions) an organization gets ( [Airbnb Help Center, API Terms](https://www.airbnb.com/help/article/3418), 2026). Airbnb's [developer portal](https://developer.withairbnb.com/) is aimed at building and integrating with the Airbnb platform. If you manage listings through a connectivity partner, that route is the right one. If you want to search a market, compare prices or read reviews across listings you don't manage, you need a data API instead. The [Airbnb API on Perceptlayer](https://perceptlayer.com/apis/airbnb) covers that second case. Data is collected from publicly available sources and returned as found at the time of the call. ## How do you search Airbnb listings by place and dates? Call `GET /v1/airbnb/search` with a `place` and, for stay prices, `checkin`, `checkout` and `adults`. Only `place` is required. The request below searches Paris for two adults over four nights in November 2026 and asks for prices in euros. Get a key on the [free sign-up page](https://perceptlayer.com/signup) and export it as `API_KEY`; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the query-parameter alternative. ```bash curl "https://api.perceptlayer.com/v1/airbnb/search?place=Paris--France&checkin=2026-11-10&checkout=2026-11-14&adults=2¤cy=EUR" \ -H "X-API-Key: $API_KEY" ``` The `place` value in this request is `Paris--France`, and the response echoes it back as `"place": "Paris, France"`. The same call can be run with your key in the playground on the [Search endpoint page](https://perceptlayer.com/apis/airbnb/search). ### What does the search response contain? The recorded response below is real output from this exact request, trimmed with `…`. Each item in `data.results` is one listing. The first carries a `rating` and `review_count`; the second has neither, so treat both as optional when you parse. ```json { "success": true, "data": { "place": "Paris, France", "results": [ { "id": "1669612146929039736", "url": "https://www.airbnb.com/rooms/1669612146929039736", "title": "Apartment in Paris", "name": "Stylish 1-Bedroom/2-Person Apartment – Beaugrenelle", "subtitle": "Bright 6th-floor stay near the Eiffel Tower, with a balcony and a private entrance", "rating": 5, "review_count": 17, "price": { "amount": 714, "currency": "EUR", "nights": 4, "qualifier": "for 4 nights" }, "price_breakdown": [ { "description": "4 nights x €178.34", "amount": 713.37 } ], "bedrooms": 1, "beds": 1, "bathrooms": 1, "latitude": 48.84223, "longitude": 2.29241, "badges": [ "Guest favorite" ], "images": [ "https://a0.muscache.com/im/pictures/hosting/Hosting-1669612146929039736/original/053b1768-c702-49bf-9b31-d0b00b51260b.jpeg", … ] }, … ], "has_more": true, "next_cursor": "eyJzZWN0aW9uX29mZnNldCI6MCwiaXRlbXNfb2Zmc2V0IjoxOCwidmVyc2lvbiI6MX0=" }, "meta": { "endpoint_family": "stay_search", "billable": true } } ``` The fields that matter for most jobs are in the table below. All of them appear in the recorded response above. | Field | What it holds | | --- | --- | | `id`, `url` | The listing ID and its page URL | | `name`, `title`, `subtitle` | Listing name, property type and city, and the short description | | `rating`, `review_count` | Average rating and number of reviews; absent on the second listing in the sample | | `price.amount`, `price.currency`, `price.nights` | The total for the stay in the currency you requested | | `price_breakdown` | A list of lines, each with a `description` such as `4 nights x €178.34` and an `amount` (713.37 in the first listing) | | `bedrooms`, `beds`, `bathrooms` | Counts as numbers | | `latitude`, `longitude` | Coordinates for mapping or distance work | | `badges`, `images` | Labels such as `Guest favorite`, and photo URLs | Note that `price.amount` is the stay total, shown as 714 for 4 nights. In the first listing the `price_breakdown` amount is 713.37, also the stay total, and the nightly rate (€178.34) appears only inside the `description` string. Because `price.amount` is rounded, dividing it by `price.nights` gives 178.5, not 178.34. If you need the exact nightly rate, read it from the description text. ### Which parameters does the search endpoint take? Search takes one required parameter, `place`, and ten optional ones for dates, guests, currency, price ceiling and room type. Only the types, the 100-character limit on `place`, the 200-character limit on `cursor` and the three `room_type` values are documented, so test other values in the [playground](https://perceptlayer.com/apis/airbnb/search) before relying on them. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `place` | string | yes | Up to 100 characters | | `checkin`, `checkout` | string | no | The example uses `2026-11-10` style dates | | `adults`, `children`, `infants`, `pets` | integer | no | Guest counts | | `currency` | string | no | The example uses `EUR` | | `price_max` | integer | no | Price ceiling | | `room_type` | string | no | One of `entire_home`, `private_room`, `hotel_room` | | `cursor` | string | no | Up to 200 characters; for continuing a search | ## How do you fetch one listing and its reviews? Pass the `id` from a search result as `listing_id` to `GET /v1/airbnb/listing` for the listing itself and to `GET /v1/airbnb/reviews` for its reviews. Each call is 1 credit. We have no recorded response for either endpoint, so this section shows the requests only and doesn't list their response fields. For the fields each one returns, and to run a real call with your key, open the [Listing endpoint page](https://perceptlayer.com/apis/airbnb/listing) and the [Reviews endpoint page](https://perceptlayer.com/apis/airbnb/reviews). The listing endpoint accepts `checkin`, `checkout` and `adults` in addition to `listing_id`, so you can ask about a specific stay. ```bash curl "https://api.perceptlayer.com/v1/airbnb/listing?listing_id=1669612146929039736&checkin=2026-11-10&checkout=2026-11-14&adults=2" \ -H "X-API-Key: $API_KEY" ``` The reviews endpoint takes `limit` and `offset`, which is how you page through a listing's reviews. Both are integers, and the documentation gives no default or maximum, so set `limit` explicitly. ```bash curl "https://api.perceptlayer.com/v1/airbnb/reviews?listing_id=1669612146929039736&limit=20&offset=0" \ -H "X-API-Key: $API_KEY" ``` | Endpoint | Required | Optional | Credits | | --- | --- | --- | --- | | `/v1/airbnb/listing` | `listing_id` | `checkin`, `checkout`, `adults` | 1 | | `/v1/airbnb/reviews` | `listing_id` | `limit`, `offset` | 1 | | `/v1/airbnb/search` | `place` | `checkin`, `checkout`, `adults`, `children`, `infants`, `pets`, `currency`, `price_max`, `room_type`, `cursor` | 1 | ## How do you run the search from code? The script below runs the search and prints name, price and rating for each result. It uses `.get()` for `rating`, `price` and `name` because the recorded excerpt shows only two listings, and one of them has no rating, so any field may be missing on others. We have no recorded run of this script, so try it on a single search before you build on it. ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/airbnb/search", params={ "place": "Paris--France", "checkin": "2026-11-10", "checkout": "2026-11-14", "adults": 2, "currency": "EUR", }, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) resp.raise_for_status() for item in resp.json()["data"]["results"]: price = item.get("price") or {} name = (item.get("name") or "").strip() print(item.get("id"), name, price.get("amount"), price.get("currency"), item.get("rating")) ``` Errors come back as an HTTP status with a JSON body of `{"error": {"code", "message", "request_id"}}`. Handle `rate_limited` (429) by backing off, and `insufficient_credits` (402) by stopping, since nothing is debited and there is no automatic top-up. The [errors docs](https://docs.perceptlayer.com/errors) list every code and the [rate limit docs](https://docs.perceptlayer.com/rate-limits) cover the rest. ## What does a market snapshot cost in credits? A snapshot costs one credit per call, so the total is search calls plus listing calls plus review calls. Failed calls return `X-Credits-Used: 0` and cost nothing, and each successful response reports `X-Credits-Remaining` so your job can watch the balance. The [credits docs](https://docs.perceptlayer.com/credits) explain both headers. As an example, not a measured plan, say you want a neighbourhood snapshot: 20 search calls to collect candidates (each page's `next_cursor` goes back as `cursor` for the next one), then the listing detail and the first page of reviews for 300 of them. | Step | Calls | Credits | | --- | --- | --- | | Search | 20 | 20 | | Listing detail | 300 | 300 | | Reviews, one page each | 300 | 300 | | Total | 620 | 620 | 620 credits is more than the 100 free credits you get on signup after verifying an email address, with no credit card, so the free credits cover a test of the first 100 calls. Beyond that, credits come in prepaid packs starting at 10,000 credits (the Starter pack), so one 620-call snapshot is 620 × 1 credit = 620 credits, a small fraction of it. See [pricing](https://perceptlayer.com/pricing) for what credits cost. The 20-search figure is an assumed budget, not a measured page count; run your own search and count `data.results` before you plan around it. Price changes with dates, so rerun the same search on a schedule if you want a time series. Each rerun costs the same credits. If an agent will make these calls, the [MCP docs](https://docs.perceptlayer.com/ai-agents) show how to expose them as tools, and the [credits docs](https://docs.perceptlayer.com/credits) show how to track spend. For a comparable listings guide, see [Zillow listings as JSON](https://perceptlayer.com/blog/zillow-listings-api-json), or browse all [API guides](https://perceptlayer.com/blog/category/api-guides) and the [travel APIs](https://perceptlayer.com/verticals/travel). Next step: [get a free API key](https://perceptlayer.com/signup), then run the search above in the playground on the [Airbnb API page](https://perceptlayer.com/apis/airbnb). ## APIs in this post - [Airbnb **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/airbnb) ## Frequently asked questions ### Does Airbnb have a public API for listings and reviews? Airbnb's API terms describe access through API Programs, which require signed agreements and a data security review, with Airbnb deciding which Scopes an organization receives ( [Airbnb Help Center, API Terms](https://www.airbnb.com/help/article/3418), 2026). That is built for partners managing their own listings. For searching and reading listings you don't manage, use a data API like the three endpoints above. ### How much does one Airbnb API call cost? Each successful call to search, listing or reviews costs 1 credit. Failed calls cost nothing and return `X-Credits-Used: 0`. Every account gets 100 free credits after email verification. Paid packs start at 10,000 credits, so 10,000 calls × 1 credit = 10,000 credits, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. ### How do I page through results and reviews? For reviews, use `limit` and `offset`; both are integers. For search, the recorded response ends `data` with `has_more` and `next_cursor`: pass `next_cursor` back as the `cursor` parameter (a string of up to 200 characters) to get the next page, and stop when `has_more` is false. No defaults or page sizes are documented, so set `limit` explicitly for reviews. ### What happens if my credits run out mid-job? The next call returns `insufficient_credits` with HTTP status 402, and nothing is debited. The service is prepaid with no automatic top-up, so your job stops cleanly. Read `X-Credits-Remaining` on each response to stop early or alert before the balance reaches zero. ### How fresh is the data? Data is collected from publicly available sources and returned as found at the time of the call. Nothing here promises completeness or accuracy beyond that, so treat a stored snapshot as a record of one moment. ### Should I build an Airbnb scraper instead? An Airbnb scraper has to render JavaScript-heavy pages, keep up with markup changes and respect Airbnb's terms, and you maintain all of it. The search, listing and reviews endpoints return price, rating, beds and coordinates as JSON for 1 credit per successful call. Build your own only for fields these endpoints don't return. airbnb travel listings short-term rentals reviews ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Nov 2026 Perceptlayer 9 min read ## [Airbnb Scraper or API: What You Get](https://perceptlayer.com/blog/airbnb-scraper-vs-api) An Airbnb scraper vs search, listing and reviews endpoints at 1 credit a call: a recorded Paris search with price.amount, price\_breakdown and coordinates. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Oct 2026 Perceptlayer 7 min read ## [Vrbo API: Vacation Rental Listings and Availability](https://perceptlayer.com/blog/vrbo-api-vacation-rental-listings) Search Vrbo with required check\_in and check\_out, then pull a listing's availability and reviews by property\_id. Parameters, cURL and the cost of 50 listings. --- title: "Google AI Mode API: Answers and Follow-ups as JSON" description: "Google has no AI Mode API. GET /v1/google-search/google-ai-mode-search takes q, hl, gl and a follow_up_token; a three-turn conversation costs 3 credits." url: https://perceptlayer.com/blog/google-ai-mode-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google AI Mode API: Answers and Follow-ups as JSON 16 Jul 2026 Perceptlayer 7 min read Google doesn't offer an API for AI Mode, its conversational search answers. `GET /v1/google-search/google-ai-mode-search` returns an AI Mode answer as JSON for a question you pass in `q`, with `hl`, `gl`, `google_domain` and `uule` to set language and location. A `follow_up_token` parameter carries a conversation into its next turn. Every turn is one call at 1 credit, so a three-turn conversation costs 3 credits. ## Key takeaways - Google has no public AI Mode API; AI Mode is a Search feature, available in over 200 countries and territories according to Google. - `GET /v1/google-search/google-ai-mode-search` needs only `q`, which takes up to 8,192 characters, four times the AI Overview endpoint's 2,048. - `follow_up_token` (up to 4,000 characters) links a follow-up question to the turn before it; without it, each call is a fresh conversation. - Each turn costs 1 credit on success: 3 credits for a three-turn conversation, 3,000 for 1,000 of them. - We haven't recorded an AI Mode response, so this guide gives the request, the parameters and the cost, and names what you need to check in the playground before you build on it. ## Is there an official Google AI Mode API? No. AI Mode is a tab in Google Search, not a developer product. Google describes it as using a "query fan-out" technique: it splits a question into subtopics and searches for each one at once across several sources, then writes one answer with links ( [Google Search Help](https://support.google.com/websearch/answer/16011537), 2026). Google's developer offerings for generative answers sit elsewhere, in its Gemini API and Vertex AI, which ground a model you call on Google Search results rather than returning the AI Mode answer a searcher sees. If you want your own model's answer grounded in search, a model API with a search tool is the more direct route, and our guide to [grounding LLM answers with live search](https://perceptlayer.com/blog/ground-agent-answers-live-search) covers that pattern. If you need the answer Google itself gives, for monitoring what AI Mode says about a brand, a product or a topic, the [Google AI Mode Search endpoint](https://perceptlayer.com/apis/google-search/google-ai-mode-search) returns it. Data is collected from publicly available sources and returned as found at the time of the call. ## How do you ask AI Mode a question? Send a GET request with `q`, the question as a user would type it. Add `hl` and `gl` so the answer matches the language and country you care about. Put your key in the `X-API-Key` header; keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. A first call looks like this: ```bash curl "https://api.perceptlayer.com/v1/google-search/google-ai-mode-search?q=what+should+I+look+for+in+a+first+road+bike&hl=en&gl=us" \ -H "X-API-Key: $API_KEY" ``` We haven't run this request for the article and there's no recorded AI Mode response yet, so we won't describe the response fields. Run it in the playground on the [AI Mode endpoint page](https://perceptlayer.com/apis/google-search/google-ai-mode-search) to see the real output. ### Which parameters does it take? The endpoint takes `q` and five optional parameters. Note the name: it's `q`, while the other Google Search endpoints, including the AI Overview one, use `query`. Types and lengths come from the endpoint definition; defaults aren't documented, so set language and location on every call. | Parameter | Type | Notes | | --- | --- | --- | | `q` | string, required | The question, up to 8,192 characters | | `hl` | string | Language, 2 characters, for example `en` | | `gl` | string | Country, 2 characters, for example `us` | | `google_domain` | string | Up to 100 characters, for example `google.co.uk` | | `uule` | string | Encoded location, up to 500 characters | | `follow_up_token` | string | Links a follow-up to the previous turn, up to 4,000 characters | The long `q` limit matters for AI Mode more than for classic search. People tend to ask it long, specific questions. A question with constraints ("a first road bike under 1,500 dollars for 40 km commutes on rough roads") fits easily. ## How do follow-up questions work? AI Mode is conversational: in Search you can ask a follow-up and the answer takes the earlier question into account. The endpoint models that with `follow_up_token`. The first call sends only `q`. Each later call sends the new question as `q` plus a token that identifies the conversation so far. Without the token, the follow-up is answered as a new, standalone question. The token comes from a response, and that's the part we can't show yet. Without a recording we can't name the field that carries it, say whether it changes every turn, or say how long it stays valid. Check these three things in the playground before you build a multi-turn flow: 1. Which field in the first response holds the token to send back. 2. Whether the second response returns a new token for the third turn, or the same one. 3. What a stale or malformed token returns: a fresh answer, or an `invalid_parameters` (422) error. Here's a Python helper that runs a conversation and leaves the token lookup to you. It's written to the parameters above; we haven't run it against the live API. ```python import os import requests URL = "https://api.perceptlayer.com/v1/google-search/google-ai-mode-search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def converse(questions, get_token, hl="en", gl="us"): """Ask questions in order, passing each turn's token to the next. get_token(response_json) returns the follow-up token, or None. Write it once you've seen a real response in the playground.""" token, turns = None, [] for q in questions: params = {"q": q, "hl": hl, "gl": gl} if token: params["follow_up_token"] = token r = requests.get(URL, headers=HEADERS, params=params, timeout=90) r.raise_for_status() body = r.json() turns.append({"q": q, "credits": r.headers.get("X-Credits-Used"), "body": body}) token = get_token(body) if not token: break return turns ``` The helper records `X-Credits-Used` for each turn, so your first run also confirms the cost per turn. It stops if a turn returns no token, rather than silently starting a new conversation. Wrap the request in retries for `rate_limited` and `temporarily_unavailable`, as in [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python). ## What does a conversation cost? Every call costs 1 credit on success, so a conversation costs one credit per turn. Failed calls cost nothing and return `X-Credits-Used: 0`; every success returns `X-Credits-Used` and `X-Credits-Remaining`. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Job | Calls | Credits | | --- | --- | --- | | One question | 1 | 1 | | A three-turn conversation | 3 | 3 | | 50 brand questions, daily, one turn each, 30 days | 1,500 | 1,500 | | 50 brand questions, daily, three turns each, 30 days | 4,500 | 4,500 | Worked example: 1,000 three-turn conversations are 1,000 × 3 × 1 credit = 3,000 credits. The 100 free credits you get once, after verifying an email address, cover 33 of them. The daily three-turn brand check, 4,500 credits a month, fits twice in a Starter pack of 10,000 credits with room to spare, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. The helper allows a 90-second client timeout, longer than the 60 seconds after which the API returns `timeout` (504). A request whose reply is lost to a client timeout may still have succeeded and been billed, because requests have no idempotency key. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) cover per-account limits. ## How is AI Mode different from AI Overviews? They're separate features and separate endpoints. An AI Overview is a summary Google adds above classic results on some searches, when its systems judge it helpful. AI Mode is a separate tab where every question gets a generated answer and you can ask follow-ups. Google says you can also jump from an AI Overview into an AI Mode conversation on mobile ( [Google](https://blog.google/products-and-platforms/products/search/ai-mode-ai-overviews-updates/), 2026). | | AI Overview | AI Mode | | --- | --- | --- | | Endpoint | [`/v1/google-search/search-ai-overview`](https://perceptlayer.com/apis/google-search/search-ai-overview) | [`/v1/google-search/google-ai-mode-search`](https://perceptlayer.com/apis/google-search/google-ai-mode-search) | | Query parameter | `query`, up to 2,048 characters | `q`, up to 8,192 characters | | Follow-ups | No | `follow_up_token` | | Appears on every query | No, only some | Every question gets an answer | | Credits | 1 per call | 1 per turn | For monitoring, use both. AI Overviews are what most searchers see on the classic results page; AI Mode is where people go for longer research questions. The [AI Overview API guide](https://perceptlayer.com/blog/google-ai-overview-api) covers that endpoint and why many queries return no overview. For classic results, see the [Google Search API guide](https://perceptlayer.com/blog/google-search-api-json). ## Where is AI Mode available? Google says AI Mode is available in over 200 countries and territories and has added languages through 2025 and 2026, including Hindi, Indonesian, Japanese, Korean and Brazilian Portuguese in one 2025 expansion ( [Google](https://blog.google/products-and-platforms/products/search/ai-mode-expands-languages-locations/), 2025). Set `hl` and `gl` to a market where it's offered. We haven't tested how the endpoint responds when `gl` points at a market without AI Mode, so include that case in your first playground runs if you track several countries. Keep `hl`, `gl` and `google_domain` fixed per market across runs; otherwise day-over-day changes in an answer mix market differences with real ones. ## Can an AI agent call AI Mode? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints` and `get_endpoint`, which are free catalogue lookups, and `call_endpoint`, which runs `google-search.google-ai-mode-search` and spends 1 credit per turn on success. An agent can ask AI Mode a question and read the answer as JSON. Treat the answer as one more source, not as ground truth: it's generated, so have the agent follow the linked pages for anything it will state as fact. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents), and error codes are in the [errors docs](https://docs.perceptlayer.com/errors). To see the response shape and find the follow-up token, [get a free API key](https://perceptlayer.com/signup) and run a question in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search). ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Does Google have an AI Mode API? No. AI Mode is a Google Search feature with no public API. Google's Gemini API and Vertex AI can ground a model's answer in search results, but they don't return the AI Mode answer a searcher sees. `GET /v1/google-search/google-ai-mode-search` returns that answer as JSON, at 1 credit per successful call. ### How do I ask a follow-up question? Send the follow-up as `q` with the `follow_up_token` from the previous turn's response. Without the token, the question is answered on its own. We haven't recorded a response yet, so check in the playground which field holds the token and whether it changes from turn to turn before you build a multi-turn flow. ### How much does an AI Mode conversation cost? Each turn is one call and costs 1 credit on success, so a three-turn conversation costs 3 credits. Failed calls cost nothing. Every account gets 100 free credits after verifying an email address, and prepaid packs start at 10,000 credits. The [pricing page](https://perceptlayer.com/pricing) has what credits cost. ### Why is the parameter q and not query? The AI Mode endpoint names its question parameter `q`, while the other Google Search endpoints, including the AI Overview endpoint, use `query`. Sending `query` to the AI Mode endpoint leaves `q` missing, which returns `invalid_parameters` (422) and costs nothing. `q` accepts up to 8,192 characters. ### What happens if a call fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`, and no credits are debited. Rate-limited (429) and temporarily unavailable (503) responses include a `Retry-After` header with the seconds to wait, and a `timeout` (504) error means the source didn't answer within 60 seconds. The [errors docs](https://docs.perceptlayer.com/errors) list every code. google ai mode google search ai answers follow-up questions json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Aug 2026 Perceptlayer 7 min read ## [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json) Call GET /v1/google-search/search for organic results as JSON at 1 credit a call. Parameters, a real recorded response and the cost in credits. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 14 Jul 2026 Perceptlayer 7 min read ## [Google AI Overview API: Get AI Overviews as JSON](https://perceptlayer.com/blog/google-ai-overview-api) Google has no AI Overview API. GET /v1/google-search/search-ai-overview takes a query, hl and gl, costs 1 credit, and suits daily keyword tracking. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 10 Nov 2026 Perceptlayer 7 min read ## [Google Search Scraper or API: What You Get](https://perceptlayer.com/blog/google-search-scraper-vs-api) A Google Search scraper parses every block on the page. Seven endpoints return them as JSON at 1 to 3 credits a call, with a recorded Berlin search. --- title: "Google Jobs API: Search Job Listings as JSON | Perceptlayer" description: "Google's Cloud Talent Solution searches your own jobs, not Google's jobs panel. GET /v1/google-jobs/search does, with date_posted, job_type and lrad filters." url: https://perceptlayer.com/blog/google-jobs-api-search --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Jobs API: Search Job Listings as JSON 16 Jul 2026 Perceptlayer 7 min read Google has two job-related APIs, and neither searches the jobs panel you see in Google Search. Cloud Talent Solution indexes and searches job listings you upload yourself, and the Indexing API tells Google about your own job pages. To search Google's jobs results as JSON, `GET /v1/google-jobs/search?q=software+engineer` takes a query plus location, radius, date and job-type filters, and costs 1 credit per successful call. ## Key takeaways - Google Cloud Talent Solution is for job boards, career sites, staffing agencies and applicant tracking systems searching their own job inventory; it doesn't return Google's aggregated listings. - Getting your jobs into Google Search is a separate route: `JobPosting` structured data on each job page, plus the Indexing API for job URLs. - `GET /v1/google-jobs/search` has no required parameter; `q` (up to 500 characters), `uule`, `lrad` (5, 10, 25, 50 or 100), `date_posted` and `job_type` shape the search, and `next_page_token` pages through it. - `date_posted=today` keeps a daily pull to new postings only; 20 roles in 10 cities, one page each, is 200 calls and 200 credits a day. - We haven't recorded a Google Jobs response, so check the fields in the playground before you write a parser. ## Is there an official Google Jobs API? Not one that searches Google's jobs results. Google's Cloud Talent Solution Job Search API is built for job boards, career site providers, staffing agencies and applicant tracking systems: you send it your own job and company records, it indexes them, and it returns ranked results for your own site's search box ( [Google Cloud, Job search basics](https://docs.cloud.google.com/talent-solution/job-search/v3/docs/basics), 2026). It's a search engine for your inventory, with features like commute-time search, and it searches only the listings you send it. The other side is publishing. Google's job search experience in Search is fed by sites that add `JobPosting` structured data to each job detail page, with required properties including `title`, `description`, `datePosted` and `hiringOrganization` ( [Google Search Central](https://developers.google.com/search/docs/appearance/structured-data/job-posting), 2026). Google's Indexing API lets those sites notify it when job pages are added or removed ( [Google Search Central Blog](https://developers.google.com/search/blog/2018/06/introducing-indexing-api-for-job), 2018). | You want to | Use | | --- | --- | | Search your own job inventory on your own site | Cloud Talent Solution | | Get your jobs into Google's job results | `JobPosting` markup and the Indexing API | | Read Google's job results for a query and place | [`/v1/google-jobs/search`](https://perceptlayer.com/apis/google-jobs/search) | If you run a job board, the first two are the right tools and they're free or priced by Google. If you need what Google shows a job seeker for "data analyst in Leeds", that's the [Google Jobs API](https://perceptlayer.com/apis/google-jobs). Data is collected from publicly available sources and returned as found at the time of the call. ## Which parameters does the search endpoint take? `GET /v1/google-jobs/search` takes ten optional parameters and requires none, though in practice you'll always send `q`. Types and allowed values below come from the endpoint definition. Defaults and units, such as whether `lrad` is in miles or kilometres, aren't documented, so test them in the playground. | Parameter | Type | Allowed values or notes | | --- | --- | --- | | `q` | string | The job search, up to 500 characters, for example `software engineer` | | `uule` | string | Encoded location, up to 500 characters | | `lrad` | integer | Search radius: `5`, `10`, `25`, `50`, `100` | | `date_posted` | string | `today`, `3days`, `week`, `month`, `1`, `3`, `7`, `14` | | `job_type` | string | `full_time`, `part_time`, `contract`, `internship`, `remote` | | `next_page_token` | string | Token for the next page of results | | `uds` | string | Up to 1,000 characters | | `hl` | string | Language, 2 characters | | `gl` | string | Country, 2 characters | | `google_domain` | string | Up to 50 characters, for example `google.co.uk` | `date_posted` takes both words and day counts: `week` and `7` look like the same window, and `14` has no word equivalent. Pick one form and keep it, so runs are comparable. Location can also go in `q` as text ("nurse jobs in Leeds"), the way a person types it into Google; `uule` pins it to a place regardless of wording. ## How do you search Google Jobs? Send a GET request with `q`. The request below is the endpoint's catalogue example. Put your key in the `X-API-Key` header; keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ```bash curl "https://api.perceptlayer.com/v1/google-jobs/search?q=software+engineer" \ -H "X-API-Key: $API_KEY" ``` A narrower search for full-time roles posted in the last three days, from Google's UK domain: ```bash curl "https://api.perceptlayer.com/v1/google-jobs/search?q=data+analyst+leeds&job_type=full_time&date_posted=3days&gl=gb&hl=en&google_domain=google.co.uk" \ -H "X-API-Key: $API_KEY" ``` We haven't run either request for this article and have no recorded response, so we won't list response fields here. The [Search endpoint page](https://perceptlayer.com/apis/google-jobs/search) has a playground that runs the call with your key and shows the real output. Look for the job title, company, location, posting age and the token for the next page. ## How do you page through results? Use `next_page_token`. The endpoint pages by token, not by page number: a response carries a token for the next page, and you send it back as `next_page_token` on the following call. Each page is one call and 1 credit. Since we haven't recorded a response, find the token's field name in the playground first. ```python import os import requests URL = "https://api.perceptlayer.com/v1/google-jobs/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def search_jobs(params, get_jobs, get_token, max_pages=3): """get_jobs(body) returns the list of jobs; get_token(body) the next-page token or None. Write both once you've seen a real response in the playground.""" jobs, token = [], None for _ in range(max_pages): p = dict(params, next_page_token=token) if token else params r = requests.get(URL, headers=HEADERS, params=p, timeout=60) if r.status_code == 404: break r.raise_for_status() body = r.json() jobs.extend(get_jobs(body)) token = get_token(body) if not token: break return jobs ``` This sketch hasn't been run against the live API. It treats `not_found` (404), which costs nothing, as the end of the results, and caps pages so a broad query can't run up credits. For retries on `rate_limited` and `temporarily_unavailable`, see [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python). ## What does a daily role-and-city pull cost? Every call costs 1 credit on success; failed calls cost nothing and return `X-Credits-Used: 0`. Each success returns `X-Credits-Used` and `X-Credits-Remaining`. For a daily pull, `date_posted=today` keeps each run to new postings, which keeps the page count low. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Job | Calls a day | Credits a month (30 days) | | --- | --- | --- | | 5 roles × 4 cities, 1 page each | 20 | 600 | | 20 roles × 10 cities, 1 page each | 200 | 6,000 | | 20 roles × 10 cities, up to 3 pages each | up to 600 | up to 18,000 | Worked example: 20 roles in 10 cities is 200 searches; at one page each, 200 × 1 credit = 200 credits a day, or 6,000 credits over 30 days. The 100 free credits you get on signup after verifying an email address cover five days of the first row. The second row, 6,000 credits a month, fits more than eight times in a Build pack of 50,000 credits, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. At the free tier's 1 request a second, 200 calls take a little over three minutes; paid packs run at 5 a second or more, per the [rate limits docs](https://docs.perceptlayer.com/rate-limits). ## What should you watch for in Google Jobs data? Duplicates and posting age. Google's jobs results aggregate postings from employer career sites and job boards, so the same role often appears through several sites, and the same posting can come back on consecutive days. Deduplicate on company, title and location rather than on a URL, as our guide to [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) explains. Posting age is often shown in relative terms ("3 days ago"), so convert it to a date at collection time and store both. Salary appears only when the posting includes it, and advertised ranges have their own biases; [salary data from job sites](https://perceptlayer.com/blog/salary-data-job-sites-bias) covers how to read them. For a research use of the same data, see [job posting data for labour-market research](https://perceptlayer.com/blog/job-posting-data-labour-market-research), and to compare with a single board, the [Indeed jobs API guide](https://perceptlayer.com/blog/indeed-jobs-api-json). ## Can an AI agent search Google Jobs? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints` and `get_endpoint`, which are free catalogue lookups, and `call_endpoint`, which runs `google-jobs.search` and spends 1 credit on success. An agent can turn "remote Python contract roles posted this week" into `q`, `job_type=contract` and `date_posted=week`. Our [job search agent tutorial](https://perceptlayer.com/blog/job-search-agent-live-postings) builds one that matches postings to a CV. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents), and error codes are in the [errors docs](https://docs.perceptlayer.com/errors). The other job sources in the catalogue are on the [jobs APIs](https://perceptlayer.com/verticals/jobs) page. To see the response, [get a free API key](https://perceptlayer.com/signup) and run a search for your role and city in the playground on the [Google Jobs API page](https://perceptlayer.com/apis/google-jobs). ## APIs in this post - [Google Jobs **1 credit per call** · 1 endpoint](https://perceptlayer.com/apis/google-jobs) ## Frequently asked questions ### Does Google have a jobs API? Google has Cloud Talent Solution, which indexes and searches job listings you upload for your own job board or careers site, and the Indexing API for notifying Google about your job pages. Neither returns Google's aggregated job results. `GET /v1/google-jobs/search` returns those as JSON, at 1 credit per successful call. ### How do I get my jobs to show up in Google's job search? Add `JobPosting` structured data to each job detail page, with the required properties such as `title`, `description`, `datePosted` and `hiringOrganization`, and use Google's Indexing API to notify it when job pages are added or removed. Google's Search Central documentation covers the markup rules. That's a publishing task, separate from reading results. ### How much does the Google Jobs endpoint cost? 1 credit per successful call; each further page is another call, and failed calls cost nothing. A daily pull of 20 roles in 10 cities at one page each is 6,000 credits a month. Every account gets 100 free credits after verifying an email address. The [pricing page](https://perceptlayer.com/pricing) has what credits cost. ### How do I filter by date or job type? Use `date_posted` with `today`, `3days`, `week`, `month` or a day count of `1`, `3`, `7` or `14`, and `job_type` with `full_time`, `part_time`, `contract`, `internship` or `remote`. `lrad` sets a radius of 5, 10, 25, 50 or 100 around the location in `uule` or the query. ### What happens if a search fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`, and nothing is debited. A search with no results can come back as `not_found` (404), which also costs nothing. Rate-limited (429) and temporarily unavailable (503) responses carry `Retry-After` with the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. google jobs job listings job search api labour market json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Google News Scraper or API: What You Get](https://perceptlayer.com/blog/google-news-scraper-vs-api) A Google News scraper vs a 1-credit news call: the recorded response with iso\_date, source and story\_token, and 4 credits per tracked query per day. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 27 Oct 2026 Perceptlayer 8 min read ## [News API Options: Google News and Search as JSON](https://perceptlayer.com/blog/news-api-comparison) Compare three news API routes: Google News returns headline, source.name, iso\_date and link per article; web search endpoints don't. 1 credit a query. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 11 Oct 2026 Perceptlayer 7 min read ## [SERP API: What It Returns and What a Query Costs](https://perceptlayer.com/blog/serp-api-explained) A SERP API returns a results page as JSON: organic results, People also ask, related searches, local results. Real responses from 3 engines, 1 credit each. --- title: "AI Shopping Agent: Compare Prices Across Marketplaces" description: "A Python AI shopping agent that searches Google Shopping, Walmart and AliExpress, normalises offers into one table and stops at a credit cap of 6 per question." url: https://perceptlayer.com/blog/ai-shopping-agent-compare-prices --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # AI Shopping Agent: Compare Prices Across Marketplaces 14 Jul 2026 Perceptlayer 7 min read An AI shopping agent takes a product name, searches several marketplaces, and returns the offers side by side in one table. This tutorial builds one in Python with Claude: it searches Google Shopping, Walmart and AliExpress through one generic `call_endpoint` tool, records each offer through a second tool with a fixed schema, and refuses any data call past a credit cap. A typical question costs 3 credits, one search per marketplace, with a hard cap of 6. ## Key takeaways - Three searches answer most questions: `/v1/google-shopping/search` ( `q`), `/v1/walmart/search` ( `query`) and `/v1/aliexpress/search` ( `query`, `page`, `sort`), 1 credit each. - The model normalises the offers itself through a `record_offer` tool with a fixed schema, so the code doesn't depend on three different response shapes. - The recorded Google Shopping response gives `extracted_price` as a number; the recorded Walmart response gives `price` with a separate `currency`. None of the three recorded search responses includes a shipping cost, so shipping stays empty unless the data states it. - The credit cap lives in code: every `call_endpoint` adds its `X-Credits-Used`, and calls past the cap return an error to the model instead of reaching the API. - 300 questions a month at 3 credits each is 900 credits. The 100 free credits cover your first 33 questions; after that, the Starter pack's 10,000 credits last 11 months at that rate. Claude's own tokens are billed separately by Anthropic. ## What does the agent do? You ask it "compare prices for an Instant Pot 6 quart". It runs one search per marketplace, reads the results, picks the offers that match the product, and records each one with its marketplace, title, price, currency, link and stock status. Your code then prints the offers sorted by price. If the first search comes back empty or ambiguous, the model may refine it once, but only within the cap. The design splits the work by what each side does well. The model reads messy, differently shaped JSON and decides which results are the same product. The code owns everything that must be exact: which endpoints the model may call, how many credits it may spend, and the final table. That split is why the agent needs only two tools, however many marketplaces you add. You need Python 3.10 or newer, `pip install anthropic requests`, an Anthropic API key in `ANTHROPIC_API_KEY`, and a Perceptlayer key in `API_KEY`. [Get a free API key](https://perceptlayer.com/signup); verifying your email gives you 100 free credits on signup. ## Step 1: Which endpoints does the agent search? One search endpoint per marketplace, each 1 credit per successful call. Their required parameters differ, which is why the model needs to know them: AliExpress search requires `page` and `sort` as well as the query. The table lists what the agent sends. | Marketplace | Endpoint ID | Path | Required parameters | | --- | --- | --- | --- | | Google Shopping | `google-shopping.search` | `/v1/google-shopping/search` | `q` (up to 500 characters) | | Walmart | `walmart.search` | `/v1/walmart/search` | `query` (up to 500 characters) | | AliExpress | `aliexpress.search` | `/v1/aliexpress/search` | `query`, `page`, `sort` ( `default`, `orders`, `price_asc`, `price_desc`) | Google Shopping results come from many shops, so one search already compares sellers. In the recorded response for `q=iphone 15&gl=us&hl=en`, the first two results are from "Walmart - Wireless Source" at `extracted_price` 393.73 and "Best Buy" at 441: ```json { "shopping_results": [ { "position": 1, "title": "Apple iPhone 15", "source": "Walmart - Wireless Source", "rating": 4.7, "price": "$393.73", "extracted_price": 393.73, "link": "https://www.google.com/shopping/product/4263606017411565992", … }, { "position": 2, "title": "Apple iPhone 15 128GB", "source": "Best Buy", "price": "$441.00", "extracted_price": 441, … } ], … } ``` Walmart's recorded search for `air fryer` returns `results` with a numeric `price`, a `currency`, `seller_name`, `availability_status` and `product_page_url`, plus a `sponsored` flag that's `true` on both of the first two results: ```json { "data": { "search_metadata": { "query": "air fryer", "total_items": 72, … }, "results": [ { "us_item_id": "14678059894", "title": "Chefman Air Fryer 1500W, 6 Quart, 4 Functions with Touch Controls, Stainless Steel", "price": 59.98, "currency": "USD", "seller_name": "Walmart.com", "availability_status": "IN_STOCK", "product_page_url": "https://www.walmart.com/ip/14678059894", "sponsored": true, … }, … ], … } } ``` AliExpress's recorded search for `query=wireless earbuds&page=1&sort=orders` returns `results` with a `price` object that carries its own `currency`, plus an `original_price` and `discount_percent` for the advertised discount: ```json { "data": { "query": "wireless earbuds", "page_size": 60, "total_results": 16557, "results": [ { "product_id": "3256812408115438", "title": "HTC NE79 TWS Bluetooth 6.0 Earbuds AI Translation 135 Languages ENC Noise Cancelling HiFi Stereo Headphones with LED Display", "url": "https://www.aliexpress.com/item/3256812408115438.html", "price": { "amount": 4.35, "currency": "USD", "formatted": "US $4.35" }, "original_price": { "amount": 17.31, "currency": "USD", "formatted": "US $17.31" }, "discount_percent": 74, "selling_points": ["Fastest delivery in 6 days"], "is_sponsored": false, … }, … ] } } ``` `selling_points` mentions delivery time, not a shipping cost, so `shipping` stays null for these rows too. The [Google Shopping API](https://perceptlayer.com/apis/google-shopping), [Walmart API](https://perceptlayer.com/apis/walmart) and [AliExpress API](https://perceptlayer.com/apis/aliexpress) pages list every parameter. ## Step 2: How do you define the two tools? `call_endpoint` takes an endpoint ID and its parameters, the same shape as the `call_endpoint` tool on Perceptlayer's MCP server, so the model's behaviour carries over if you later move it to an MCP client. `record_offer` takes one normalised offer. Its schema is the table you want at the end, so the model's job is to fill it in. ```python TOOLS = [ { "name": "call_endpoint", "description": ( "Run one marketplace search and return its JSON. Allowed endpoints: " "google-shopping.search (params: q, optional gl, hl), " "walmart.search (params: query, optional sort, min_price, max_price), " "aliexpress.search (params: query, page, sort; sort is one of " "default, orders, price_asc, price_desc). Each successful call costs 1 credit." ), "input_schema": { "type": "object", "properties": { "endpoint": {"type": "string", "enum": ["google-shopping.search", "walmart.search", "aliexpress.search"]}, "params": {"type": "object"}, }, "required": ["endpoint", "params"], }, }, { "name": "record_offer", "description": ( "Record one offer that matches the requested product. Use only values present " "in the search results. Leave shipping and in_stock null unless the data states them." ), "input_schema": { "type": "object", "properties": { "marketplace": {"type": "string", "enum": ["google_shopping", "walmart", "aliexpress"]}, "seller": {"type": ["string", "null"]}, "title": {"type": "string"}, "price": {"type": "number"}, "currency": {"type": ["string", "null"]}, "shipping": {"type": ["number", "null"]}, "in_stock": {"type": ["boolean", "null"]}, "link": {"type": "string"}, }, "required": ["marketplace", "title", "price", "link"], }, }, ] ``` The `enum` on `endpoint` means the model can only name the three searches. The instruction to leave `shipping` null unless the data states it is the honest part: none of the recorded search responses carry a shipping cost, and a model asked to fill every field will otherwise guess. ## Step 3: How do you run the endpoints under a credit cap? Map each endpoint ID to its path, call the API, and keep a running total from the `X-Credits-Used` header. Before each call, check the total against the cap; past it, return an error the model can read instead of calling the API. Failed calls return `X-Credits-Used: 0`, so they don't count against the cap. ```python import json import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PATHS = { "google-shopping.search": "/v1/google-shopping/search", "walmart.search": "/v1/walmart/search", "aliexpress.search": "/v1/aliexpress/search", } CREDIT_CAP = 6 class Budget: def __init__(self, cap): self.cap, self.spent = cap, 0 def call(self, endpoint, params): if endpoint not in PATHS: return f"Error unknown_endpoint: use one of {', '.join(PATHS)}.", True if self.spent >= self.cap: return f"Error credit_cap: {self.spent} of {self.cap} credits used. Stop searching and record the offers you have.", True r = requests.get(BASE + PATHS[endpoint], params=params, headers=HEADERS, timeout=90) if r.status_code != 200: err = r.json()["error"] return f"Error {err['code']}: {err['message']}", True self.spent += int(r.headers["X-Credits-Used"]) return r.text[:60000], False ``` The response is cut at 60,000 characters to keep one large result from filling the model's context; the cut drops the end of the response. Error results start `Error :` with the API's own message, which tells the model what went wrong and what to do next. Anthropic's tool use docs recommend exactly that: return failures as a `tool_result` with `is_error` set, and make the message say what went wrong and what to try ( [Claude Docs](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls), 2026). ## Step 4: How do you write the agent loop? A standard tool-use loop. Send the question with both tools, run every `tool_use` block Claude returns, send all the results back in one user message, and repeat until Claude stops calling tools. `call_endpoint` goes through the budget; `record_offer` appends to a list and returns "recorded". ```python import anthropic SYSTEM = ( "You compare prices for one product across Google Shopping, Walmart and AliExpress. " "Search each marketplace once with call_endpoint. Refine a search only if its results " "don't contain the product. Then call record_offer for each matching offer, up to 3 per " "marketplace, using only values from the results. Skip accessories and different models. " "Finish with one sentence naming the cheapest matching offer." ) def run_agent(question): client = anthropic.Anthropic() budget, offers = Budget(CREDIT_CAP), [] messages = [{"role": "user", "content": question}] while True: response = client.messages.create( model="claude-opus-5-5", max_tokens=16000, system=SYSTEM, tools=TOOLS, messages=messages, ) if response.stop_reason == "refusal": raise RuntimeError("The model declined this request.") messages.append({"role": "assistant", "content": response.content}) calls = [b for b in response.content if b.type == "tool_use"] if not calls: break results = [] for call in calls: if call.name == "call_endpoint": text, is_error = budget.call(call.input["endpoint"], call.input.get("params", {})) else: offers.append(call.input) text, is_error = "recorded", False results.append({"type": "tool_result", "tool_use_id": call.id, "content": text, "is_error": is_error}) messages.append({"role": "user", "content": results}) summary = "".join(b.text for b in response.content if b.type == "text") return offers, summary, budget.spent ``` Two details keep it correct. All tool results for one turn go back in a single user message, one per `tool_use` block and matched by `tool_use_id`, as Anthropic's [parallel tool use docs](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use) require (2026). And the loop ends when a response contains no `tool_use` blocks, so a model that hits the cap simply records what it has and answers. ## Step 5: How do you print the comparison? Sort the recorded offers by price and print one row each. Add the shipping cost to the price only when it's known, and say so in the column header, so nobody reads an item price as a delivered price. ```python def print_table(offers): rows = sorted(offers, key=lambda o: o["price"] + (o.get("shipping") or 0)) print(f"{'marketplace':16} {'price':>9} {'ship':>6} {'cur':4} {'stock':6} title") for o in rows: ship = "" if o.get("shipping") is None else f"{o['shipping']:.2f}" stock = {True: "yes", False: "no"}.get(o.get("in_stock"), "?") print(f"{o['marketplace']:16} {o['price']:>9.2f} {ship:>6} {(o.get('currency') or ''):4} {stock:6} {o['title'][:60]}") if __name__ == "__main__": import sys offers, summary, spent = run_agent(" ".join(sys.argv[1:]) or "Compare prices for a 6 quart air fryer") print_table(offers) print(summary) print(f"Perceptlayer credits used: {spent}") ``` Run it with `python shop.py "Instant Pot Vortex 4 quart air fryer"`. You get up to nine rows, three per marketplace, sorted by price, then the model's one-sentence answer and the credits the run spent. An empty `ship` column means the source didn't state shipping, and `?` under stock means the same for availability. We ran this code with the model and API calls mocked, which checks the loop, the cap and the table; we haven't run it live against both APIs for this article, so expect to adjust the prompt after your first real runs. ## What should you check before trusting the table? Three things, all visible in the recorded data. First, currencies: Walmart returns a `currency` field, while Google Shopping's `extracted_price` is a bare number, with the currency only visible in the `price` text ( `$393.73` in the recording, searched with `gl=us`). AliExpress's `price` carries its own `currency` ( `USD` in the recording). Only compare rows with the same currency. Second, sponsored results: both of the first two Walmart results in the recording are `sponsored: true`, so the first result isn't necessarily the cheapest or the most relevant. Third, matching. "6 quart air fryer" matches many products, and the model decides which offers are the same item. Ask for a specific model name or number when you need like-for-like prices, and spot-check the links. For tracking prices over time rather than answering one question, the [price tracking agent tutorial](https://perceptlayer.com/blog/price-tracking-agent-python) stores results per day. ## What does each question cost? Each successful search is 1 credit, and `record_offer` costs nothing because it never calls the API. A question that searches each marketplace once is 3 credits; one that refines all three searches hits the cap at 6. Failed calls are free and don't count toward the cap. | Workload | Credits per question | Credits a month | | --- | --- | --- | | 300 questions, one search per marketplace | 3 | 300 × 3 = 900 | | 300 questions, every search refined (cap) | 6 | 300 × 6 = 1,800 | | 3,000 questions, one search per marketplace | 3 | 3,000 × 3 = 9,000 | The 100 free credits cover 33 questions at 3 credits each, enough to test the agent. The Starter pack's 10,000 covers the first row for 11 months, or the third row for one. These are Perceptlayer credits only; Claude's tokens are billed by Anthropic. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what packs cost. For the same idea through an MCP client instead of your own loop, the [AI agents (MCP) docs](https://docs.perceptlayer.com/ai-agents) show the server setup, and [MCP vs function calling](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) explains what changes. ## APIs in this post - [Google Shopping **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/google-shopping) - [Walmart **1 credit per call** · 11 endpoints](https://perceptlayer.com/apis/walmart) - [AliExpress **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/aliexpress) ## Frequently asked questions ### How much does one price comparison cost? Three credits when the agent searches each marketplace once, and never more than the 6-credit cap, because the code refuses calls past it. Recording offers costs nothing. Failed calls cost nothing either. Claude's tokens are billed separately by Anthropic, so the full cost of a question is the credits plus the model usage. ### Why not normalise the responses in code? You can: the recorded responses show `extracted_price` on Google Shopping, `price` on Walmart and `price.amount` on AliExpress. Letting the model fill a fixed `record_offer` schema avoids writing and maintaining three parsers, and lets it skip accessories and different models, which a parser can't judge. The code still controls the output shape, because the tool schema is the table. ### Does the agent include shipping costs? Only when a source states them. None of the recorded search responses include a shipping cost, so the prompt tells the model to leave `shipping` null rather than guess. AliExpress has a separate `/v1/aliexpress/product-shipping` endpoint with `product_id` and `country`; adding it as a fourth allowed endpoint costs 1 credit per product checked. ### Can I run this agent through MCP instead? Yes. Add Perceptlayer's MCP server to an MCP client and give the model the same system prompt; its `call_endpoint` tool takes the same endpoint IDs and parameters. What you lose is the hard cap, since the client, not your code, runs the calls. Keep your own loop when the cap has to hold. ### What happens when the cap is reached? The next `call_endpoint` returns an error result, `Error credit_cap`, without calling the API, and the model is told to record the offers it already has. The run ends with a partial table rather than overspending. Raise `CREDIT_CAP` if your questions routinely need refined searches. ai agents shopping price comparison tool calling python ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 18 Jul 2026 Updated 10 Nov 2026 Perceptlayer 11 min read ## [LangChain Custom Tool for Live Web Data: Python Tutorial](https://perceptlayer.com/blog/langchain-custom-tool-web-data) Build a LangChain tool in Python for Google Search and News: typed arguments, retries on 429, 502 and 503 only, and a per-run credit cap. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. --- title: "Google AI Overview API: Get AI Overviews as JSON" description: "Google has no AI Overview API. GET /v1/google-search/search-ai-overview takes a query, hl and gl, costs 1 credit, and suits daily keyword tracking." url: https://perceptlayer.com/blog/google-ai-overview-api --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google AI Overview API: Get AI Overviews as JSON 14 Jul 2026 Perceptlayer 7 min read Google offers no API for AI Overviews. Its Search Console reports count how often your own site appears in them, but nothing returns the overview for a query you choose. `GET /v1/google-search/search-ai-overview?query=...` does that: you pass a query, plus `hl`, `gl`, `google_domain` or `uule` for language and location, and it costs 1 credit per successful call. Expect many queries to have no overview at all, because Google shows one only on some searches. ## Key takeaways - Google has no AI Overview API; Search Console reports impressions in AI features for your own site, and its dedicated generative AI reports were still rolling out to a subset of sites in June 2026. - `GET /v1/google-search/search-ai-overview` needs only `query` (up to 2,048 characters) and takes `hl`, `gl`, `google_domain` and `uule` to set language and location. - AI Overviews appear on a minority of searches: Pew found them on 18% of Google searches in March 2025, 8% of one- or two-word queries and 53% of queries of 10 words or more. - Each call costs 1 credit on success; tracking 200 keywords daily is 200 × 30 = 6,000 credits a month. - We haven't recorded an AI Overview response yet, so this guide shows the request and parameters but no response fields. ## Is there an official Google AI Overview API? No. Google's documentation for site owners says pages that appear in AI features such as AI Overviews and AI Mode are counted in Search Console's Performance report, under the Web search type ( [Google Search Central](https://developers.google.com/search/docs/appearance/ai-features), 2026). In June 2026 Google added dedicated generative AI performance reports, rolling out to a subset of websites first ( [Google Search Central Blog](https://developers.google.com/search/blog/2026/06/gen-ai-performance-reports), 2026). Both are the right tools for one question: how often does my site show up? They're free, first-party and cover every query Google counts. They can't tell you what an overview says, which sources it cites, or whether a competitor appears for your keywords. For that you need the overview itself for a query you choose, which is what the [Search Ai Overview endpoint](https://perceptlayer.com/apis/google-search/search-ai-overview) returns. Data is collected from publicly available sources and returned as found at the time of the call. | Question | Search Console | `/v1/google-search/search-ai-overview` | | --- | --- | --- | | How often does my site appear in AI features? | Yes, impressions and clicks | No | | What does the overview say for a given query? | No | Yes | | Which sites are cited for my keywords? | Only my own | Whatever the overview shows | | Cost | Free | 1 credit per successful call | ## How do you request an AI Overview? Send a GET request with `query`. Add `hl` and `gl`, both two-letter codes, so the overview matches the language and country you're tracking. The request below uses the endpoint's catalogue example. Put your key in the `X-API-Key` header; keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. ```bash curl "https://api.perceptlayer.com/v1/google-search/search-ai-overview?query=how+does+photosynthesis+work&hl=en&gl=us" \ -H "X-API-Key: $API_KEY" ``` We haven't run this request for the article and have no recorded response, so we won't describe the response fields here. Run it in the playground on the [Search Ai Overview page](https://perceptlayer.com/apis/google-search/search-ai-overview) to see the real output before you write a parser. ### Which parameters does the endpoint take? The endpoint takes one required parameter and four optional ones. Types and lengths come from the endpoint definition. Nothing else, such as defaults, is documented, so set the language and location you need on every call rather than relying on one. | Parameter | Type | Notes | | --- | --- | --- | | `query` | string, required | Up to 2,048 characters | | `hl` | string | Interface language, 2 characters, for example `en` | | `gl` | string | Country, 2 characters, for example `us` | | `google_domain` | string | Up to 100 characters, for example `google.co.uk` | | `uule` | string | Encoded location, up to 500 characters | `gl` sets the country; `uule` narrows to a place, which matters for local queries such as "emergency plumber near me". The [Google Search API guide](https://perceptlayer.com/blog/google-search-api-json) covers `uule` and the other six Google Search endpoints, so this article doesn't repeat them. ## Why do many queries return no AI Overview? Because Google shows an overview only when its systems decide it helps. Google's help pages say AI Overviews appear when generative AI can be especially helpful, such as when you want to understand information from a range of sources ( [Google Search Help](https://support.google.com/websearch/answer/14901683), 2026). After early problems, Google said in 2024 it had added triggering restrictions for queries where overviews weren't proving helpful ( [Google](https://blog.google/products-and-platforms/products/search/ai-overviews-update-may-2024/), 2024). Query length is the clearest pattern in public data. In Pew Research Center's analysis of 900 US adults' browsing in March 2025, 18% of Google searches produced an AI summary. Only 8% of one- or two-word searches did, against 53% of searches with 10 words or more, and questions and full sentences triggered summaries more often ( [Pew Research Center](https://www.pewresearch.org/data-labs/2025/05/23/what-web-browsing-data-tells-us-about-how-ai-appears-online/), 2025). Those are US figures from 2025; the share changes as Google expands the feature. So a keyword list of short head terms will mostly come back empty, while long, question-shaped queries will mostly return an overview. Plan for both outcomes in your code. We haven't recorded a query without an overview, so we can't show whether one comes back as a successful, billed response with no overview in it, or as a `not_found` (404) error, which costs nothing. Budget as if every call costs 1 credit, and check the response on the first runs. ## How do you track AI Overviews for a keyword set? Run each keyword once a day with fixed `hl` and `gl`, store the raw JSON with the date, and compare day over day. Storing the raw response matters more than usual here: overview text changes between runs, and you can't go back for yesterday's. Here's a minimal daily job in Python. ```python import datetime import json import os import pathlib import requests URL = "https://api.perceptlayer.com/v1/google-search/search-ai-overview" HEADERS = {"X-API-Key": os.environ["API_KEY"]} KEYWORDS = ["how does photosynthesis work", "how long to boil an egg for a soft yolk"] day = datetime.date.today().isoformat() out = pathlib.Path("overviews") / day out.mkdir(parents=True, exist_ok=True) for i, kw in enumerate(KEYWORDS): r = requests.get(URL, headers=HEADERS, params={"query": kw, "hl": "en", "gl": "us"}, timeout=60) record = {"query": kw, "status": r.status_code, "credits": r.headers.get("X-Credits-Used")} if r.ok: record["body"] = r.json() elif r.status_code != 404: record["error"] = r.json().get("error", {}).get("code") (out / f"{i:04d}.json").write_text(json.dumps(record)) ``` We haven't run this script against the live API. It stores the status and the `X-Credits-Used` header with each result, which answers the empty-overview billing question on your first run. It treats a 404 as "no data" and keeps any other error code. For retries on `rate_limited` and `temporarily_unavailable`, see [handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python). For what to do with stored results, [search result data for SEO monitoring](https://perceptlayer.com/blog/search-result-data-seo-monitoring) covers which SERP fields to track. ## What does tracking AI Overviews cost? Each call costs 1 credit on success; failed calls cost nothing and return `X-Credits-Used: 0`. Every success returns `X-Credits-Used` and `X-Credits-Remaining`, so the daily job can log spend from the headers. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Job | Calls a month | Credits a month | | --- | --- | --- | | 30 keywords, daily, one market | 900 | 900 | | 200 keywords, daily, one market | 6,000 | 6,000 | | 200 keywords, daily, three markets | 18,000 | 18,000 | | 200 keywords, weekly, one market | about 867 | about 867 | The 100 free credits you get once, after verifying an email address, cover the first 3 days of the first row (3 × 30 = 90), enough to test before you buy. Every row needs a pack for ongoing use. A Starter pack of 10,000 credits covers the 30-keyword job for 11 months (10,000 ÷ 900) and weekly tracking of 200 keywords, about 867 credits a month, for 11 months too. The 200-keyword daily job, 6,000 credits a month, fits a Build pack of 50,000 credits for eight months, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Free accounts run at 1 request a second, so 200 calls take a little over three minutes; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list paid rates. If you also want the classic results for the same keywords, that's a second call to the [Google Search endpoint](https://perceptlayer.com/apis/google-search/search) at 1 credit each. For Google's conversational answers with follow-ups, see the [Google AI Mode API guide](https://perceptlayer.com/blog/google-ai-mode-api). ## Can an AI agent fetch AI Overviews? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints` and `get_endpoint` for free catalogue lookups and `call_endpoint` to run the endpoint, spending 1 credit on success. An agent can look up `google-search.search-ai-overview`, read its parameters and call it with a query. An overview is Google's generated summary, not a source. If an agent uses it, have it follow the cited pages rather than quoting the overview as fact. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents), and errors come back with a JSON `code` listed in the [errors docs](https://docs.perceptlayer.com/errors). To see a real response, [get a free API key](https://perceptlayer.com/signup) and run your own keyword in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search). ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### Does Google have an API for AI Overviews? No. Google reports your own site's impressions in AI features through Search Console, under the Web search type, and added dedicated generative AI reports in 2026 for a subset of sites. Neither returns the overview for a query you choose. `GET /v1/google-search/search-ai-overview` takes a query and returns the overview as JSON, at 1 credit per successful call. ### How much does the AI Overview endpoint cost? 1 credit per successful call; failed calls cost nothing. Tracking 200 keywords daily is about 6,000 credits a month, and every account gets 100 free credits after verifying an email address. Prepaid packs start at 10,000 credits and last 12 months. The [pricing page](https://perceptlayer.com/pricing) has what credits cost. ### Why did my query return no AI Overview? Google shows overviews only when its systems judge them helpful, mostly for longer and question-shaped queries. Pew found summaries on 8% of one- or two-word searches and 53% of searches of 10 words or more in March 2025. Language and country matter too, so set `hl` and `gl` to the market you're tracking. ### Can I target a country or city? Yes. `gl` takes a two-letter country code and `hl` a two-letter language code. `google_domain` sets the Google domain, such as `google.co.uk`, and `uule` takes an encoded location for city-level results. Keep these fixed across runs, or day-over-day changes will mix market differences with real ones. ### What happens if a call fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`, and nothing is debited. A missing `query` returns `invalid_parameters` (422). Rate-limited (429) and temporarily unavailable (503) responses carry a `Retry-After` header with the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. google ai overview ai overviews google search seo serp json ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 6 Aug 2026 Perceptlayer 7 min read ## [Google Search API: Get Search Results as JSON](https://perceptlayer.com/blog/google-search-api-json) Call GET /v1/google-search/search for organic results as JSON at 1 credit a call. Parameters, a real recorded response and the cost in credits. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 7 min read ## [Rank Tracking API: Track Google Positions as JSON](https://perceptlayer.com/blog/rank-tracking-api) Build a daily rank check from one Google search call per keyword and location: read organic\_results position and link, store them, 1 credit a check. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Oct 2026 Perceptlayer 8 min read ## [Scrape Google Search Results with Python](https://perceptlayer.com/blog/scrape-google-search-results-python) Get Google results in Python as JSON: organic\_results, related\_questions and related\_searches from one call to /v1/google-search/search, at 1 credit a page. --- title: "AI Agent API Cost Control: Cap Web Data Spend | Perceptlayer" description: "Cap an agent's web data spend per run: credit arithmetic for 8 and 20 calls per task, a Python budget wrapper, and why failed calls cost 0 credits." url: https://perceptlayer.com/blog/ai-agent-web-data-costs --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # AI Agent API Cost Control: Cap Web Data Spend 12 Jul 2026 Perceptlayer 7 min read AI agent API cost control comes down to two numbers: the credits one call costs and the maximum number of calls one run may make. On Perceptlayer a successful call costs the credits shown on its endpoint, which is 1 credit for nearly all of them, and a failed call costs nothing. Multiply calls per run by runs per month, add a hard cap in your own code, and the worst case is known before the agent starts. ## Key takeaways - Worst-case spend per run is `max_calls × credits_per_call`. With a cap of 20 calls at 1 credit, no run can cost more than 20 credits. - A typical run of 8 calls uses 8 credits, and 500 tasks a month use 4,000 credits. Capped at 20 calls, the same 500 tasks use at most 10,000 credits, exactly the Starter pack. [Pricing](https://perceptlayer.com/pricing) shows what credits cost. - Failed calls return `X-Credits-Used: 0`, so retries after an error or a rate limit don't add to the credit bill. - Enforce the cap in the code that executes tool calls, not in the prompt. A model can ignore an instruction to stop; a wrapper that raises an exception can't be ignored. - Web data credits are separate from model token costs. This article covers only the data side. ## Why do agent data costs drift? Agents decide at run time how many calls a task needs, so the bill depends on model behaviour as much as on traffic. A model that keeps refining a query or loops on an empty result makes more calls than you planned. Per-call pricing is fine. The unbounded loop is the problem, and the fix is a ceiling the loop can't pass. Prepaid credits help because the account itself has a ceiling. The service is prepaid: purchased credits last 12 months, with no subscription and no seats. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited, so a runaway agent stops at the balance you loaded. A per-run cap keeps one run from eating that whole balance. ## How do you calculate credits per agent task? Count the calls one task needs, multiply by the credits per call, and keep two figures: the typical case and the capped worst case. For endpoints that cost 1 credit, calls and credits are the same number. Check the cost shown on each endpoint you give the agent, because the cap should be in credits if any endpoint costs more than 1. Take an example agent that answers a research question. Assume it typically makes 8 calls per task and you cap it at 20. These are example figures for the arithmetic, not measurements. Per run, that's 8 credits typical and 20 credits worst case. | Pack | Credits | Typical runs (8 credits each) | Capped runs (20 credits each) | | --- | --- | --- | --- | | Free credits | 100, once | 12 | 5 | | Starter | 10,000 | 1,250 | 500 | | Build | 50,000 | 6,250 | 2,500 | | Growth | 200,000 | 25,000 | 10,000 | | Scale | 1,000,000 | 125,000 | 50,000 | What a pack costs is on the [pricing page](https://perceptlayer.com/pricing), and the credit arithmetic doesn't change with it. Run counts follow from the credits. The 100 free credits cover 12 typical runs (100 ÷ 8, rounded down) or 5 capped runs (100 ÷ 20). The Starter pack's 10,000 credits cover 1,250 typical runs or 500 capped runs. At 500 tasks a month, typical spend is 500 × 8 = 4,000 credits, and the cap bounds the worst case at 500 × 20 = 10,000 credits, which equals the Starter pack. ## Why don't failed calls count against the budget? A failed call returns an HTTP status, a JSON error body and the header `X-Credits-Used: 0`. Only a successful response debits credits. So the retries an agent makes after a `rate_limited` (429, the status [RFC 6585](https://www.rfc-editor.org/rfc/rfc6585#section-4) defines for too many requests) or `source_error` (502) response don't change the credit total. Take a run that makes 8 successful calls and hits 3 errors along the way: 8 credits, not 11. The three failed attempts cost nothing in credits. They still cost time and model tokens, so they should count toward a separate attempt cap. That second cap matters. An agent that retries an `invalid_parameters` (422) response forever will never be billed for it, and it will never finish either. See the [error reference](https://docs.perceptlayer.com/errors) and the [rate limit docs](https://docs.perceptlayer.com/rate-limits). ## How do you build AI agent API cost control in code? Put the cap in the function that executes the agent's tool calls. The wrapper below counts credits and attempts, refuses to send a request that would pass either limit, and raises `BudgetExceeded` so the agent loop stops and returns what it has. It counts each successful call at the endpoint's listed cost, which you pass in as `credits_per_call`. ```python import os import requests class BudgetExceeded(Exception): pass class CallBudget: def __init__(self, max_credits, max_attempts, credits_per_call=1): self.max_credits = max_credits self.max_attempts = max_attempts self.credits_per_call = credits_per_call self.spent = 0 self.attempts = 0 def call(self, url, params=None, method="GET"): if self.spent + self.credits_per_call > self.max_credits: raise BudgetExceeded(f"credit cap reached: {self.spent}/{self.max_credits}") if self.attempts >= self.max_attempts: raise BudgetExceeded(f"attempt cap reached: {self.attempts}/{self.max_attempts}") self.attempts += 1 try: response = requests.request( method, url, params=params, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ) except requests.RequestException as error: raise BudgetExceeded(f"request failed, stopping the run: {error}") from error if response.status_code == 402: raise BudgetExceeded("account is out of credits") if response.ok: self.spent += self.credits_per_call return response ``` Use one `CallBudget` per run and hand its `call` method to the agent as the only way to reach the API. ```python budget = CallBudget(max_credits=20, max_attempts=30) url = os.environ["ENDPOINT_URL"] # copied from the endpoint's page try: response = budget.call(url, params={"q": "example"}) print(response.status_code, f"{budget.spent} credits spent") except BudgetExceeded as stop: print("stopping the run:", stop) ``` A timeout or connection error counts as an attempt and ends the run cleanly instead of crashing the loop. The credit count is a local estimate: it adds the endpoint's listed cost for each successful response and doesn't read anything from the response. Treat it as a ceiling check, and compare it with the `X-Credits-Remaining` header, which every successful response carries with your balance after the call. Set `max_attempts` above `max_credits` so a few free failures can retry, and keep the gap small. Here 20 credits allow 20 successful calls, and the 10 extra attempts allow up to 10 failures before the run stops. See also the [requests docs](https://docs.perceptlayer.com/requests). ## What changes when the agent calls through MCP? The MCP server at `https://perceptlayer.com/mcp` exposes three tools, `search_endpoints`, `get_endpoint` and `call_endpoint`. `search_endpoints` and `get_endpoint` only look things up in the catalogue and cost nothing, so `call_endpoint` is the one tool that needs a budget check. A successful `call_endpoint` costs the credits shown on its endpoint, failed calls cost nothing, and its result reports the credits used and the balance remaining. The [MCP docs](https://docs.perceptlayer.com/ai-agents) cover the tools. The cap needs your own agent loop, because the loop is where tool calls get executed. Route every `call_endpoint` the model requests through a budget check, and let the loop stop when it raises. The sketch below assumes your MCP client gives you a function `send_call_endpoint(arguments)` that runs the tool and returns its result; `credits_per_call` is the cost listed on the endpoint. ```python class McpBudget: def __init__(self, max_credits, credits_per_call=1): self.max_credits = max_credits self.credits_per_call = credits_per_call self.spent = 0 def call_endpoint(self, send_call_endpoint, arguments): if self.spent + self.credits_per_call > self.max_credits: raise BudgetExceeded(f"credit cap reached: {self.spent}/{self.max_credits}") try: result = send_call_endpoint(arguments) except Exception as error: raise BudgetExceeded(f"tool call failed, stopping the run: {error}") from error if not getattr(result, "isError", False): self.spent += self.credits_per_call return result ``` MCP marks a failed tool call with `isError` in its result (see the [MCP tools specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)), which is what the wrapper checks before counting credits. In the loop, when the model asks for `call_endpoint`, call `budget.call_endpoint(...)` instead of the client directly. Catch `BudgetExceeded` outside the loop and return what the agent has so far. As with the HTTP wrapper, the credit count is a local estimate, not a figure read from the response. The related walkthrough, [Claude MCP Web Search: Live Results for an Agent](https://perceptlayer.com/blog/claude-agent-live-search-mcp), shows the tools in use. ## How should you size a balance for an agent? Size the balance for the capped worst case, then watch the typical case. Take runs per month × cap × credits per call. For 500 runs capped at 20 calls, that's 10,000 credits, which the Starter pack's 10,000 credits cover exactly. For 5,000 runs, it's 100,000 credits at the cap and 40,000 at 8 calls per run. One Build pack (50,000 credits) covers the typical 40,000. One Growth pack (200,000 credits) covers the 100,000-credit worst case with room to spare. A Scale pack holds 1,000,000 credits, so it only pays off if you'll use most of it within the 12 months credits last. See [pricing](https://perceptlayer.com/pricing) for what each pack costs. Start on the free credits. When you verify an email address you get 100 free credits once, with no credit card, which is enough to measure your real calls per task with a cap in place. The [credits docs](https://docs.perceptlayer.com/credits) and the [pricing page](https://perceptlayer.com/pricing) have the details and the packs. [Get a free API key](https://perceptlayer.com/signup), add the wrapper above, and run 5 tasks (at most 100 credits at the cap) before you decide on a pack. More agent guides are in the [AI agents category](https://perceptlayer.com/blog/category/ai-agents). ## Frequently asked questions ### Do failed calls use credits? No. A failed call returns an HTTP status, a JSON error body with a `code`, `message` and `request_id`, and the header `X-Credits-Used: 0`. Only a successful response debits credits. Failed attempts still take time, so cap attempts as well as credits, and see the [error docs](https://docs.perceptlayer.com/errors) for each code. ### How much does an agent run cost at 20 calls? At 1 credit per call, a run capped at 20 calls uses at most 20 credits (20 calls × 1 credit). The 500-run month in this article is at most 10,000 credits, and the [pricing page](https://perceptlayer.com/pricing) shows what those credits cost. Calls to the rare endpoint that costs more than 1 credit change the maths. ### Should the budget live in the prompt or in code? In code. A prompt that says "make at most 20 calls" is a request the model can miss after a long context or a confusing result. A wrapper that counts credits and raises an exception at the cap is deterministic. Use the prompt to tell the agent what to do when the wrapper stops it. ### What happens when my credits run out mid-run? The API returns `insufficient_credits` with HTTP status 402, and nothing is debited for that call. In the example wrapper, a 402 raises `BudgetExceeded`, which ends the run cleanly. Purchased credits last 12 months, and there is no subscription. ### Does the free tier cover testing an agent? Yes. Every account gets 100 free credits after verifying an email address, with no credit card. At a cap of 20 calls per run, that's 5 capped runs, or 12 runs at 8 calls each, which is enough to measure real calls per task before buying a pack. ai agents cost control credits mcp budgeting ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 23 Aug 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [MCP Server for Web Scraping: Tools Agents Can Call](https://perceptlayer.com/blog/mcp-server-for-web-scraping) An MCP server gives an agent three tools to find, inspect and call web endpoints. Use the scraper for uncatalogued pages, structured endpoints for the rest. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 24 Jul 2026 Perceptlayer 7 min read ## [Scheduled AI Agent Runs: Budgeting Credits per Run](https://perceptlayer.com/blog/scheduled-agent-credit-budget) Cap an agent at N calls per run with a Python ledger that reads X-Credits-Used, plus the math for hourly and daily runs on 100 credits on signup. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. --- title: "Job Search Agent: Match Postings to a CV with Live Data" description: "Build an AI job search agent in Python: Indeed postings, Glassdoor pay and ratings, ranked by CV skill match locally. About 12 credits a run." url: https://perceptlayer.com/blog/job-search-agent-live-postings --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Job Search Agent: Match Postings to a CV with Live Data 12 Jul 2026 Updated 12 Aug 2026 Perceptlayer 9 min read An AI job search agent needs two things: live postings and a way to score them against your CV. Pull postings from the Indeed jobs endpoint, add Glassdoor pay and ratings for the top companies, and do the CV matching on your own machine so the CV never reaches an API. The script below does that in about 12 credits per run. ## Key takeaways - One `GET /v1/indeed/jobs` call returns postings with `title`, `company.name`, `description_html`, `date_published` and `apply_url`; it costs 1 credit. - The CV is read from a local file and matched against posting text in Python. Only a job title, a location and company names go to the API. - Glassdoor `companies-search` and `salaries` add a rating and, where a row is found, a total-pay median per shortlisted company, at 1 credit each. - A run with 5 shortlisted companies costs 1 + 1 + (5 × 2) = 12 credits, so a daily run for 30 days is 360 credits. The 100 free credits on signup cover the first 8 runs. ## How does the agent work? The agent is a short pipeline, not a chat loop. It reads a local CV, searches Indeed for your target title, scores each posting by how many of the skills it mentions you already have, and then enriches only the best few with Glassdoor data. Ranking is plain Python, which keeps it cheap and repeatable. An LLM is optional. You can add one at the end to write a summary of the shortlist, but the matching doesn't need it, and leaving it out is what keeps the CV local by construction. We'll come back to that trade-off below. | Step | Where it runs | Calls | Credits | | --- | --- | --- | --- | | Read `cv.txt`, extract skills | Your machine | 0 | 0 | | Search postings | `GET /v1/indeed/jobs` | 1 | 1 | | Baseline pay for the title | `GET /v1/glassdoor/salaries` | 1 | 1 | | Match and rank postings | Your machine | 0 | 0 | | Company rating, per company | `GET /v1/glassdoor/companies-search` | up to 5 | up to 5 | | Company pay, per company | `GET /v1/glassdoor/salaries` with `employer_id` | up to 5 | up to 5 | ## What do you need before you start? You need Python 3, the `requests` library, and an API key. Keys start with `sk_live_` and go in the `X-API-Key` header; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the details. A free account gets 100 credits after email verification, and [signing up](https://perceptlayer.com/signup) takes no credit card. Create a working folder with three files: `cv.txt` (your CV as plain text), `profile.json` (what you're searching for) and `job_agent.py` (below). Export the key in your shell: ```bash export API_KEY=sk_live_your_key_here pip install requests ``` The profile holds only search parameters, nothing personal: ```json { "title": "software engineer", "location": "Berlin", "country": "DE", "job_type": "full_time" } ``` ## Step 1: How do you extract skills from a CV locally? Match the CV against a skills vocabulary you control. Open the file, lowercase it, and keep every vocabulary term that appears as a whole word. No network call is involved, and the result is a plain Python set you can print and check. A vocabulary is less clever than a language model, but it's predictable. If a skill isn't found, you add it to the list and rerun. The same vocabulary is used on the posting side, so the two sets are comparable. ```python import json import os import re import time from html.parser import HTMLParser import requests BASE = "https://api.perceptlayer.com" SKILLS = [ "python", "javascript", "typescript", "golang", "rust", "java", "sql", "postgresql", "mysql", "redis", "kafka", "docker", "kubernetes", "terraform", "aws", "gcp", "azure", "react", "node.js", "fastapi", "django", "graphql", "ci/cd", "machine learning", "pytorch", ] def has_term(term, text): pattern = r"(?

The AI orchestration of your wildest imagination.

…", "attributes": ["Collaboration with Sales", "Go"], "date_published": "2026-08-12 05:00:00", "apply_url": "https://jobs.ashbyhq.com/n8n/…" } ], "pagination": { "next_cursor": "…", "has_more": true }, "metadata": { "total_results": 20, "timestamp": "2026-10-21T13:25:37.233649Z" } } } ``` Two details matter for the agent. The posting text is HTML in `description_html`, so it needs stripping before matching. And `pagination.has_more` with `next_cursor` tells you more postings exist; for the cursor loop pattern, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). The [Indeed Jobs API article](https://perceptlayer.com/blog/indeed-jobs-api-json) covers the endpoint in more depth. ## Step 3: How do you score postings against the CV? Score each posting by coverage: of the vocabulary skills a posting mentions, what fraction does your CV have? A posting that mentions five skills and matches four scores 0.8. Postings that mention no vocabulary skills are dropped, because there's nothing to compare. Missing skills are kept, so the output shows what to learn or leave out. Coverage beats a raw count here. A long posting that lists twenty technologies would otherwise outrank a focused one you fit better. ```python class TextExtractor(HTMLParser): def __init__(self): super().__init__() self.parts = [] def handle_data(self, data): self.parts.append(data) def html_to_text(html): parser = TextExtractor() parser.feed(html or "") return " ".join(parser.parts) def score_postings(jobs, cv_skills): scored = [] for job in jobs: text = f"{job['title']} {' '.join(job.get('attributes', []))} {html_to_text(job.get('description_html'))}" wanted = skills_in(text) if not wanted: continue matched = wanted & cv_skills scored.append({ "id": job["id"], "title": job["title"], "company": job["company"]["name"], "remote": job["location"].get("is_remote", False), "published": job["date_published"], "apply_url": job["apply_url"], "score": round(len(matched) / len(wanted), 2), "matched": sorted(matched), "missing": sorted(wanted - cv_skills), }) scored.sort(key=lambda j: (j["score"], j["published"]), reverse=True) return scored ``` Ties break on `date_published`, so between two equal fits the newer posting comes first. Everything in this step runs on your machine against text you already downloaded. ## Step 4: How do you add Glassdoor pay and ratings? Use two Glassdoor endpoints. [`companies-search`](https://perceptlayer.com/apis/glassdoor/companies-search) takes a company name and returns candidates with an `id`, `rating`, `review_count` and `salary_count`. [`salaries`](https://perceptlayer.com/apis/glassdoor/salaries) takes a `job_title` and an optional `employer_id`, and returns pay percentiles. Each call costs 1 credit, so enrich only the shortlist. A recorded `companies-search` response for the query `Stripe`, trimmed: ```json { "success": true, "data": { "query": "Stripe", "companies": [ { "id": 671932, "name": "Stripe", "rating": 3.8, "review_count": 1619, "salary_count": 4702, "job_count": 3 }, { "id": 5554043, "name": "Stripe OLT", "rating": 4, "review_count": 24, "salary_count": 38, "job_count": 0 } ], "page": 1, "total_pages": 5, "has_more": true } } ``` The search returns near-matches ("Stripe OLT" next to "Stripe"), so the code accepts only an exact, case-insensitive name match and otherwise skips the company. A wrong company is worse than a missing one. The recorded `salaries` response, called with only `job_title=software engineer`, has a `salaries` list with one row per employer, each carrying `total_pay` percentiles ( `p10` to `p90`), `currency` and `pay_period`. It also has an `estimate` block with `total_pay` percentiles for the title across the whole country ( `location` was `United States` in our recording). We recorded the unfiltered call only. The call with `employer_id` isn't in a recording, so the code makes no assumption about what it returns: it reads every field defensively with `.get` and uses a row only if the row's `employer.id` equals the company id from the search. If no such row comes back, `company_pay` returns the rating and review count with `p50` set to `None`, and the output shows a dash for pay. The title-level `estimate` is a separate call, made once by `title_baseline`. ```python def title_baseline(title): data = call("/v1/glassdoor/salaries", job_title=title) est = data.get("estimate") or {} return { "currency": est.get("currency"), "location": est.get("location"), "p50": (est.get("total_pay") or {}).get("p50"), } def company_pay(name, title): found = call("/v1/glassdoor/companies-search", query=name)["companies"] match = next((c for c in found if c["name"].lower() == name.lower()), None) if match is None: return None data = call("/v1/glassdoor/salaries", job_title=title, employer_id=match["id"]) rows = data.get("salaries") or [] row = next( (s for s in rows if (s.get("employer") or {}).get("id") == match["id"]), None, ) total = (row or {}).get("total_pay") or {} return { "rating": match.get("rating"), "reviews": match.get("review_count"), "currency": (row or {}).get("currency"), "p50": total.get("p50"), } ``` One caveat for non-US searches: the recorded baseline is in USD for the United States, while a Berlin posting is likely paid in euros. The agent keeps the `currency` next to every figure and never converts. Treat a USD median as context for a Berlin posting, not a salary offer. ## Step 5: How do you put it together and run it? The `main` function loads the profile and the CV skills, fetches and ranks postings, then enriches the top five distinct companies. The company cache means a firm with three open roles is looked up once. The script prints a table and writes the full result to `results.json`, including `apply_url` for each posting. ```python def main(): with open("profile.json", encoding="utf-8") as f: profile = json.load(f) cv_skills = load_cv_skills() print("CV skills found:", ", ".join(sorted(cv_skills))) ranked = score_postings(fetch_postings(profile), cv_skills) baseline = title_baseline(profile["title"]) pay_cache = {} for job in ranked[:5]: name = job["company"] if name not in pay_cache: pay_cache[name] = company_pay(name, profile["title"]) job["glassdoor"] = pay_cache[name] with open("results.json", "w", encoding="utf-8") as f: json.dump({"baseline": baseline, "postings": ranked}, f, indent=2) for job in ranked[:10]: g = job.get("glassdoor") or {} pay = f"{g.get('p50'):,.0f} {g.get('currency')}" if g.get("p50") else "-" print(f"{job['score']:.2f} {job['title'][:38]:38} {job['company'][:18]:18} {g.get('rating', '-')} {pay}") print(f"credits spent: {credits_spent}") if __name__ == "__main__": main() ``` Run `python job_agent.py`. The output is one line per posting: match score, title, company, Glassdoor rating and median total pay where found, then the credits spent. The `credits spent` figure comes from summing the `X-Credits-Used` header on each response, so it matches what the call actually cost. The loop makes at most 12 calls, one after another. Free accounts get 1 request a second, so if you hit a rate-limit error, add a short `time.sleep` between calls; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) explain how limits are counted. If you later parallelise the company lookups, see [concurrent API requests under rate limits](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit). ## What does the agent cost to run? A run costs 1 credit for the Indeed search, 1 for the title baseline, and 2 credits per shortlisted company, so five companies is 1 + 1 + (5 × 2) = 12 credits. Failed calls cost nothing. A daily run for a month is 30 × 12 = 360 credits. The 100 free credits cover the first 8 daily runs; after that, the Starter pack's 10,000 credits cover a year of them (12 × 360 = 4,320). | Setup | Calls per run | Credits per run | Credits per 30 days | | --- | --- | --- | --- | | Search and baseline only | 2 | 2 | 60 | | Shortlist of 5 companies | 12 | 12 | 360 | | Shortlist of 10 companies | 22 | 22 | 660 | Every response carries `X-Credits-Remaining`, so you can print the balance at the end of a run if you want a running total. The [credits docs](https://docs.perceptlayer.com/credits) describe how debits work, and [pricing](https://perceptlayer.com/pricing) lists what credits cost if you outgrow the free tier. One honest caveat: requests have no idempotency key, so a timeout can hide a call that succeeded and was billed. The script doesn't retry timeouts, which keeps a flaky network from doubling a debit. ## Does the CV really stay local? Yes, as written. The CV is read with `open()`, matched in-process and never put in a request. The API sees four things: a job title, a location and country, a job type, and company names pulled from public postings. All four are search terms, not documents. That boundary holds only while the matching stays in Python. Hand the CV to a hosted LLM to "improve the match" and the text leaves your machine, so decide that deliberately. If you want a model to write the shortlist summary, send it `results.json` (postings, scores, skill names), not `cv.txt`. A local model avoids the question entirely. Your search terms also say something: a title plus a city reveals where you want to work. That's the whole disclosure, and it's the same one a job board search makes. ## When should you use an LLM or MCP instead? Use a script when the steps are fixed, as they are here. Use an agent loop when the next call depends on what came back, for example "search again with a broader title if fewer than ten postings match". The same endpoints are available as tools over MCP at `https://perceptlayer.com/mcp`, with `search_endpoints`, `get_endpoint` and `call_endpoint`. The [AI agents docs](https://docs.perceptlayer.com/ai-agents) show how to add the server, and [MCP vs function calling](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) compares the two ways to wire tools. The [Model Context Protocol site](https://modelcontextprotocol.io) has the protocol itself. For agent spend limits, see [capping web data spend](https://perceptlayer.com/blog/ai-agent-web-data-costs). Whichever you choose, the same privacy rule applies: the model sees what you put in its context. Keep the CV out of that context and the agent stays as local as this script. The [LangChain custom tool tutorial](https://perceptlayer.com/blog/langchain-custom-tool-web-data) shows the tool-wrapping pattern if you go that way. To try the first call before running anything, open the [Indeed API page](https://perceptlayer.com/apis/indeed), run `/v1/indeed/jobs` in the playground with your title and city, then [get a free API key](https://perceptlayer.com/signup) and run the script. ## APIs in this post - [Indeed **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/indeed) - [Glassdoor **1 credit per call** · 13 endpoints](https://perceptlayer.com/apis/glassdoor) ## Frequently asked questions ### Can I use Glassdoor's job listings instead of Indeed's? Yes. The `GET /v1/glassdoor/jobs-search` endpoint takes a `keyword` and an optional `cursor`, and costs 1 credit. Indeed's endpoint adds `location`, `country`, `job_type` and `sort` filters, which is why this tutorial uses it for postings and keeps Glassdoor for pay and ratings. See the [Glassdoor API page](https://perceptlayer.com/apis/glassdoor). ### How many credits does one search cost? One Indeed search is 1 credit, and each Glassdoor call is 1 credit. The tutorial's default run, with five shortlisted companies, is 12 credits. A free account gets 100 credits once, on signup, so that's 8 runs with 4 credits to spare. Failed calls return `X-Credits-Used: 0`. ### What happens when I run out of credits mid-run? The next call returns `insufficient_credits` with HTTP 402 and nothing more is debited; the service is prepaid, with no automatic top-up. The `call` helper in this tutorial raises with that code. The [errors docs](https://docs.perceptlayer.com/errors) list every code and what to do about each. ### Is the salary data an offer estimate? No. The `salaries` endpoint returns percentiles ( `p10` to `p90`) with a currency and pay period on each row, as found at the time of the call. A median for a title or company is context for a negotiation, not a prediction of what a specific employer will offer you. ### Can I run this on a schedule? Yes. The script has no interactive steps, so cron or a CI scheduler can run it. Add a check that skips postings whose `id` appeared in the previous `results.json`, so a daily run only surfaces new matches. Mind the request rate: free accounts get 1 request a second. ai agents job search indeed glassdoor python ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 11 Sept 2026 Perceptlayer 8 min read ## [Build a Price Tracking Agent in Python with Live Data](https://perceptlayer.com/blog/price-tracking-agent-python) A Python price tracker that checks Google Shopping and eBay once per product per run, stores history in SQLite, flags drops and costs 2 credits a product. --- title: "Zoopla API: UK Listings and Sold Prices as JSON" description: "Search Zoopla listings by outcode, pull sold prices and a property's valuation history by UPRN, at 1 credit per call. Parameters, cURL and a sweep cost." url: https://perceptlayer.com/blog/zoopla-api-property-listings-sold-prices --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Zoopla API: UK Listings and Sold Prices as JSON 12 Jul 2026 Perceptlayer 7 min read Zoopla's own API access is for its member agents and approved partners, not for anyone with a key. To read Zoopla listings, sold prices and valuation history as JSON, the Perceptlayer Zoopla API has 17 GET endpoints at 1 credit per successful call. Resolve a place with `/v1/zoopla/locations`, search it with `/v1/zoopla/search`, then pull sold records with `/v1/zoopla/sold` and a single property's history by its UPRN. ## Key takeaways - `GET /v1/zoopla/search` needs only `location` (up to 32 characters, such as an outcode like `sw1a`) and takes `section` ( `for-sale`, `to-rent` or `new-homes`) and `page`. - Sold prices come from `GET /v1/zoopla/sold` by `location`, filtered with `from_last_sale_date` and `to_last_sale_date` and paged with `first` and `after`. - Nine endpoints work on one property by its UPRN, including `property`, `property-valuation-history` and `property-nearby-sold`. `addresses` takes a postcode and is the place to start when you only have an address. - Every Zoopla endpoint costs 1 credit on success. A sweep of 20 outcodes with 5 search pages and 4 sold pages each is 20 × 10 = 200 credits. - England and Wales sold prices are free from HM Land Registry under the Open Government Licence. Use Zoopla data for what the register lacks: live listings, agents and valuation history. ## Is there an official Zoopla API? Not one you can sign up for and use to read listings. The APIs Zoopla documents are for its members' products, such as Premium Listings and Featured Properties, and its authentication guide describes OAuth 2.0 client credentials that Zoopla issues and revokes through your technical contact ( [Zoopla tech documentation](https://support.zoopla.co.uk/hc/en-gb/articles/360015656838-Authentication-Tech-Documentation), 2023). The site's [terms of use](https://www.zoopla.co.uk/terms/) say you may not use its content for commercial purposes without a licence from Zoopla, and they name developing an AI system as one such use (2026). That gives you two routes. If you're building a commercial product on Zoopla's data, such as a valuation tool you sell, ask Zoopla for a licence: it's the only route that gives you the rights to redistribute. If you need structured Zoopla data for analysis, research or an internal tool, the [Zoopla API](https://perceptlayer.com/apis/zoopla) returns it as JSON with one key. Whether your use is allowed still depends on Zoopla's terms and UK law, and Perceptlayer can't advise on that. ## What can the Zoopla API return? Seventeen endpoints cover three jobs: finding listings in an area, reading sold prices and market statistics, and looking up one property by its Unique Property Reference Number (UPRN). Every endpoint is a GET request, returns JSON and costs 1 credit when it succeeds. The table groups them by what you pass in, which is the order you'll call them. | You have | Endpoint | Required | Credits | | --- | --- | --- | --- | | A place name or outcode | [`/v1/zoopla/locations`](https://perceptlayer.com/apis/zoopla/locations) | `query` | 1 | | A location | `/v1/zoopla/search`, `/v1/zoopla/search-count` | `location` | 1 | | A location | `/v1/zoopla/sold` | `location` | 1 | | Location paths | `/v1/zoopla/sold-summary` | `paths[]` | 1 | | An outcode | [`/v1/zoopla/market-insights`](https://perceptlayer.com/apis/zoopla/market-insights) | `outcode` | 1 | | A geography | [`/v1/zoopla/market-activity`](https://perceptlayer.com/apis/zoopla/market-activity) | `geo` | 1 | | A postcode | [`/v1/zoopla/addresses`](https://perceptlayer.com/apis/zoopla/addresses) | `postcode` | 1 | | A UPRN | `property`, `property-valuation-history`, `property-nearby-sold`, `property-similar`, `property-demand`, `property-agents`, `market-local-stats` | `uprn` | 1 each | | A listing ID | [`/v1/zoopla/listing`](https://perceptlayer.com/apis/zoopla/listing) | `listingId` | 1 | | A branch ID | [`/v1/zoopla/agent`](https://perceptlayer.com/apis/zoopla/agent) | `branchId` | 1 | The UPRN endpoints are the part a listings search can't give you. A UPRN identifies the property rather than a listing, so it stays the same across sales and lettings, and it is the key to join Zoopla records to your own address data. ## How do you search Zoopla listings? Call `GET /v1/zoopla/search` with a `location` and, optionally, a `section` and a `page`. The location can be an outcode such as `sw1a`; if you start from a place name, call `/v1/zoopla/locations` with it first and use what it returns. `section` picks the listing type: `for-sale`, `to-rent` or `new-homes`. This request asks for the first page of homes for sale in SW1A: ```bash curl "https://api.perceptlayer.com/v1/zoopla/search?location=sw1a§ion=for-sale&page=1" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_` and go in the `X-API-Key` header; [get a free API key](https://perceptlayer.com/signup) and see the [authentication docs](https://docs.perceptlayer.com/authentication) for the rest. These are all the search parameters. Nothing else about them is documented, so don't rely on a default sort or page size. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `location` | string | yes | Up to 32 characters, such as an outcode | | `section` | string | no | `for-sale`, `to-rent` or `new-homes` | | `page` | integer | no | Results page | `GET /v1/zoopla/search-count` takes the same `location` and `section` and returns the count for that search, which tells you how many pages to expect before you spend credits on them. We don't have a recorded Zoopla response to show here, so run the call in the playground on the [Zoopla API page](https://perceptlayer.com/apis/zoopla) to see the fields for yourself. ## How do you get Zoopla sold prices? Use `GET /v1/zoopla/sold` for sold records in an area. It takes a required `location` and four optional parameters: `from_last_sale_date` and `to_last_sale_date` bound the sale dates, and `first` and `after` page through the results. The names follow the usual cursor pattern, where `first` is how many records to return and `after` is the cursor from the previous page. Check the response in the playground for where the cursor appears. ```bash curl "https://api.perceptlayer.com/v1/zoopla/sold?location=sw1a&first=50" \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `location` | string | yes | Up to 32 characters | | `first` | integer | no | Records per page | | `after` | string | no | Cursor from the previous page, up to 255 characters | | `from_last_sale_date` | string | no | Earliest last sale date | | `to_last_sale_date` | string | no | Latest last sale date | For an aggregate rather than a list, `GET /v1/zoopla/sold-summary` takes one or more `paths[]` values, each up to 120 characters, with optional `section` and `location`. `GET /v1/zoopla/market-activity` gives market activity for a `geo` (up to 32 characters), with `range_months` from `THREE_MONTHS` to `ALL` and `house_type` of `ALL`, `DETACHED`, `SEMI_DETACHED`, `FLAT` or `TERRACED`. ## How do you get a property's valuation history by UPRN? Pass the UPRN to `GET /v1/zoopla/property-valuation-history`. Every per-property endpoint takes the same single `uprn` parameter, so once you have it, the property record, its valuation history, nearby sold homes, similar homes, demand and agents are each one more call. If you only have an address, call `GET /v1/zoopla/addresses` with the postcode to find the property among the addresses listed there. ```bash curl "https://api.perceptlayer.com/v1/zoopla/addresses?postcode=SW1A%202EP" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/zoopla/property-valuation-history?uprn=100023337105" \ -H "X-API-Key: $API_KEY" ``` `property-agents` also takes an optional `transaction_type` of `SALE` or `RENT`. Note the space in the postcode is URL-encoded as `%20`. A short Python loop runs the same lookups for a list of UPRNs and saves each response as it comes, so a failure halfway through doesn't lose the rest: ```python import json import os import requests BASE = "https://api.perceptlayer.com/v1/zoopla" HEADERS = {"X-API-Key": os.environ["API_KEY"]} UPRNS = ["100023337105"] # your list for uprn in UPRNS: for endpoint in ("property", "property-valuation-history", "property-nearby-sold"): r = requests.get(f"{BASE}/{endpoint}", params={"uprn": uprn}, headers=HEADERS, timeout=60) if r.status_code != 200: print(uprn, endpoint, r.status_code, r.json()["error"]["code"]) continue with open(f"{uprn}-{endpoint}.json", "w") as f: json.dump(r.json(), f) print(uprn, endpoint, "credits used:", r.headers["X-Credits-Used"]) ``` We haven't run this script against the live API for this article. Each successful call prints `credits used: 1`. A failed one prints its error code, such as `not_found` or `invalid_parameters`, and costs nothing. The [errors docs](https://docs.perceptlayer.com/errors) list every code. ## What does a postcode sweep cost? Every Zoopla endpoint costs 1 credit per successful call, so the cost of a sweep is the number of calls. Take 20 outcodes. For each one, a `search-count` call, 5 pages of `search` and 4 pages of `sold` is 10 calls, so 20 × 10 = 200 credits. Valuing 300 of the properties you found, with `property-valuation-history` and `property-nearby-sold` for each, adds 300 × 2 = 600 credits. | Step | Calls | Credits | | --- | --- | --- | | `search-count`, one per outcode | 20 | 20 | | `search`, 5 pages per outcode | 100 | 100 | | `sold`, 4 pages per outcode | 80 | 80 | | Two UPRN lookups for 300 properties | 600 | 600 | | **Total** | **800** | **800** | That's 800 credits. The 100 free credits every verified account gets once cover the 10 calls per outcode for 10 of the 20 outcodes; the full sweep needs a pack. Run it weekly and it's 800 × 4 = 3,200 credits a month, within the Starter pack's 10,000. Failed calls return `X-Credits-Used: 0`, so retries after an error don't add to it. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what packs cost. ## When is HM Land Registry data the better source? For completed sale prices in England and Wales, start with HM Land Registry. Its Price Paid Data covers residential sales in England and Wales sold for value and lodged for registration, is updated monthly, and is free to use for commercial or non-commercial purposes under the Open Government Licence ( [HM Land Registry](https://www.gov.uk/guidance/about-the-price-paid-data), 2026). It is the register, so it is the authoritative price. It has gaps a listing site fills. The two most recent months are incomplete because registration lags the sale, and it records the price paid, not the asking price, the agent or how a valuation moved over time. Zoopla's endpoints add live listings, asking prices, agents and valuation history by UPRN. A common split is Land Registry for the sold price and Zoopla for everything around it. For Scotland and Northern Ireland, which the Price Paid Data doesn't cover, listing sites matter more. The [Rightmove API](https://perceptlayer.com/blog/rightmove-api-property-data) covers the other large UK portal if you want a second source for the same areas. To try it now, run a `search` for your own outcode in the playground on the [Zoopla API page](https://perceptlayer.com/apis/zoopla). ## APIs in this post - [Zoopla **1 credit per call** · 17 endpoints](https://perceptlayer.com/apis/zoopla) ## Frequently asked questions ### How much does the Zoopla API cost? Each of the 17 Zoopla endpoints costs 1 credit per successful call, and failed calls cost nothing. Every verified account gets 100 free credits on signup, enough for 100 searches or property lookups. Beyond that, credits come in prepaid packs from 10,000 credits, and the [pricing page](https://perceptlayer.com/pricing) has what they cost. ### Do I need a Zoopla developer account? No. One Perceptlayer key in the `X-API-Key` header works for Zoopla and every other API in the catalogue. Zoopla's own credentials are issued to its members and partners for their integrations. If you need a licence to republish Zoopla's data commercially, that has to come from Zoopla itself. ### What is a UPRN and where do I get one? A UPRN is a Unique Property Reference Number, an identifier for an addressable property rather than for one listing of it. Nine Zoopla endpoints take it as `uprn`. If you start from an address, call `/v1/zoopla/addresses` with the postcode and pick the property from the addresses it returns. ### Does the sold endpoint cover all UK sales? It returns the sold records Zoopla shows for the location you ask for, as found at the time of the call. For the authoritative record of England and Wales sale prices, use HM Land Registry's free Price Paid Data, and treat Zoopla's sold data as a way to join prices to listings, agents and valuation history. ### What happens if I send a location Zoopla doesn't recognise? The call fails with an error code and a message in a JSON body, and `X-Credits-Used` is 0, so a bad location costs nothing. Values over the length limits, such as a `location` longer than 32 characters, fail with `invalid_parameters` (422). The [errors docs](https://docs.perceptlayer.com/errors) list every code. zoopla uk property sold prices real estate uprn ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Aug 2026 Perceptlayer 8 min read ## [Rightmove API: Get UK Property Listings and Sold Prices](https://perceptlayer.com/blog/rightmove-api-property-data) Pull Rightmove UK listings, sold prices and agents as JSON with 8 endpoints at 1 credit per call, with a real London search response and cURL examples. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. --- title: "Google Finance API: Stock Quotes and History as JSON" description: "Six Google Finance endpoints return quotes, history, intraday, markets and indices as JSON at 1 credit a call. Parameters, a recorded AAPL quote and costs." url: https://perceptlayer.com/blog/google-finance-api-stock-quotes --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Finance API: Stock Quotes and History as JSON 10 Jul 2026 Perceptlayer 8 min read Google Finance is a website and a spreadsheet function, not a JSON API, but Perceptlayer's Google Finance API returns data from the Google Finance site as JSON. Six endpoints cover search, quotes, history, intraday, markets and indices. Each successful call costs 1 credit, and failed calls cost nothing. Send a ticker in `symbol`, add `exchange` when it's ambiguous, and read the result. ## Key takeaways - `GET /v1/google-finance/quote` needs only `symbol`; adding `exchange=NASDAQ` pins the listing. The recorded AAPL response carries `summary`, `key_stats`, `about` and `financials`. - All six endpoints cost 1 credit per successful call. Failed calls return `X-Credits-Used: 0`. - `historical` takes `interval` (daily, weekly or monthly) plus `range`, `start_date` and `end_date`. - `markets` takes `trend` (gainers, losers, most-active and more) and `index_market` (americas, europe-middle-east-africa, asia-pacific). - Data is returned as found at the time of the call. It is not a trading feed. ## Is there an official Google Finance API? Not one we can point you to. Google offers the [Google Finance](https://www.google.com/finance/) website and a [`GOOGLEFINANCE` function in Google Sheets](https://support.google.com/docs/answer/3093281), and neither page documents an HTTP API for developers. Developers who want quotes as JSON either use a market data vendor or collect the page data some other way. This API takes the second route: the [Google Finance API](https://perceptlayer.com/apis/google-finance) on Perceptlayer returns what the site shows, collected from publicly available sources, as JSON with named fields. That framing matters for what you build. A market data vendor's licensed feed is the right choice for execution, order routing or anything where a stale price costs money. This API fits research, dashboards, screening, enrichment and agents that need a fact-check on a ticker. Treat it as a reference reading, not a tick stream. ## Which Google Finance endpoints are there? The Google Finance API has six endpoints under `https://api.perceptlayer.com/v1/google-finance/`: `search`, `quote`, `historical`, `intraday`, `markets` and `indices`. All are `GET` requests and each successful call costs 1 credit. Pick by the question you're asking: what is this ticker, how has it moved, or what is the market doing. | Path | What it returns | Required | Credits | | --- | --- | --- | --- | | `/v1/google-finance/search` | Search results for a company or ticker | `q` | 1 | | `/v1/google-finance/quote` | Quote | `symbol` | 1 | | `/v1/google-finance/historical` | Historical | `symbol` | 1 | | `/v1/google-finance/intraday` | Intraday | `symbol` | 1 | | `/v1/google-finance/markets` | Markets | none | 1 | | `/v1/google-finance/indices` | Indices | none | 1 | A typical flow starts with [`search`](https://perceptlayer.com/apis/google-finance/search) to look up a company name, then calls `quote` for the snapshot and `historical` or `intraday` for the series. `markets` and `indices` need no symbol at all, so they suit a morning overview. The first step looks like this: ```bash curl "https://api.perceptlayer.com/v1/google-finance/search?q=AAPL&hl=en&gl=us" \ -H "X-API-Key: $API_KEY" ``` We have no recorded `search` response, so run it in the playground to confirm which fields identify the symbol and exchange. Then pass those two values as `symbol` and `exchange` to `quote`, as in the next section. ## How do I get a stock quote as JSON? Call `quote` with a `symbol` and, ideally, an `exchange`. One request returns the price summary, key statistics, a company profile and financial statements for the ticker. Authentication is the `X-API-Key` header; [get a free API key](https://perceptlayer.com/signup) if you don't have one, and see [authentication](https://docs.perceptlayer.com/authentication) for the details. ```bash curl "https://api.perceptlayer.com/v1/google-finance/quote?symbol=AAPL&exchange=NASDAQ" \ -H "X-API-Key: $API_KEY" ``` ### What does the quote response contain? This is an excerpt of a recorded response for that request, trimmed with `…`. The prices are the values at the time we recorded it, so yours will differ. ```json { "quote": { "summary": { "name": "Apple Inc", "symbol": "AAPL", "exchange": "NASDAQ", "current_price": 347.725, "price_change": -0.49, "percent_change": -0.14, "currency": "USD", "market": { "trading": "Extended Hours", "price": "$347.20", "extracted_price": 347.2001, "price_movement": { "percentage": 0.15, "movement": "Down" } } }, "key_stats": { "previous_close": "$348.22", "day_range": "$345.75 - $351.73", "year_range": "$243.42 - $351.73", "market_cap": "5.07T USD", "avg_volume": "39.13M", "pe_ratio": 39.86, "dividend_yield": "0.31%", "primary_exchange": "NASDAQ" }, "about": { "ceo": "John Ternus", "founded": "Apr 1, 1976", "headquarters": "Cupertino, California, United States", "employees": "166,000" }, "financials": [ { "title": "Income Statement", "results": [ { "date": "Jun 2026", "period_type": "Quarterly", "table": ["…"] } ] } ] } } ``` Three things to notice before you write a parser. First, numbers come in two shapes: `current_price` and `pe_ratio` are numeric, while `previous_close`, `day_range` and `market_cap` are display strings such as `"5.07T USD"`. Convert those yourself; the snippet below shows one way. Second, `market.trading` says `"Extended Hours"` here, so the `market` block describes the session at the time of the call. Third, `financials` is a list of statements, each with dated results. ### How do I turn the display strings into numbers? Strip the currency symbol and separators, read the number, then apply the `K`, `M`, `B` or `T` suffix. This Python parses the recorded strings: `"$348.22"` becomes 348.22, `"5.07T USD"` becomes 5,070,000,000,000, `"39.13M"` becomes 39,130,000, and `"$345.75 - $351.73"` splits into a low and a high. ```python import os import re import requests response = requests.get( "https://api.perceptlayer.com/v1/google-finance/quote", params={"symbol": "AAPL", "exchange": "NASDAQ"}, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=30, ).json() SUFFIX = {"K": 1e3, "M": 1e6, "B": 1e9, "T": 1e12} def parse_display(value): m = re.search(r"-?[\d,]*\.?\d+", value) if not m: return None number = float(m.group().replace(",", "")) after = value[m.end():m.end() + 1].upper() return number * SUFFIX.get(after, 1) def parse_range(value): low, high = value.split(" - ") return parse_display(low), parse_display(high) stats = response["quote"]["key_stats"] previous_close = parse_display(stats["previous_close"]) # 348.22 low, high = parse_range(stats["day_range"]) # 345.75, 351.73 market_cap = parse_display(stats["market_cap"]) # 5.07e12 ``` `dividend_yield` ( `"0.31%"`) comes back as 0.31, a percentage and not a fraction, and a string with no digits returns `None`. Keep the raw string next to the parsed value so you can audit a surprising number later. ### How do I switch between quarterly and annual financials? `period_type` accepts `quarterly` or `annual`; run both in the [quote playground](https://perceptlayer.com/apis/google-finance/quote) to see the difference. The recorded response above shows quarterly entries ( `"period_type": "Quarterly"`). ## What parameters does each endpoint take? Each endpoint takes a small set of query parameters, and the table below lists every one with its type and allowed values, taken from the endpoint definitions. Only `q` or `symbol` is required where noted. Nothing else is documented about defaults, so check the [API page](https://perceptlayer.com/apis/google-finance) or run a call in its playground before relying on one. | Endpoint | Parameter | Type | Notes | | --- | --- | --- | --- | | `search` | `q` | string, required | Up to 255 characters | | `quote` | `symbol` | string, required | Up to 20 characters | | `quote` | `exchange` | string | Optional, for example `NASDAQ` | | `quote` | `period_type` | string | `quarterly` or `annual` | | `historical` | `symbol` | string, required | Up to 20 characters | | `historical` | `exchange` | string | Optional | | `historical` | `range` | integer | Optional | | `historical` | `start_date`, `end_date` | string | Optional | | `historical` | `interval` | string | `daily`, `weekly` or `monthly` | | `intraday` | `symbol` | string, required | Up to 20 characters | | `intraday` | `exchange` | string | Optional | | `markets` | `trend` | string | `indexes`, `most-active`, `gainers`, `losers`, `climate-leaders`, `cryptocurrencies`, `currencies` | | `markets` | `index_market` | string | `americas`, `europe-middle-east-africa`, `asia-pacific` | | `indices` | `indices` | string | Optional | | all six | `hl`, `gl` | string | Language and country, up to 10 characters each | The docs on [requests and responses](https://docs.perceptlayer.com/requests) explain how parameters are encoded and what headers come back. ## How do I get historical and intraday prices? [`historical`](https://perceptlayer.com/apis/google-finance/historical) takes a `symbol`, an `interval` of `daily`, `weekly` or `monthly`, and a window set by `start_date` and `end_date` or the integer `range`. [`intraday`](https://perceptlayer.com/apis/google-finance/intraday) takes the same `symbol` and optional `exchange` as `quote`. We have no recorded sample for either, so we don't show their response shape or the date format `start_date` accepts; run one call of each in the playground before you write code against them. ```bash curl "https://api.perceptlayer.com/v1/google-finance/historical?symbol=AAPL&exchange=NASDAQ&interval=weekly" \ -H "X-API-Key: $API_KEY" curl "https://api.perceptlayer.com/v1/google-finance/intraday?symbol=AAPL&exchange=NASDAQ" \ -H "X-API-Key: $API_KEY" ``` What you can check now is the cost. A backfill is one `historical` call per ticker, so 50 tickers is 50 credits, and at the free rate of 1 request a second the loop takes at least 50 seconds. Intraday is a snapshot per call, not a stream: polling one ticker every minute for 6.5 hours is 390 calls, or 390 credits per ticker per US trading day. Chain it the same way as `quote`: `search` once per name, store the `symbol` and `exchange` it gives you, then reuse them so each later call is a single credit. ## How do I see market movers and indices? [`markets`](https://perceptlayer.com/apis/google-finance/markets) answers "what is the market doing" with no symbol. Set `trend` to `gainers`, `losers`, `most-active`, `indexes`, `climate-leaders`, `cryptocurrencies` or `currencies`. `index_market` accepts `americas`, `europe-middle-east-africa` or `asia-pacific`. ```bash curl "https://api.perceptlayer.com/v1/google-finance/markets?trend=gainers&hl=en&gl=us" \ -H "X-API-Key: $API_KEY" ``` [`indices`](https://perceptlayer.com/apis/google-finance/indices) takes an optional `indices` string and the same `hl` and `gl` pair. It needs no parameters, so this is a valid call: ```bash curl "https://api.perceptlayer.com/v1/google-finance/indices?hl=en&gl=us" \ -H "X-API-Key: $API_KEY" ``` We have no recorded `indices` or `markets` response either, so check the fields in the playground. Use `hl` and `gl` consistently across calls, because language and country can change what a page shows. ## What does it cost? Every endpoint is 1 credit per successful call, and failed calls are free; they return `X-Credits-Used: 0`. Free accounts get 100 credits once, after verifying an email, with no credit card. Paid credits come in prepaid packs and last 12 months; [pricing](https://perceptlayer.com/pricing) shows what each pack costs. A worked example: a watchlist of 50 tickers, with one `quote` call each per trading day, over 21 trading days is 50 × 21 × 1 credit = 1,050 credits. The 100 free credits cover the first 2 trading days of that (50 × 2 = 100); the rest needs a pack. Add one `historical` backfill per ticker (50 credits) and a daily `markets` call (21 credits) and you're at 1,121 credits for the month, so the 10,000-credit Starter pack covers 8 months. See [credits](https://docs.perceptlayer.com/credits) for how balances and headers work. Rate limits are per account: free accounts get 1 request a second. A loop over 50 tickers needs a short pause between calls, and a 429 carries `Retry-After` with the seconds to wait. The [rate limits](https://docs.perceptlayer.com/rate-limits) and [errors](https://docs.perceptlayer.com/errors) pages cover both. ## What should you check before relying on this data? Data is collected from publicly available sources and returned as found at the time of the call. We don't promise freshness, completeness or accuracy beyond that. A quote can be delayed, and the `market.trading` field in the recorded response shows the session can be extended hours rather than the regular one. In practice that means: store the time you made each call, keep the raw strings alongside any numbers you parse, and don't use it to trigger trades. If you want an agent to look up a ticker on demand, the same endpoints work through MCP; the [AI agents docs](https://docs.perceptlayer.com/ai-agents) show how to add the server. For a similar guide to another Google source, see the [Google Search API](https://perceptlayer.com/blog/google-search-api-json) article, or browse the [API guides](https://perceptlayer.com/blog/category/api-guides). Next step: [get a free API key](https://perceptlayer.com/signup), open the playground on the [Google Finance API page](https://perceptlayer.com/apis/google-finance) and run `quote` for your own ticker. ## APIs in this post - [Google Finance **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/google-finance) ## Frequently asked questions ### Does Google have an official Finance API? Not one we can point you to. Google's Finance product is a [website](https://www.google.com/finance/), and Google Sheets has a `GOOGLEFINANCE` function documented in [Google's help center](https://support.google.com/docs/answer/3093281); neither page describes an HTTP API. For JSON over HTTP you need another source, such as the Google Finance endpoints on Perceptlayer. ### How much does a Google Finance API call cost? One credit per successful call on all six endpoints, and nothing for failed calls. Free accounts get 100 credits once, after email verification. A daily `quote` for 20 tickers over 21 trading days is 20 × 21 × 1 credit = 420 credits, so the free credits cover the first 5 days and the rest needs a pack. The [pricing page](https://perceptlayer.com/pricing) shows what credits cost. ### Is the data real time? No. It is returned as found at the time of the call, and the recorded quote shows an `Extended Hours` session. That suits dashboards, research and enrichment. It doesn't suit trading decisions, where you need a licensed real-time feed with its own latency guarantees. ### How do I find the right symbol and exchange? Call `search` with `q` set to a company name or ticker (up to 255 characters), then use what you find as `symbol` and `exchange` on `quote`, `historical` or `intraday`. We have no recorded `search` response, so confirm in the playground which fields hold the symbol and exchange. Passing `exchange` is worth it when a ticker may be listed on more than one venue. ### What happens when a call fails? You get an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`. Codes include `invalid_parameters` (422) for a bad `interval`, and `rate_limited` (429) with a `Retry-After` header. A failed call isn't billed. The [errors page](https://docs.perceptlayer.com/errors) lists every code. google finance stock quotes finance data historical prices market data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 29 Oct 2026 Perceptlayer 9 min read ## [Stock Price API: Quotes and History as JSON](https://perceptlayer.com/blog/stock-price-api-google-finance) Get a stock price as JSON with GET /v1/google-finance/quote: current\_price, price\_change, key stats and a Python watchlist loop at 1 credit per symbol. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Discogs API: Releases and Marketplace Data as JSON](https://perceptlayer.com/blog/discogs-api-json) Search Discogs releases, look one up and read marketplace listings as JSON: a recorded vinyl search with master\_id and have/want counts, 1 to 2 credits a call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 18 Nov 2026 Perceptlayer 7 min read ## [Google Books Data as JSON: Search, ISBN and Volumes](https://perceptlayer.com/blog/google-books-api-json) Search Google Books by author and title, look up a book by ISBN or volume id, and get isbn\_13, page\_count and categories as JSON at 1 credit a call. --- title: "Real Estate Listing Data: Fields That Matter for Valuation" description: "Which fields in a Zillow search response feed a valuation model (price, livingArea, yearBuilt), which are noisy, and what listing data can't tell you." url: https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Real Estate Listing Data: Fields That Matter for Valuation 10 Jul 2026 Perceptlayer 10 min read A valuation model needs a small core from each listing: price, living area, bedrooms, bathrooms, year built, lot size, property type, status and a location. The Zillow API's search endpoint returns all of those as named JSON fields for 1 credit per call. What the sample doesn't show matters just as much. This post maps the fields to model inputs and flags what to distrust. ## Key takeaways - The recorded `/v1/zillow/search` response carries `price.value`, `price.pricePerSquareFoot`, `livingArea`, `bedrooms`, `bathrooms`, `yearBuilt`, `lotSizeWithUnit`, `propertyType`, `listing.listingStatus`, `listing.marketingStatus` and `location` for each listing. - A list price is an asking price, not a sale price. Treat it as a noisy label for what homes sell for. The search endpoint accepts `home_statuses[]=recentlySold`, but we haven't recorded a sold response, so check what it returns before you rely on it. - The recorded response includes `taxAssessment.taxAssessedValue` (949000, `taxAssessmentYear` "2025") on the second listing, but no annual property tax, HOA fees, sale history, condition or renovation data. - Drop free-text and marketing fields such as `title` and `mapDotTag`, and keep `estimates.zestimate` out of your features: it is Zillow's own valuation, so a model that learns from it is circular. - Each search call costs 1 credit, but one query returns at most 1,000 rows ( `page * page_size` must not exceed 1000), so the recorded area's 2,058 matches need at least 103 calls at `page_size` 20. ## Which listing fields does a valuation model actually need? A hedonic valuation model, which [breaks a home into its characteristics and estimates the value each contributes](https://en.wikipedia.org/wiki/Hedonic_regression), needs size, rooms, age, lot, type and location, plus a price target. All of them appear in a single search listing. The rest of the response (photo links, virtual tour flags, rental flags) describes how a listing is marketed, not what the home is worth. Here is how the recorded fields map to model inputs: | Model input | Field in the search response | Notes | | --- | --- | --- | | Target price | `price.value` | List price, in `currency`: `usd` | | Price per area | `price.pricePerSquareFoot` | Supplied in the response; recompute it from `price.value` and `livingArea` to check it | | Size | `livingArea` | Unit isn't documented; 7870 with a `pricePerSquareFoot` of 1779, and 2100 with 500, are both consistent with square feet | | Bedrooms | `bedrooms` | Integer | | Bathrooms | `bathrooms` | Integer in the sample | | Age | `yearBuilt` | Convert to age at the call date | | Lot | `lotSizeWithUnit.lotSize` and `lotSizeUnit` | The unit changes between listings: `acres` on the first, `squareFeet` on the second. Convert in code | | Property type | `propertyType` | `singleFamily` in the sample | | Location | `location.latitude`, `location.longitude`, `address.zipcode` | Coordinates for distance features, zip for grouping | | Listing status | `listing.listingStatus` | `forSale` on both sample listings | | Marketing status | `listing.marketingStatus` | `active` on the first listing, `comingSoon` on the second. A coming-soon price is a different label from an active asking price, so use this as a status feature or filter on it | | Assessed value | `taxAssessment.taxAssessedValue` and `taxAssessmentYear` | 949000 and `"2025"` on the second listing only. An assessed value, not the annual tax bill; keep the year with it | | Zillow's estimate | `estimates.zestimate` | 13068300 on the first listing only. Don't train on it: see below | The [Zillow API](https://perceptlayer.com/apis/zillow) has ten endpoints. The search endpoint is the one that returns this table in bulk; the [Property endpoint](https://perceptlayer.com/apis/zillow/property) takes `zpid[]` for individual homes. ## What does the recorded response look like? The recorded response from `/v1/zillow/search` nests everything under `data.listings`. Each listing has a `zpid` identifier, a `location` object, an `address` object and flat fields for size and type. Here is the request we recorded, centred on Seattle: ```bash curl "https://api.perceptlayer.com/v1/zillow/search?latitude=47.6062&longitude=-122.3321&radius_mi=5&listing_category=category1&page_size=20" \ -H "X-API-Key: $API_KEY" ``` An excerpt of the first listing it returned: ```json { "data": { "listings": [ { "zpid": 2068074790, "location": { "latitude": 47.592564, "longitude": -122.386925 }, "address": { "streetAddress": "1124 Sunset Avenue SW", "zipcode": "98116", "city": "Seattle", "state": "WA" }, … "bathrooms": 6, "bedrooms": 4, "livingArea": 7870, "yearBuilt": 2015, "lotSizeWithUnit": { "lotSize": 0.2652, "lotSizeUnit": "acres" }, "propertyType": "singleFamily", "listing": { "listingStatus": "forSale", "marketingStatus": "active", … }, "price": { "value": 14000000, "pricePerSquareFoot": 1779 }, "estimates": { "zestimate": 13068300 }, … ``` And an excerpt of the second listing, which reports its lot in a different unit and carries a tax assessment instead of an estimate: ```json { "zpid": 49046647, … "bathrooms": 2, "bedrooms": 4, "livingArea": 2100, "yearBuilt": 1974, "lotSizeWithUnit": { "lotSize": 3933.468, "lotSizeUnit": "squareFeet" }, "propertyType": "singleFamily", "listing": { "listingStatus": "forSale", "marketingStatus": "comingSoon", … }, "price": { "value": 1050000, "pricePerSquareFoot": 500 }, "taxAssessment": { "taxAssessedValue": 949000, "taxAssessmentYear": "2025" }, … ``` The paging fields sit at the end of the `data` object: ```json "count": 20, "total_matching_count": 2058, "page": 1, "page_size": 20, … "paging_note": "page * page_size must not exceed 1000; up to 1000 rows come back in one request." ``` Keys are camelCase and the units are implicit, so write a small normalisation layer before anything reaches your model. For authentication and requests, see the docs on [authentication](https://docs.perceptlayer.com/authentication) and [requests](https://docs.perceptlayer.com/requests). ## Which fields are noisy or missing in this sample? Several fields need cleaning, and several valuation inputs aren't in the sample at all. The two recorded listings already disagree with each other: one reports its lot in acres and the other in square feet, one carries a Zillow estimate and the other a tax assessment, and one is `active` while the other is `comingSoon`. Two listings are an anecdote, not a benchmark, so check your own pulls. ### Noisy fields - **`price.value`** is what the seller asks. It is the right target for "what is on the market" and the wrong one for "what did homes sell for". For a `comingSoon` listing it is an even earlier signal, so keep `listing.marketingStatus` next to it. - **`price.pricePerSquareFoot`** is supplied, but how it's computed isn't documented. In the sample, 14,000,000 divided by 7,870 is about 1,779 and 1,050,000 divided by 2,100 is exactly 500, both matching the supplied values, so recompute it from `price.value` and `livingArea` if you want a single source of truth. - **`title`** reads "West Seattle L&I Co 1st Of" and "Scenic Heights Supl Plat" in the sample. Neither is an address or a description. Drop it. - **`bathrooms`** is a count; whether it includes half baths isn't documented, so don't assume. - **`lotSizeWithUnit`** comes with a unit, and the unit varies. The first listing has 0.2652 `acres`; the second has 3933.468 `squareFeet`. A model that reads both as the same unit without checking `lotSizeUnit` is wrong by a factor of 43,560. - **`estimates.zestimate`** is Zillow's own estimate of value (13,068,300 against a list price of 14,000,000 on the first listing). It is useful as a benchmark to compare your model's output against. As a feature it makes the model circular: you would be training a valuation model partly on another valuation model's output, and the error you measure would look smaller than it is. ### Fields the response doesn't show The recorded response does include `taxAssessment.taxAssessedValue` (949000) and `taxAssessmentYear` ("2025") on the second listing. That is an assessed value, not annual property tax, and the first listing doesn't have the field at all. Neither listing in the recorded response shows annual property tax, HOA fees, sale history, renovation status, basement or garage details, or school quality. We haven't recorded those, so check a full response in the playground on the [Property](https://perceptlayer.com/apis/zillow/property) and [Schools](https://perceptlayer.com/apis/zillow/schools) endpoint pages before you build on them. ## How do you pull a clean training table? Request listings by area, flatten the nested objects, normalise the lot size and drop anything you can't use. The code below calls the search endpoint with the same parameters as the recorded example, keeps the fields from the mapping table and prints the first two rows. It uses `.get` throughout, because a field missing on one listing shouldn't stop the batch. The Zestimate is stored for benchmarking only; leave it out of your feature list. ```python import os from datetime import date import requests SQFT_PER_UNIT = {"acres": 43560, "squareFeet": 1} resp = requests.get( "https://api.perceptlayer.com/v1/zillow/search", headers={"X-API-Key": os.environ["API_KEY"]}, params={ "latitude": 47.6062, "longitude": -122.3321, "radius_mi": 5, "listing_category": "category1", "page_size": 20, }, timeout=30, ) resp.raise_for_status() data = resp.json()["data"] rows = [] for item in data["listings"]: price = (item.get("price") or {}).get("value") living_area = item.get("livingArea") if not price or not living_area: continue # no target or no size: unusable for training lot = item.get("lotSizeWithUnit") or {} loc = item.get("location") or {} listing = item.get("listing") or {} tax = item.get("taxAssessment") or {} unit_factor = SQFT_PER_UNIT.get(lot.get("lotSizeUnit")) lot_size = lot.get("lotSize") year_built = item.get("yearBuilt") rows.append({ "zpid": item.get("zpid"), "price": price, "living_area": living_area, "price_per_area": round(price / living_area), "beds": item.get("bedrooms"), "baths": item.get("bathrooms"), "age": date.today().year - year_built if year_built else None, # unknown unit -> None, never a silent guess "lot_sqft": round(lot_size * unit_factor) if lot_size and unit_factor else None, "type": item.get("propertyType"), "lat": loc.get("latitude"), "lon": loc.get("longitude"), "zipcode": (item.get("address") or {}).get("zipcode"), "status": listing.get("listingStatus"), "marketing_status": listing.get("marketingStatus"), "tax_assessed_value": tax.get("taxAssessedValue"), "tax_year": tax.get("taxAssessmentYear"), "zestimate": (item.get("estimates") or {}).get("zestimate"), # benchmark only }) print(len(rows), "usable of", len(data["listings"]), "listings;", data["total_matching_count"], "match the query") for row in rows[:2]: print(row) ``` Run against the recorded request, the first two rows are the two listings above, with `lot_sqft` about 11,552 for the first and 3,933 for the second, both in square feet. To narrow the pull, the search endpoint accepts `min_price`, `max_price`, `min_beds`, `max_beds`, `living_area_min`, `lot_size_min` and `year_built_min`, and `home_statuses[]` to select for example `recentlySold`. Parameters you can page with are `page` and `page_size`, and `page * page_size` must not exceed 1000. Errors come back with an HTTP status and a code; see the [error reference](https://docs.perceptlayer.com/errors). ## How do you turn one listing into model features? Take the second recorded listing, a typical house rather than the $14,000,000 outlier, and compute the derived features the table calls for, using a call date in 2026: - **Age:** 2026 − `yearBuilt` 1974 = 52 years. - **Lot in square feet:** `lotSize` 3933.468 with `lotSizeUnit` `squareFeet` needs no conversion, so it stays about 3,933 square feet (roughly 0.09 acres). The first listing's 0.2652 acres would need × 43,560 = about 11,552 square feet. - **Own price per area:** `price.value` 1,050,000 ÷ `livingArea` 2,100 = 500. - **Price against assessment:** `price.value` 1,050,000 ÷ `taxAssessedValue` 949,000 = about 1.11, an assessment from 2025 compared with a 2026 asking price. - **Status:** `marketingStatus` `comingSoon`, so a flag separates it from `active` listings. The own price per area matches the supplied `pricePerSquareFoot` of 500. Computing it yourself means every row uses one formula, even when a field is missing or differs on other listings. For this row, the model sees a home 52 years old, on about 3,933 square feet, listed at 500 per unit of living area, before it hits the market as an active listing. ## What does a pull cost? Every call to the search endpoint costs 1 credit, and a failed call costs nothing. So the cost of a dataset is the number of calls, not the number of listings. The recorded request shows how fast that adds up: `total_matching_count` is 2,058, and `paging_note` says `page * page_size` must not exceed 1000, so one query returns at most 1,000 rows. Here are two worked examples: - One area like the recorded one: 2,058 matches ÷ `page_size` 20 = 103 pages, so at least 103 calls × 1 credit = 103 credits. You can't page past 1,000 rows in a single query, so split the area into slices that each match 1,000 or fewer (a smaller `radius_mi`, a bounding box, or bands of `min_price` and `max_price`). Uneven slices cost more calls than the minimum. - A neighbourhood-level refresh of 2,000 search calls × 1 credit = 2,000 credits. The 100 free credits on signup cover the first 100 calls, and the other 1,900 come from a pack. The smallest pack is Starter, with 10,000 credits. You buy the whole pack, so the remaining 1,900 calls draw on it and the other 8,100 credits stay for later pulls. A monthly refresh of 10,000 calls × 1 credit = 10,000 credits fits one Starter pack. Credits are prepaid and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits). See [rate limits](https://docs.perceptlayer.com/rate-limits) before you pull many areas in parallel. ## When is listing data not enough for valuation? Listing data describes asking prices, so it is weakest for homes that aren't on the market and for homes whose condition drives the price. Test any model built on it against sold prices in your own market before you trust it. What that means for your own model: - **Asking prices aren't sale prices.** A model trained on asking prices learns what sellers hoped for. Add `recentlySold` listings through `home_statuses[]` and a status feature ( `listing.marketingStatus` is one), and inspect what a sold record contains first. - **Zillow's estimate isn't independent.** `estimates.zestimate` is another valuation. Use it to sanity-check your output, not as an input. - **Condition is a gap.** Two identical-looking homes can differ by a full renovation. The [Photos endpoint](https://perceptlayer.com/apis/zillow/photos) takes `zpid[]`, so you can pull images for a computer-vision step. The trade-off is a separate modelling project on top of the tabular one. - **Outliers distort a small pull.** The sample's first listing is a $14,000,000, 7,870-square-foot home with six bathrooms, a poor comparable for a typical house. Narrow the pull with `min_price`, `max_price` and `min_beds`, at the cost of fewer rows per call. - **Lending is a different bar.** [12 CFR 323.3](https://www.law.cornell.edu/cfr/text/12/323.3) requires an appraisal by a state certified or licensed appraiser for real estate-related financial transactions at institutions the FDIC regulates, with listed exemptions, so a model output doesn't replace one. If you need area-level context rather than home-level inputs, the [Market Data endpoint](https://perceptlayer.com/apis/zillow/market-data) takes a required `family` and `geography` (one of City, County, Metro, National, Neighborhood, State, Zip). The Zillow API also has a `/v1/zillow/zestimate-accuracy` endpoint, which takes optional `state` and `metro` parameters. For a full walk-through of the search call, see [Zillow Listings API: Get Property Data as JSON](https://perceptlayer.com/blog/zillow-listings-api-json). More real estate endpoints are listed in [real estate APIs](https://perceptlayer.com/verticals/real-estate). Next step: [get a free API key](https://perceptlayer.com/signup), open the [Zillow API](https://perceptlayer.com/apis/zillow) page and run the search call in the playground against your own market before you design features. ## APIs in this post - [Zillow **1 credit per call** · 20 endpoints](https://perceptlayer.com/apis/zillow) ## Frequently asked questions ### Which Zillow field should be the target for a valuation model? Use `price.value` as the target only if you accept that it's an asking price. For a model of sale values, pull listings with `home_statuses[]=recentlySold` and inspect what the response returns for them. Don't mix active and sold prices in one training set without a status feature, and don't use `estimates.zestimate` as an input. ### Can I get listing data for a whole city in one call? No. The recorded request reports a `total_matching_count` of 2,058, but `paging_note` says `page * page_size` must not exceed 1000, so one query returns at most 1,000 rows. Split the area with a smaller `radius_mi`, a bounding box or price bands, then page each slice. At `page_size` 20, 2,058 matches need at least 103 calls, which is 103 credits. ### How much does a valuation dataset cost to collect? Each successful call costs 1 credit, and failed calls cost nothing. 2,000 calls use 2,000 credits. The free tier gives 100 credits once, after you verify an email address, with no credit card, so the other 1,900 come from a pack. The smallest, Starter, has 10,000 credits; see [pricing](https://perceptlayer.com/pricing) for what credits cost. ### Is the data complete and current? The data is collected from publicly available sources and returned as found at the time of the call. We don't promise completeness or freshness. Fields can be absent on some listings, as `taxAssessment` and `estimates` are in the sample, so write code that tolerates missing values and record the date of each pull alongside the data. ### What happens if I run out of credits mid-pull? The service is prepaid, with no automatic top-up. When the balance runs out, calls return `insufficient_credits` (402) and nothing more is debited. Check the `X-Credits-Remaining` header on each response, and stop the loop on a 402 so you can resume after adding credits. real estate valuation zillow listings property data ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 9 min read ## [Zillow Listings API: Get Property Data as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) One GET to /v1/zillow/search returns listings near a point as JSON with price, beds, baths and address. Parameters, a real response, 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Sept 2026 Perceptlayer 6 min read ## [Realestate.com.au API: Australian Listings as JSON](https://perceptlayer.com/blog/realestate-com-au-api-listings) Search realestate.com.au by location and channel (buy, rent, sold), then open each listing by URL. Parameters, a recorded Sydney response and the cost. --- title: "Google Maps Reviews API: Parameters, Requests and Cost" description: "Call GET /v1/google-maps/reviews with a business_id from Simple Search. Every parameter, the sort values 1 to 4, and the cost: 1 credit per call." url: https://perceptlayer.com/blog/google-maps-reviews-api-parameters --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Google Maps Reviews API: Parameters, Requests and Cost 7 Jul 2026 Updated 7 Nov 2026 Perceptlayer 8 min read To get Google Maps reviews as JSON, call `GET /v1/google-maps/reviews` with a `business_id`. You get that ID from the `business_id` field of a Simple Search result, so the whole path is two requests. This guide walks both steps with real requests, then covers the parameters on the Reviews and Review endpoints and what the calls cost. It also shows a trimmed excerpt of a recorded Reviews response, so you can see the fields you'll parse, including the `review_id` the single-review endpoint needs. ## Key takeaways - `business_id` is the only required parameter on `/v1/google-maps/reviews`. Simple Search items carry it, for example `0x89c259bf22ca32bd:0x35d818a560181b20`. - Reviews accepts `page`, `pages`, `search`, `sort`, `limit`, `hl` and `gl`. `sort` takes one of 1, 2, 3 or 4, and `search` is capped at 100 characters. - `/v1/google-maps/review` fetches a single review and needs both `review_id` and `business_id`. - Each call costs 1 credit, so the 100 free credits on signup cover 100 calls. ## Where does the business\_id come from? Reviews are looked up by a place's `business_id`, not by its name. Search for the place with Simple Search and read `business_id` from each item in the response. Simple Search needs only `query`, so a search like "restaurants in new york" is enough to get IDs for the places it finds. Here is the request: ```bash curl "https://api.perceptlayer.com/v1/google-maps/simple-search?query=restaurants+in+new+york" \ -H "X-API-Key: $API_KEY" ``` The response is a JSON object with an `items` array. This is an excerpt of a recorded response, trimmed with `…`: ```json { "items": [ { "name": "Lulla NYC", "review_count": 1571, "rating": 4.8, "business_id": "0x89c259bf22ca32bd:0x35d818a560181b20", "subtypes": [ "Italian restaurant", "Restaurant" ], "full_address": "113 W 24th St, New York, NY 10011, United States", "place_id": "ChIJvTLKIr9ZwokRIBsYYKUY2DU=", … } ] } ``` Each item also carries `rating` and `review_count`, so you can rank places before you spend a call on their reviews. Use `business_id`, the value with the `0x…:0x…` shape, for the next step. `place_id` is a different identifier. Sign-in details are in the [authentication docs](https://docs.perceptlayer.com/authentication). If you don't have a key yet, [get a free API key](https://perceptlayer.com/signup). ## How do you request reviews for a place? Pass the `business_id` you got from Simple Search to the Reviews endpoint. It's a `GET` request to `/v1/google-maps/reviews`, and the key goes in the `X-API-Key` header like every other call. The only required parameter is `business_id`, so the shortest working request is one query string value and one header. ```bash curl "https://api.perceptlayer.com/v1/google-maps/reviews?business_id=0x89c259bf22ca32bd:0x35d818a560181b20" \ -H "X-API-Key: $API_KEY" ``` Here's the same two-step flow in Python. It picks Lulla NYC out of the Simple Search items by its `business_id`, rather than taking the first item, which in the recorded response is a different place. It then loops over the Reviews `items` and prints `rating`, `review_id` and `timestamp`, three fields from the recorded response: ```python import os import requests BASE = "https://api.perceptlayer.com/v1/google-maps" HEADERS = {"X-API-Key": os.environ["API_KEY"]} search = requests.get( f"{BASE}/simple-search", params={"query": "restaurants in new york"}, headers=HEADERS, timeout=30, ) search.raise_for_status() TARGET_ID = "0x89c259bf22ca32bd:0x35d818a560181b20" place = next( (i for i in search.json()["items"] if i["business_id"] == TARGET_ID), None, ) if place is None: raise SystemExit(f"{TARGET_ID} not in the Simple Search items; use another business_id") print(place["name"], place["rating"], place["review_count"]) reviews = requests.get( f"{BASE}/reviews", params={"business_id": place["business_id"]}, headers=HEADERS, timeout=30, ) reviews.raise_for_status() for review in reviews.json()["items"]: print(review["rating"], review["review_id"], review["timestamp"]) ``` Two calls, two credits. ## What does the Reviews response look like? The response is a JSON object with an `items` array, one object per review. This excerpt is from a recorded response for a different `business_id` than the one above ( `0x60188b88b7d8f7ab:0x2133080e9923eaac`). It's trimmed with `…`, and the reviewer's name and profile links are left out: ```json { "items": [ { "review_source": "Google", "review_id": "Ci9DQUlRQUNvZENodHljRjlvT25kVUxXTmpaamhNWjFac016WTVSMjlqUVRCb1VYYxAB", "rating": 5, "timestamp": 1779471094452, … "author_review_count": 262, "author_photo_count": 660, "review_text": [ "A must do! Easy access via …" ], "review_language": [ "en" ], "review_link": "https://www.google.com/maps/reviews/data=!4m8!14m7!1m6!2m5!1sCi9DQUlRQUNvZENodHljRjlvT25kVUxXTmpaamhNWjFac016WTVSMjlqUVRCb1VYYxAB", "images": [ … ], "is_google_review": true }, … ] } ``` Each item has a `rating`, a `timestamp` and a `review_id`, plus `review_text` and `review_language`, which are both arrays. Items also carry author fields (name, profile link, review and photo counts) and an `images` array. Treat the author fields as personal data. ## Which parameters does the Reviews endpoint take? `GET /v1/google-maps/reviews` takes one required parameter, `business_id`, and seven optional ones: `page`, `pages`, `search`, `sort`, `limit`, `hl` and `gl`. The `sort` value must be 1, 2, 3 or 4, and `search` is capped at 100 characters. The table below lists each parameter with its type and any limits from the catalogue. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `business_id` | string | yes | From Simple Search, e.g. `0x89c259bf22ca32bd:0x35d818a560181b20` | | `page` | string | no | Up to 512 characters | | `pages` | integer | no | | | `search` | string | no | Up to 100 characters | | `sort` | integer | no | One of 1, 2, 3, 4 | | `limit` | integer | no | | | `hl` | string | no | | | `gl` | string | no | | The catalogue records types and limits only. It doesn't say what 1 to 4 mean for `sort`, what `page` or `pages` select, what `hl` and `gl` accept, give defaults, or state how many reviews a call returns, so we won't guess at any of that. Run a call in the playground on the [Google Maps API page](https://perceptlayer.com/apis/google-maps) to see the effect of each value on your own place before you rely on it. Combining parameters is a matter of adding query string values. The request below is a syntax example only. We have no recorded response for it, and the values are placeholders that show how the parameters fit together, not a claim about what they return: ```bash curl -G "https://api.perceptlayer.com/v1/google-maps/reviews" \ --data-urlencode "business_id=0x89c259bf22ca32bd:0x35d818a560181b20" \ --data-urlencode "search=pasta" \ --data-urlencode "sort=2" \ --data-urlencode "limit=20" \ --data-urlencode "hl=en" \ -H "X-API-Key: $API_KEY" ``` It passes `search=pasta`, `sort=2`, `limit=20` and `hl=en` along with the place's `business_id`, all within the documented types and limits. What `sort=2` orders by and how many reviews `limit=20` yields are not documented, so check both on your own place. To find out what each `sort` value does, call Reviews four times with the same `business_id` and `sort` set to 1, 2, 3 and 4. Compare the order of `rating` and `timestamp` across the `items`. For `page` and `limit`, repeat the call with and without them and count the `items` each time. Each test call is 1 credit. ## How do you fetch a single review? Use `GET /v1/google-maps/review` when you already know the review you want. It needs two parameters, `review_id` (up to 100 characters) and `business_id`, and nothing else. | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `review_id` | string | yes | Up to 100 characters | | `business_id` | string | yes | From Simple Search | ```bash curl "https://api.perceptlayer.com/v1/google-maps/review?review_id=$REVIEW_ID&business_id=0x89c259bf22ca32bd:0x35d818a560181b20" \ -H "X-API-Key: $API_KEY" ``` The review ID comes from the Reviews response: each object in `items` carries a `review_id`, as in the excerpt above. So the chain is Reviews, then Review. Call Reviews with a `business_id`, read `items[].review_id`, and pass that value with the same `business_id` to Review. The [Review endpoint page](https://perceptlayer.com/apis/google-maps/review) has the parameters and a playground link. Two related endpoints cover other angles on the same data. [Contributor Reviews](https://perceptlayer.com/apis/google-maps/contributor-reviews) takes a `contributor_id` and looks at reviews from the reviewer's side, and [Business Details](https://perceptlayer.com/apis/google-maps/business-details) takes a `business_id` for the place's own record. ## What does a Google Maps reviews call cost? Each call to Reviews or Review costs 1 credit when it succeeds, as shown on the endpoint. A failed call costs nothing and returns `X-Credits-Used: 0`. Credits come from the one-time free grant or a prepaid pack, with no subscription and no seats. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. | Plan | Credits | Reviews calls at 1 credit | | --- | --- | --- | | Free | 100, once | 100 | | Starter | 10,000 | 10,000 | | Build | 50,000 | 50,000 | | Growth | 200,000 | 200,000 | | Pro | 500,000 | 500,000 | | Scale | 1,000,000 | 1,000,000 | Larger packs run from 5,000,000 up to 50,000,000 credits. The free tier needs a verified email and no credit card. Purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Here is the arithmetic for a realistic job. Say you want reviews for 300 places. One Simple Search call finds places, and one Reviews call per place fetches reviews: - 300 Reviews calls × 1 credit = 300 credits. - Add N Simple Search calls to find the places, at 1 credit each. N depends on how many places each search returns. - Total: 300 + N credits. That's more than the 100 free credits on signup, which cover a test on the first few dozen places; the full job needs a pack. Repeat that four times a month and you'd use at least 4 × 300 = 1,200 credits a month before counting searches. The Starter pack's 10,000 credits covers a month of it with room to spare, and [pricing](https://perceptlayer.com/pricing) shows what a pack costs. One caveat. These figures assume one page of reviews per place. Reviews costs 1 credit per page it fetches: `pages` sets how many, up to 50, so a call with `pages=3` costs 3 credits. Multiply the estimate by the pages you plan to fetch per place. ## How does this compare with the official Places API? Google's own Places API fits some jobs better. Its Place resource documents the `reviews` field as a "list of reviews about this place, sorted by relevance. A maximum of 5 reviews can be returned" ( [Google Maps Platform, Place resource reference](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places), 2026). If five reviews per place is enough, and you want Google's billing and terms directly, use it. The [Place Details documentation](https://developers.google.com/maps/documentation/places/web-service/place-details) lists the `reviews` field among the fields you can request. Reach for the Reviews endpoint when you want the `search`, `sort`, `limit` and `pages` parameters, or the same key and JSON conventions as the rest of the catalogue. Run a call on one of your own places and compare the `items` you get back with the cap above before you choose. Data is collected from publicly available sources and returned as found at the time of the call. Reviews are written by individuals, so treat reviewer names and text as personal data in your own storage and follow the rules that apply to you. ## What happens when a request fails? A failed request comes back with an HTTP status and a JSON body shaped as `{"error": {"code", "message", "request_id"}}`. The `code` tells you whether to fix the request or retry it. Failed calls cost nothing. The codes you're most likely to meet here: | Code | Status | What to do | | --- | --- | --- | | `invalid_api_key` | 401 | Check the `X-API-Key` header | | `insufficient_credits` | 402 | Buy a credit pack | | `not_found` | 404 | Check the `business_id` came from Simple Search | | `invalid_parameters` | 422 | Check types and limits, e.g. `sort` is 1 to 4 | | `rate_limited` | 429 | Back off and retry; see [rate limits](https://docs.perceptlayer.com/rate-limits) | | `source_error` | 502 | Retry the call | | `temporarily_unavailable` | 503 | Retry the call | The full list is in the [errors docs](https://docs.perceptlayer.com/errors). Log the `request_id` with every failure so you can trace it later. Next step: get a free key, run the Simple Search call above, and paste the `business_id` into the Reviews call in the playground. Related guides: [Zillow listings as JSON](https://perceptlayer.com/blog/zillow-listings-api-json) is another walk-through in the same format, and the [API guides category](https://perceptlayer.com/blog/category/api-guides) has the rest. ## APIs in this post - [Google Maps **1 credit per call** · 12 endpoints](https://perceptlayer.com/apis/google-maps) ## Frequently asked questions ### Do I need a Google account or Google Cloud project? No Google credentials appear in the request. You send an `X-API-Key` header with a Perceptlayer key, which starts with `sk_live_`. Verify an email address and you get 100 free credits on signup, with no credit card. ### How much does it cost to pull reviews for 1,000 places? One Reviews call per place is 1,000 calls at 1 credit each, so 1,000 credits. That's ten times the 100 free credits on signup, so it needs a pack: the Starter pack's 10,000 credits cover it ten times over; [pricing](https://perceptlayer.com/pricing) has what credits cost. ### Can I filter reviews by keyword or sort them? Yes. Reviews takes `search` (a string of up to 100 characters) and `sort` (an integer, one of 1, 2, 3, 4). ### How do I get more than one page of reviews? Reviews has `page` (a string, up to 512 characters), `pages` (an integer, up to 50) and `limit` (an integer). Each page fetched costs 1 credit, so `pages=5` costs 5 credits. Try them on one place in the playground before you build a loop. ### Does a failed request use credits? No. A failed call returns an error body with a `code`, `message` and `request_id`. A 429 or 503 response you receive wasn't charged, and it carries a `Retry-After` header with the seconds to wait. One exception: requests have no idempotency key, so if a reply is lost (a client timeout), the call may have succeeded and been billed. Check `X-Credits-Remaining` before you retry those. google maps reviews local business api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read ## [Yelp Scraper or API: Reviews Without the Upkeep](https://perceptlayer.com/blog/yelp-scraper-vs-api) A Yelp scraper vs three 1-credit endpoints: a recorded Gary Danko search whose alias feeds the reviews call, with rating, text, created\_at and next\_after. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [Google Maps Scraper or Places Data API: What You Get](https://perceptlayer.com/blog/google-maps-scraper-vs-api) Compare building a Google Maps scraper with the official Places API and place endpoints at 1 credit a call: fields, upkeep, terms and a verdict per use case. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 3 Sept 2026 Updated 31 Oct 2026 Perceptlayer 7 min read ## [Google Maps Directions API Alternative: Routes as JSON](https://perceptlayer.com/blog/google-maps-directions-api-alternative) One GET to /v1/google-maps/directions returns a route as JSON for 1 credit. Parameters, a 15,000-route cost example and Google's per-request rates. --- title: "HotPads API: US Rental Listings as JSON | Perceptlayer" description: "GET /v1/hotpads/search returns US rentals with rent ranges, beds, baths, sqft and coordinates, 40 a page at 1 credit per call. Parameters and a real response." url: https://perceptlayer.com/blog/hotpads-api-rental-listings --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # HotPads API: US Rental Listings as JSON 7 Jul 2026 Perceptlayer 7 min read HotPads publishes feed programs for landlords sending listings in, not an API for reading them out. The Perceptlayer HotPads API covers the reading side with two GET endpoints. `GET /v1/hotpads/search?area=albuquerque-nm&type=apartments` returns rentals with rent, bed, bath and square-foot ranges, an address and coordinates, 40 to a page, at 1 credit per successful call. `GET /v1/hotpads/listing` returns one listing by `id`. ## Key takeaways - HotPads, part of Zillow Group since 2012, takes listings through partner feeds for property managers; it offers no public endpoint for reading listings. - `GET /v1/hotpads/search` needs only `area`, a slug such as `albuquerque-nm`, and filters by `type`, `beds`, `min_price` and `max_price`. - Building listings carry ranges, not single values: the first recorded result rents for `price.min` 1,732 to `price.max` 2,529 USD, from studios to two beds. - The recorded Albuquerque search reports 3,541 results but 10 pages of 40, so one search reaches about 400 rows; slice by price or beds to cover a metro. - At 1 credit per call, a 9-slice sweep of Albuquerque apartments costs 90 credits; the 100 free credits on signup cover the first one, and weekly, at 390 credits a month, needs a pack. ## Is there an official HotPads API? Not for reading listings. Zillow Group, which agreed to buy HotPads in 2012 ( [Zillow Group](https://zillowgroup.com/news/zillow-to-acquire-hotpads-to-grow-rental-marketplace-for-consumers-and-pros-2), 2012), runs a rentals feed program in which property managers and property management systems syndicate listings after approval by its Rentals Integrations team ( [Zillow Group Rentals Feed Integrations](https://www.zillowgroup.com/developers/api/rentals/rentals-feed-integrations/), 2026). HotPads' own help centre points landlords to the same XML feed. Both are for publishing your inventory. If you manage rental properties and want them on HotPads, apply for the feed program: it's free and it's the supported route. If you need to read US rental listings as JSON for market analysis, a search product or an agent, that's what the [HotPads API](https://perceptlayer.com/apis/hotpads) does. It sits in the [real estate APIs](https://perceptlayer.com/verticals/real-estate) with the same key and conventions as the rest of the catalogue. Check HotPads' terms against your use. Data is collected from publicly available sources and returned as found at the time of the call. ## Which parameters does the search endpoint take? `GET /v1/hotpads/search` takes one required parameter, `area`, and five optional ones. The recorded request passes `area` as a city-and-state slug, `albuquerque-nm`, the same form HotPads uses in its own URLs. Types and allowed values below come from the endpoint definition; defaults aren't documented, so don't rely on any. | Parameter | Type | Allowed values or notes | | --- | --- | --- | | `area` | string, required | Up to 100 characters, for example `albuquerque-nm` | | `type` | string | `apartments`, `houses`, `condos`, `townhomes` | | `beds` | integer | Bedroom count | | `min_price` | integer | Lowest monthly rent | | `max_price` | integer | Highest monthly rent | | `page` | integer | Page number | The listing endpoint, [`/v1/hotpads/listing`](https://perceptlayer.com/apis/hotpads/listing), takes a single `id` of up to 200 characters. Both endpoints cost 1 credit on success. ## How do you search HotPads rentals? Send a GET request with `area` and, optionally, `type`. The call below is the exact request behind the recorded response in the next section. Put your key in the `X-API-Key` header; keys start with `sk_live_`, and the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. A first call is two lines of cURL. ```bash curl "https://api.perceptlayer.com/v1/hotpads/search?area=albuquerque-nm&type=apartments" \ -H "X-API-Key: $API_KEY" ``` To narrow it, add filters: `area=albuquerque-nm&type=apartments&beds=2&max_price=1800` asks for two-bed apartments at up to 1,800 a month. We haven't run that filtered request for this article; the [Search endpoint page](https://perceptlayer.com/apis/hotpads/search) has a playground to try it. ### What does a search response look like? The recorded Albuquerque response holds a `data` object with the `area`, a `results` array and paging fields, plus a `meta` object. Here is an excerpt of the first result, trimmed with `…`: ```json { "success": true, "data": { "area": { "title": "Albuquerque, NM Apartments for Rent", "url": "https://hotpads.com/albuquerque-nm/apartments-for-rent" }, "results": [ { "id": "249njun", "name": "Markana Uptown", "url": "https://hotpads.com/markana-uptown-albuquerque-nm-87110-249njun/pad", "listing_id": "2q29a1ud4hqp5", "property_type": "large", "listing_type": "rental", "address": { "street": "6500 Americas Pkwy NE", "city": "Albuquerque", "state": "NM", "zip": "87110" }, "location": { "latitude": 35.101585147458174, "longitude": -106.57245218753815 }, "price": { "min": 1732, "max": 2529, "currency": "USD" }, "beds": { "min": 0, "max": 2 }, "baths": { "min": 1, "max": 2 }, "sqft": { "min": 589, "max": 1022 }, "unit_count": 12, "price_drop_count": 2, "labels": ["New Today", "Special Offer"], "photos": ["…"], "listed_at": "2023-10-25T14:34:52Z", "updated_at": "2026-10-22T00:55:05Z" }, … ], "page": 1, "per_page": 40, "total_pages": 10, "total_results": 3541, "has_more": true }, "meta": { "endpoint_family": "search", "billable": true } } ``` Pass the result's `id` ( `249njun` here) to the listing endpoint for one listing's full record. We haven't recorded a listing response, so the [Listing endpoint page](https://perceptlayer.com/apis/hotpads/listing) is where to see its fields. ## Which fields matter for rent analysis? The fields that carry the market signal are `price`, `beds`, `baths` and `sqft`, each a `min`/ `max` pair, plus `unit_count`, `price_drop_count`, `listed_at` and `updated_at`. Location comes as a street address with `zip` and as coordinates, so you can join to census tracts or ZIP-level data without geocoding. | Field | What it tells you | Watch out for | | --- | --- | --- | | `price.min`, `price.max` | Rent range across available units | A range for a building, not one unit's rent | | `beds`, `baths`, `sqft` | Unit mix | `beds.min` of 0 means studios | | `property_type` | `large` in both recorded results | Multi-unit buildings and single homes mix in one search | | `unit_count` | Units listed in the building | 12 and 6 in the recorded results | | `price_drop_count` | How often the asking rent fell | 2 and 5 in the recorded results | | `special_offer`, `labels` | Concessions such as a month off | Free text, as found on the page | | `listed_at`, `updated_at` | Time on market and freshness | A building can stay listed for years | The ranges are the trap. The first recorded result spans 1,732 to 2,529 USD across units from studios to two beds. Averaging `price.min` across buildings gives you the cheapest-unit rent, which skews low; the midpoint mixes studios with two-beds. For per-bedroom rents, filter the search with `beds` so each result's range covers one unit size, or fetch listings individually. Concessions are raw text too. The second recorded result carries `special_offer` with a doubled currency sign, as it appeared on the page, and a `Price Drop` label next to it. Parse offers as strings, keep the original, and don't net them off the rent without reading what they say. For more on which rental fields to keep and why, see [rental listing data for market analysis](https://perceptlayer.com/blog/rental-listing-data-market-analysis). ## How do you cover a whole metro area? Split it into searches that each fit in about 400 rows. The recorded response reports `total_results` of 3,541 but `total_pages` of 10 at `per_page` 40, so paging stops at roughly 400 results. Narrow each search with `min_price`/ `max_price` bands, `beds` or `type` until `total_results` falls under 400, then page through with `page` until `has_more` is false. Here's a Python sketch that reads those paging fields. It follows the recorded response shape; we haven't run it against the live API for this article. ```python import os import requests URL = "https://api.perceptlayer.com/v1/hotpads/search" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def sweep(params): rows, page = [], 1 while True: r = requests.get(URL, headers=HEADERS, params={**params, "page": page}, timeout=60) r.raise_for_status() data = r.json()["data"] rows.extend(data["results"]) if not data["has_more"]: break page += 1 if data["total_results"] > data["per_page"] * data["total_pages"]: print(f"{params}: {data['total_results']} results, slice further") return rows bands = [(0, 1000), (1001, 1300), (1301, 1600), (1601, 2000), (2001, 99999)] seen = {} for lo, hi in bands: for row in sweep({"area": "albuquerque-nm", "type": "apartments", "min_price": lo, "max_price": hi}): seen[row["id"]] = row print(len(seen)) ``` A building with a rent range can match more than one band, so key results by `id` as the code does. The band edges here are guesses; pick yours from a first pass. For retries and backoff in a loop like this, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python), and for merging HotPads with other rental sources, [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources). ## What does covering a metro cost? Each HotPads call costs 1 credit on success, and a full search is at most 10 pages, so 10 credits. Failed calls cost nothing and return `X-Credits-Used: 0`; every success returns `X-Credits-Used` and `X-Credits-Remaining`. The [credits docs](https://docs.perceptlayer.com/credits) explain billing. Worked example: 3,541 apartment results at about 400 per search needs at least 9 slices. 9 slices × 10 pages × 1 credit = 90 credits per snapshot. A weekly snapshot is 90 × 52 ÷ 12 = 390 credits a month. The 100 free credits every verified account gets once cover the first snapshot; a year of weekly snapshots, 4,680 credits, fits in the 10,000-credit Starter pack. | Job | Calls | Credits | | --- | --- | --- | | One full search | 10 | 10 | | Albuquerque apartments, 9 slices | 90 | 90 | | Weekly for a year | 4,680 | 4,680 | | Five metros of that size, weekly for a year | 23,400 | 23,400 | Five metros weekly for a year, 23,400 credits, fits in a Build pack of 50,000 credits, and purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Free accounts run at 1 request a second, so a 90-call snapshot takes about a minute and a half; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the paid rates. ## Can an AI agent use the HotPads API? Yes. The MCP server at `https://perceptlayer.com/mcp` gives an agent `search_endpoints` and `get_endpoint`, which look up the catalogue for free, and `call_endpoint`, which runs an endpoint and spends credits only on success. An agent can turn "two-bed apartments in Albuquerque under 1,800" into `area`, `type`, `beds` and `max_price`. Tell the agent that prices are ranges, or it will quote a building's cheapest unit as its rent. Setup is in the [AI agents docs](https://docs.perceptlayer.com/ai-agents); errors come back with an HTTP status and a JSON `code`, listed in the [errors docs](https://docs.perceptlayer.com/errors). For US valuation data alongside rentals, the [Redfin API guide](https://perceptlayer.com/blog/redfin-api-property-valuation) covers search, property and estimates. To try it, [get a free API key](https://perceptlayer.com/signup) and run a search for your city in the playground on the [HotPads API page](https://perceptlayer.com/apis/hotpads). ## APIs in this post - [HotPads **1 credit per call** · 2 endpoints](https://perceptlayer.com/apis/hotpads) ## Frequently asked questions ### Does HotPads have a public API? No public API for reading listings. HotPads and Zillow Group offer feed programs that let approved property managers send listings in. To read HotPads rentals as JSON, the Perceptlayer [HotPads API](https://perceptlayer.com/apis/hotpads) has a search endpoint and a listing endpoint, both 1 credit per successful call, with data collected from publicly available sources. ### How much does the HotPads API cost? Both HotPads endpoints cost 1 credit per successful call, and failed calls cost nothing. A full 10-page search is 10 credits. Every account gets 100 free credits once, after verifying an email address, and prepaid packs start at 10,000 credits. The [pricing page](https://perceptlayer.com/pricing) shows what credits cost. ### What format does the area parameter take? The recorded request uses a lowercase city-and-state slug, `albuquerque-nm`, which matches the area path in HotPads' own URLs. The parameter accepts up to 100 characters. The response echoes the matched area's title and URL, so check `data.area.title` to confirm the search hit the place you meant. ### Why are rents returned as ranges? Many results are buildings with several available units, so `price`, `beds`, `baths` and `sqft` come as `min` and `max`. The first recorded result spans studios to two beds and 1,732 to 2,529 USD. Filter with `beds` to compare like with like, and don't treat `price.min` as a typical rent. ### What happens if a HotPads call fails? You get an HTTP status and a JSON error with a `code`, `message` and `request_id`, and nothing is debited. A missing `area` returns `invalid_parameters` (422). Rate-limited (429) and temporarily unavailable (503) responses include a `Retry-After` header with the seconds to wait. The [errors docs](https://docs.perceptlayer.com/errors) list every code. hotpads us rentals apartments rental listings real estate ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 9 min read ## [Redfin Scraper or API: What You Get](https://perceptlayer.com/blog/redfin-scraper-vs-api) A Redfin scraper vs 14 Redfin endpoints at 1 credit each: recorded Seattle locations, search, property and valuation calls, and the cost per home tracked. --- title: "Search Trend Data for Demand Forecasting: What It Can Show" description: "Google Trends values are a 0 to 100 relative index, not search volumes. What that means for forecasting, with a real interest response and a rescaling example." url: https://perceptlayer.com/blog/search-trend-data-demand-forecasting --- [Blog](https://perceptlayer.com/blog) / [Web data by industry](https://perceptlayer.com/blog/category/web-data) # Search Trend Data for Demand Forecasting: What It Can Show 7 Jul 2026 Updated 31 Oct 2026 Perceptlayer 7 min read Search trend data shows when interest in a topic rises and falls, which makes it a useful leading signal for demand forecasting. It does not show how many searches happened. Google Trends returns an index from 0 to 100 that is rescaled for every request, so you can model shape, seasonality and timing, but not units sold or absolute volume. ## Key takeaways - A Trends value is a share of searches scaled to 0 to 100, not a count. In the recorded response below, the window's maximum is 100. - Each value is scaled against its own request, so a week can carry a different value when you change the window (the worked example below uses made-up numbers). - Use trend data as a regressor or a timing signal next to your own sales history, never as the target variable. - Low-volume terms show as 0, so niche products need broader or related queries. - The `interest` endpoint costs 1 credit per call, so a weekly refresh of 50 keywords in two windows is 100 credits. ## What does a Google Trends value actually measure? A Trends value measures relative popularity: the share of searches for a term in a given place and period, scaled to a 0 to 100 range. Google describes the process itself: "Each data point is divided by the total searches of the geography and time range it represents to compare relative popularity" ( [Google Trends Help, FAQ about Google Trends data](https://support.google.com/trends/answer/4365533), accessed October 2026). The result is then scaled "on a range of 0 to 100 based on a topic's proportion to all searches on all topics." Two consequences follow. First, a value of 40 means "40% of this window's peak share", not 40 searches or 40% of anything absolute. Second, if overall search activity grows, a term's index can stay flat while its raw volume rises, because the denominator moved too. ## What does the API return? The [Google Trends interest endpoint](https://perceptlayer.com/apis/google-trends/interest) returns a series with a timestamp, a human-readable date range and the index value, plus a summary block with the average, maximum and minimum. This is a real recorded response for `tesla` in the US over one year, trimmed: ```bash curl "https://api.perceptlayer.com/v1/google-trends/interest?q=tesla&geo=US&time_range=1y" \ -H "X-API-Key: $API_KEY" ``` ```json { "search_parameters": { "keyword": "tesla", "geo": "US", "time_range": "today+12-m", … }, "timeline_data": [ { "timestamp": 1760832000, "date": "Oct 19 – 25, 2025", "value": 40 }, { "timestamp": 1761436800, "date": "Oct 26 – Nov 1, 2025", "value": 39 }, … ], "interest_over_time": { "average": 49.13, "max_value": 100, "min_value": 39, … } } ``` Read it as: in the week of Oct 19 to 25, 2025, interest was 40% of the strongest week in that 12-month window. The `max_value` here is 100, which is the top of the scale. It tells you nothing about how large that peak was in searches. The request takes `q`, plus optional `geo`, `time_range` (1h to 5y or all), `hl` and `search_type` (web, images, news, youtube or shopping). Authentication is covered in [the docs](https://docs.perceptlayer.com/authentication). ## Why does the window change the numbers? The window changes the numbers because the peak is recalculated for every request. Google says each data point is divided by the totals for the geography and time range it represents. It doesn't spell out what happens when you change the window, but a different window can contain a different maximum, so the same week can plausibly be 40 in one response and a different number in another, with no change in the underlying searches. Here is the arithmetic, using made-up numbers to show the mechanism. Suppose a week has a true search share of 0.002% and the peak week in a 1-year window has 0.005%. That week indexes at 0.002 / 0.005 × 100 = 40. Now request 5 years, where an earlier peak had a share of 0.010%. The same week indexes at 0.002 / 0.010 × 100 = 20. Nothing changed except the denominator. For a forecasting pipeline, this means you should never append values from separate requests to one table as if they shared a scale. Pull one long window and store it whole, or rescale overlapping windows against each other. ## How do you stitch two windows onto one scale? You stitch windows by finding timestamps present in both responses and computing the ratio between them. If the overlap is a few points with non-zero values, the median ratio is a stable scale factor. This only works when both responses use the same granularity. The recorded 1y response is weekly, but We haven't recorded a 5y response, so the script checks for shared timestamps instead of assuming they line up. ```python import os import statistics import requests BASE = "https://api.perceptlayer.com/v1/google-trends/interest" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def series(q, geo, time_range): r = requests.get( BASE, params={"q": q, "geo": geo, "time_range": time_range}, headers=HEADERS, timeout=30, ) r.raise_for_status() return {p["timestamp"]: p["value"] for p in r.json()["timeline_data"]} recent = series("tesla", "US", "1y") long_run = series("tesla", "US", "5y") overlap = [t for t in recent if t in long_run and recent[t] > 0 and long_run[t] > 0] if not overlap: raise SystemExit("No shared timestamps; the windows use different granularity") factor = statistics.median(long_run[t] / recent[t] for t in overlap) print(f"{len(overlap)} shared points, long-window values are x{factor:.2f} of the recent ones") ``` This costs 2 credits (2 calls × 1 credit). Failed calls cost nothing, and the retry rules for lost replies are in [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice). Rounding is the limit here. Values are integers, so a term that sits at 1 or 2 has too little resolution for a reliable ratio. Prefer overlap points with values above 10. ## What can the index show a forecasting model? The index can show seasonality, trend breaks and lead time. Those are shape properties, and shape survives rescaling. A product whose search interest climbs six weeks before your sales history does is a candidate for a lagged regressor, and the lag is something you can measure with a cross-correlation against your own data. What it cannot show is level. You can't turn 40 into units, and you can't compare two terms from separate requests, because each response has its own peak of 100. The catalogue doesn't document requesting several terms in one call, so check in the playground whether `q` accepts more than one before you build comparisons on it. Check the [endpoint page](https://perceptlayer.com/apis/google-trends/interest) and run a call in the playground to see how the response is shaped before you build on it. Useful companions in the same API: | Endpoint | What it adds | Credits | | --- | --- | --- | | [`/v1/google-trends/interest`](https://perceptlayer.com/apis/google-trends/interest) | Index over time for a term | 1 | | [`/v1/google-trends/interest-by-region`](https://perceptlayer.com/apis/google-trends/interest-by-region) | Relative interest across regions | 1 | | [`/v1/google-trends/related`](https://perceptlayer.com/apis/google-trends/related) | Related queries for broadening a thin term | 1 | | [`/v1/google-trends/trending-now`](https://perceptlayer.com/apis/google-trends/trending-now) | What is surging now in a `geo` | 1 | ## What are the honest limits? The limits are sampling, privacy thresholds and rounding. Google says that "only a sample of Google searches are used in Google Trends" and argues that this is sufficient at its scale ( [Google Trends Help](https://support.google.com/trends/answer/4365533), accessed October 2026). It also says Trends "only shows data for popular terms, so search terms with low volume appear as '0.'" In practice that gives you a short list of cautions: - **Zeros are not zero demand.** A 0 means below Google's threshold for that place and period. - **Narrow geographies are noisy.** Smaller `geo` areas have fewer searches behind each point. - **Search is not purchase.** Interest can come from curiosity, news or a product launch with no buying behind it. - **Terms are ambiguous.** A brand name can pick up searches that have nothing to do with your product. - **The data is as found.** Perceptlayer returns what the source shows at the time of the call, so store the call date next to every series. If your category is small, trend data may be too thin to help. In that case your own sales, site search and ad data will do better. ## How do you run this as a forecasting input? You run it as a scheduled pull that stores raw series with the request parameters and the call date, then builds features from them. Keep the raw response, because the rescaling means you can't reconstruct it later from derived values. A simple plan: pull each keyword weekly with `time_range=1y`, which the recorded response returns as weekly points, store every pull so your own history grows past one year, and compute features such as a 4-week moving average and, once a year of pulls has built up, a year-over-year ratio. Test whether adding them lowers error on a holdout period against a baseline that uses only your sales history. If it doesn't, drop the signal. Cost is easy to budget. 50 keywords × 1 call a week × 4 weeks = 200 credits a month. The 100 free credits you get once, after verifying an email address, cover the first two weeks; see [pricing](https://perceptlayer.com/pricing) for what credits cost beyond that. Caching repeat requests is covered in [Cache API Responses in Python](https://perceptlayer.com/blog/cache-web-data-api-responses), and the first call to run is in the [Google Trends API in Python](https://perceptlayer.com/blog/google-trends-api-python) guide. To start, [get a free API key](https://perceptlayer.com/signup) and run an `interest` call in the playground on [the Google Trends API page](https://perceptlayer.com/apis/google-trends). ## APIs in this post - [Google Trends **1 credit per call** · 5 endpoints](https://perceptlayer.com/apis/google-trends) ## Frequently asked questions ### Can Google Trends data predict sales? It can improve a forecast when search interest leads purchases and you test the lag against your own history. It cannot predict sales alone, because the values are a relative index with no units. Treat it as an extra input beside sales data and keep it only if it lowers holdout error. ### Are Google Trends values search volumes? No. Google says each data point is divided by the total searches of its geography and time range, then scaled from 0 to 100 against the topic's proportion of all searches ( [Google Trends Help](https://support.google.com/trends/answer/4365533), accessed October 2026). The value 100 marks the peak of that window, not a fixed number of searches. ### Why do my values change between requests? The scale is recalculated for each request, so a different `time_range`, `geo` or set of terms can put the maximum somewhere else and shift every other value. Store whole series from one request, or rescale overlapping windows with a ratio on shared timestamps, as in the Python example above. ### How much does it cost to pull trend data? Each `interest` call costs 1 credit, and failed calls cost nothing and return `X-Credits-Used: 0`. Every account gets 100 free credits after email verification. After that, credits come in prepaid packs starting at 10,000 credits (the Starter pack), so 10,000 calls × 1 credit = 10,000 credits. See [pricing](https://perceptlayer.com/pricing) for what credits cost and [credits in the docs](https://docs.perceptlayer.com/credits). ### What does a value of 0 mean? Google states that terms with low volume appear as 0, because Trends only shows data for popular terms ( [Google Trends Help](https://support.google.com/trends/answer/4365533), accessed October 2026). A 0 therefore means below the reporting threshold, not no searches. For niche products, query a broader term or use the `related` endpoint to find one. google trends demand forecasting search data time series ## More from the blog 1. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 17 Nov 2026 Perceptlayer 7 min read ## [Grocery Price Data from Five Stores as JSON](https://perceptlayer.com/blog/grocery-price-data-api) Grocery prices from Kroger, Whole Foods, Trader Joe's, Sprouts and Costco at 1 credit a search: sale and unit-price fields, and a weekly basket's cost. 2. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 4 Nov 2026 Perceptlayer 7 min read ## [LinkedIn Jobs API: Job Listings as JSON](https://perceptlayer.com/blog/linkedin-jobs-api) Search public LinkedIn job listings with jobs-search and fetch one posting with job, at 1 credit a call: parameters, cURL and a weekly hiring-signal job. 3. [Web data by industry](https://perceptlayer.com/blog/category/web-data) 31 Oct 2026 Perceptlayer 9 min read ## [Price Monitoring Tool: Build One on Product APIs](https://perceptlayer.com/blog/price-monitoring-tool-build) Build a price monitoring tool in Python: daily Google Shopping, Walmart and idealo searches, price and seller per day in SQLite, 1 credit per check. --- title: "AI Competitor Monitoring Agent: News, Search and Reviews" description: "A weekly Python agent checks news, Google results and Trustpilot reviews for each competitor, keeps only new URLs and review IDs, and costs 3 credits a company." url: https://perceptlayer.com/blog/ai-competitor-monitoring-agent --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # AI Competitor Monitoring Agent: News, Search and Reviews 5 Jul 2026 Perceptlayer 7 min read AI competitor monitoring works best as a scheduled job that collects first and summarises second. This tutorial builds one in Python: once a week, for each company on your list, it pulls Google News articles, Google search results and the latest Trustpilot reviews, keeps only items it hasn't seen before, and has Claude write a digest of what changed with a link for every claim. Each company costs 3 credits a run. ## Key takeaways - Three calls per company per week: `GET /v1/google-news/news`, `GET /v1/google-search/search` and `GET /v1/trustpilot/company-reviews`, at 1 credit each. - Deduplication happens in code, before the model: news and search items are keyed by a normalised URL, reviews by their Trustpilot `id`, and a JSON file remembers every key. - In a test on recorded responses with mocked HTTP calls, the first run found 9 new items and a second run on the same data found 0, for 3 credits a run. - Reviewer names never reach the model: the agent passes rating, title, text, language and date only. - Monitoring 20 companies weekly costs 20 × 3 × 52 ÷ 12 ≈ 260 credits a month. The 100 free credits on signup cover the first run of 60 credits, and a Starter pack of 10,000 credits covers a year. ## How does the agent work? It's a fixed pipeline with a model at the end. Code decides what to fetch and what's new; the model only writes. That split matters for monitoring: a model choosing its own searches every week drifts, costs a different amount each run, and can't tell you reliably what's new, while a list of keys on disk can. 1. For each company, fetch news for its name, the search results for its name and its newest Trustpilot reviews. 2. Turn every item into a key: the URL without scheme, `www.`, query string or trailing slash for news and search (split with Python's [`urllib.parse.urlsplit`](https://docs.python.org/3/library/urllib.parse.html), 2026), and the review `id` for reviews. 3. Drop any key already in `seen.json`, and any repeat within the run. 4. Save the new keys, then send only the new items to Claude with instructions to cite URLs and summarise reviews as themes. 5. Schedule it weekly with cron or any job runner. You need Python 3.10 or later, a Perceptlayer API key and an Anthropic API key. [Get a free API key](https://perceptlayer.com/signup); verified accounts get 100 free credits on signup. Install `pip install anthropic requests` and export `PERCEPTLAYER_API_KEY` and `ANTHROPIC_API_KEY`. ## Which endpoints does it call? One per signal, from the [Google News API](https://perceptlayer.com/apis/google-news), the [Google Search API](https://perceptlayer.com/apis/google-search) and the Trustpilot API, each answering a different question about a competitor. News says what's being reported; search says what someone researching the company finds first; reviews say what customers are complaining or happy about this week. All three cost 1 credit per successful call. | Signal | Endpoint | Parameters used | Key for dedupe | | --- | --- | --- | --- | | News | [`/v1/google-news/news`](https://perceptlayer.com/apis/google-news/news) | `q` (the name in quotes), `hl`, `gl` | Article URL | | Search results | [`/v1/google-search/search`](https://perceptlayer.com/apis/google-search/search) | `query`, `hl`, `gl` | Result URL | | Reviews | [`/v1/trustpilot/company-reviews`](https://perceptlayer.com/apis/trustpilot/company-reviews) | `company_domain`, `sort=recency` | Review `id` | The quotes around the company name in `q` ask Google News for the exact phrase, which cuts unrelated matches for names that are also common words; that's ordinary Google query syntax, which we haven't tested on this endpoint. `sort` on the reviews endpoint takes `relevance` or `recency`; recency is what a weekly diff needs. The [Google News API guide](https://perceptlayer.com/blog/google-news-api) and the [Trustpilot reviews API guide](https://perceptlayer.com/blog/trustpilot-reviews-api) cover the other parameters. ## What do the responses contain? Each signal comes back with an ID-like field and a date, which is what makes a weekly diff possible. The excerpts below are from recorded responses, trimmed with `…`. A news result carries the article `link`, `source.name` and an exact `iso_date` alongside the relative `date`: ```json { "news_results": [ { "position": 1, "title": "Top Strategic Technology Trends for 2027", "link": "https://www.gartner.com/en/articles/top-technology-trends-2027", "type": "article", "iso_date": "2026-10-20T15:59:45+00:00", "date": "2 days ago", "source": { "name": "Gartner", … }, "story_token": "CBMib0FVX3lxTE1zMGNNN1p0UTdtOXV0U3RoU2JvSGlYUXpQYTZIeEFvcHZGZVpiazBjZ2UyZ0ZhVzZ6NUl3c3Y3LTdCWUVfYVd1YnZuMFdtVElGcHlsR3IwM1BnYXBQNGZueEdldUZJOWM0UnRTQ3Y0WQ", … }, … ] } ``` The Trustpilot response for `company_domain=amazon.com` carries the company's `trustScore` and `numberOfReviews` in `businessUnit`, then a `reviews` array. Each review has an `id`, a `rating`, `title`, `text`, `language` and `dates.publishedDate`, plus a `consumer` object the agent deliberately leaves out: ```json { "businessUnit": { "displayName": "Amazon", "numberOfReviews": 49830, "numberOfReviewsLast12Months": 9156, "trustScore": 1.5, … }, "reviews": [ { "id": "6adac54ca4e34a0e087ae2b2", "rating": 1, "language": "de", "dates": { "experiencedDate": "2026-10-23T00:00:00.000Z", "publishedDate": "2026-10-23T04:24:12.000Z" }, … }, … ] } ``` Use `iso_date` and `publishedDate`, not the relative `date`, when you store items: "2 days ago" means something different next week. The search response's `organic_results` carry `position`, `title` and `link`, as in the [Google Search API guide](https://perceptlayer.com/blog/google-search-api-json). ## What does the complete agent look like? Here's the whole script. `get` adds each response's `X-Credits-Used` to a running total. `collect` makes the three calls and flattens them into items. `new_items` drops what's been seen and updates the state. `digest` sends the new items to Claude through the [Messages API](https://docs.anthropic.com/en/api/messages) (Anthropic, 2026). Edit `COMPANIES` to your list; set `CLAUDE_MODEL` to use another model. ```python """Weekly competitor digest: new news, search results and reviews for each company.""" import json import os import pathlib from urllib.parse import urlsplit import anthropic import requests API = "https://api.perceptlayer.com/v1" HEADERS = {"X-API-Key": os.environ["PERCEPTLAYER_API_KEY"]} MODEL = os.environ.get("CLAUDE_MODEL", "claude-opus-5-5") STATE = pathlib.Path("seen.json") COMPANIES = [ {"name": "Amazon", "domain": "amazon.com"}, ] spent = 0 def get(path, **params): global spent r = requests.get(f"{API}/{path}", headers=HEADERS, params=params, timeout=90) spent += int(r.headers.get("X-Credits-Used", "0")) r.raise_for_status() return r.json() def url_key(url): """Same page, same key: no scheme, no www, no query or fragment, no trailing slash.""" parts = urlsplit(url) host = parts.netloc.lower().removeprefix("www.") return f"{host}{parts.path.rstrip('/')}" def collect(company): news = get("google-news/news", q=f'"{company["name"]}"', hl="en", gl="us") search = get("google-search/search", query=company["name"], hl="en", gl="us") reviews = get("trustpilot/company-reviews", company_domain=company["domain"], sort="recency") items = [] for n in news.get("news_results", []): items.append({"kind": "news", "key": url_key(n["link"]), "title": n["title"], "source": n.get("source", {}).get("name"), "date": n.get("iso_date"), "url": n["link"]}) for s in search.get("organic_results", []): items.append({"kind": "search", "key": url_key(s["link"]), "title": s["title"], "position": s.get("position"), "url": s["link"]}) for rv in reviews.get("reviews", []): # No reviewer names or profile data go to the model or the digest. items.append({"kind": "review", "key": f'trustpilot:{rv["id"]}', "rating": rv["rating"], "title": rv.get("title"), "text": rv.get("text", "")[:500], "language": rv.get("language"), "date": rv.get("dates", {}).get("publishedDate")}) score = reviews.get("businessUnit", {}) return items, {"trust_score": score.get("trustScore"), "reviews_total": score.get("numberOfReviews")} def new_items(company, items, seen): known = set(seen.get(company["domain"], [])) fresh, keys = [], set() for it in items: if it["key"] in known or it["key"] in keys: continue keys.add(it["key"]) fresh.append(it) seen[company["domain"]] = sorted(known | keys) return fresh SYSTEM = """You write a weekly competitor digest for a product team. You get, per company, only items that are new since last week: news articles, search results and customer reviews. Group by company. For each, say in two or three bullets what changed, citing the URL of every news or search item you use. Summarise reviews as themes with counts; never quote a reviewer's name. If a company has nothing new, say "No change". Do not add facts that are not in the input.""" def digest(report): client = anthropic.Anthropic() response = client.messages.create( model=MODEL, max_tokens=16000, system=SYSTEM, messages=[{"role": "user", "content": json.dumps(report, ensure_ascii=False)}], ) if response.stop_reason == "refusal": return "The model declined to write the digest." return "".join(b.text for b in response.content if b.type == "text") def run(): seen = json.loads(STATE.read_text()) if STATE.exists() else {} report = [] for company in COMPANIES: items, score = collect(company) fresh = new_items(company, items, seen) report.append({"company": company["name"], **score, "new": fresh}) STATE.write_text(json.dumps(seen)) return report if __name__ == "__main__": report = run() print(digest(report)) print(f"\nCredits used: {spent}") ``` Run it with `python monitor.py`, then add a weekly cron entry such as `0 7 * * 1 cd /path/to/monitor && python monitor.py >> digest.log`. The first run reports everything as new; from the second run on, only changes appear. Our guide to [scheduling web data pulls](https://perceptlayer.com/blog/schedule-web-data-pulls-cron-queue) compares cron with queues and workflow tools. ## What happened when we ran it on recorded data? We haven't run this script against the live API or a model. We ran `run()` twice with `requests.get` mocked to return three recorded responses: Google News for `q=technology`, Google Search for "best restaurants in Berlin" and Trustpilot reviews for `amazon.com`. The news and search recordings are for other queries, so this checks the plumbing, not the relevance of results for a real competitor. | Run | New news | New search | New reviews | Credits | | --- | --- | --- | --- | --- | | First | 3 | 3 | 3 | 3 | | Second, same data | 0 | 0 | 0 | 3 | The recorded samples are short, so 3 items each; a live response has more. The first run's report, the part sent to the model, was under 3,000 characters for one company. The second run shows the property that matters: the same items on the same keys are dropped, so a quiet week produces "No change" instead of a repeated digest. The Trustpilot score and total came through as 1.5 and 49,830. URL keys catch the same article twice, but not the same story from two outlets: syndicated wire stories have different URLs. If that noise matters, group news by `story_token` or by title similarity before the digest. For weighting reviews, see [product review data for sentiment analysis](https://perceptlayer.com/blog/product-review-data-sentiment-analysis). ## What does it cost to run? Three successful calls per company per run, at 1 credit each. Failed calls cost nothing and return `X-Credits-Used: 0`, so `spent` counts what was billed, not what was attempted. The [credits docs](https://docs.perceptlayer.com/credits) explain billing; the model's tokens are billed separately by Anthropic. | Companies | Credits a run | Weekly, per month (× 52 ÷ 12) | Daily, per month (× 30) | | --- | --- | --- | --- | | 5 | 15 | 65 | 450 | | 20 | 60 | 260 | 1,800 | | 100 | 300 | 1,300 | 9,000 | Worked example: 20 companies weekly is 20 × 3 = 60 credits a run, about 260 a month. The 100 free credits on signup cover the first run, and a Starter pack of 10,000 credits covers a year of weekly runs (12 × 260 = 3,120 credits). Running the same list daily is 1,800 credits a month, so a Starter pack of 10,000 credits lasts five months; purchased credits last 12 months. See [pricing](https://perceptlayer.com/pricing) for what credits cost, and [budgeting credits per scheduled agent run](https://perceptlayer.com/blog/scheduled-agent-credit-budget) for caps. Calls run one after another, so 100 companies is 300 calls, five minutes at the free tier's 1 request a second; the [rate limits docs](https://docs.perceptlayer.com/rate-limits) list paid rates, and [concurrent API requests in Python](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) shows how to parallelise within them. ## How do you make it production-ready? Five changes take it from script to job. Each is small, and none changes the cost per company. 1. **Retry the right errors.** Retry `rate_limited` and `temporarily_unavailable` after `Retry-After`; skip a company on `not_found` and keep going. [Handling web data API errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) has the pattern, and the [errors docs](https://docs.perceptlayer.com/errors) list the codes. 2. **Write state only after the digest is sent.** Otherwise a failed email loses a week of items. 3. **Keep a rank history for search.** Store `position` per URL per week, so the digest can say a page moved from 7 to 2, not only that it's new; [search result data for SEO monitoring](https://perceptlayer.com/blog/search-result-data-seo-monitoring) covers which fields to keep. 4. **Track the score.** Store `trustScore` and `numberOfReviews` each week and report the change. 5. **Bound the state file.** Drop keys older than a few months, or it grows forever. For an agent that chooses its own sources, the same endpoints are available through the MCP server, as in the [AI agents docs](https://docs.perceptlayer.com/ai-agents). To start, [get a free API key](https://perceptlayer.com/signup) and run a competitor's domain through the playground on the [Trustpilot API page](https://perceptlayer.com/apis/trustpilot). Data is collected from publicly available sources and returned as found at the time of the call. ## APIs in this post - [Google News **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-news) - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Trustpilot **1 credit per call** · 6 endpoints](https://perceptlayer.com/apis/trustpilot) ## Frequently asked questions ### Which data sources does the monitoring agent use? Google News articles for each company's name, Google search results for the name and the newest Trustpilot reviews for its domain, through `google-news/news`, `google-search/search` and `trustpilot/company-reviews`. Each returns JSON with a URL or review ID and a date, which the agent uses to keep only items it hasn't seen in earlier runs. ### How much does competitor monitoring cost? 3 credits per company per run, one for each endpoint, at 1 credit per successful call; failed calls cost nothing. Twenty companies weekly is about 260 credits a month. The 100 free credits every verified account gets once cover the first run of 60 credits, and a pack covers the rest. Daily runs for the same list are 1,800 credits a month. See [pricing](https://perceptlayer.com/pricing). ### How does the agent avoid reporting the same item twice? It keys news and search results by URL without scheme, `www.`, query string or trailing slash, and reviews by their Trustpilot `id`, and stores every key in `seen.json`. On the next run, any item whose key is already stored is dropped before the model sees it. Syndicated stories with different URLs still get through. ### Does the agent store reviewers' personal data? No. It passes each review's rating, title, text, language and publication date to the model and leaves out the `consumer` object, which holds the reviewer's display name and profile. The system prompt also tells the model never to quote names. Keep it that way if you add fields. ### Why not let the model search for itself? Because a weekly diff needs the same queries every week. A model choosing its own searches varies them, which makes "new since last week" meaningless and the cost per run unpredictable. Code fixes the queries and the cost at 3 credits per company; the model only writes the summary, from items code has already filtered. competitor monitoring ai agents google news trustpilot python ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 9 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [CrewAI Tools: Build a Custom Tool for Live Web Data](https://perceptlayer.com/blog/crewai-custom-tool-web-data) Build a CrewAI custom tool (a BaseTool subclass) that searches Google for live results, cap it at 5 calls a run, or load MCP tools instead. Tested code. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Oct 2026 Perceptlayer 8 min read ## [Build a Market Research Agent with Search and Trends Data](https://perceptlayer.com/blog/market-research-agent-search-trends) Wire Google Search, Trends and News into one Python agent, cap it at 8 credits per question, and see a recorded Trends response. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 11 Sept 2026 Perceptlayer 8 min read ## [Build a Price Tracking Agent in Python with Live Data](https://perceptlayer.com/blog/price-tracking-agent-python) A Python price tracker that checks Google Shopping and eBay once per product per run, stores history in SQLite, flags drops and costs 2 credits a product. --- title: "Expedia Hotels API: Search Hotels and Rooms as JSON" description: "Search Expedia hotels by region and dates, then list rooms and rate plans as JSON. Real parameters, a recorded response and 1 credit per call." url: https://perceptlayer.com/blog/expedia-hotels-api-search-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Expedia Hotels API: Search Hotels and Rooms as JSON 5 Jul 2026 Perceptlayer 7 min read To search Expedia hotels as JSON, call `GET /v1/expedia/hotels-search` with a `region_id`, a check-in date and a check-out date. It returns a ranked list of properties with price, guest rating and a `property_id`. Pass that ID to `GET /v1/expedia/hotels-rooms` to get each room and its rate plans. Every call costs 1 credit, and failed calls cost nothing. ## Key takeaways - The flow is four endpoints on the [Expedia API](https://perceptlayer.com/apis/expedia): `destinations` finds a region, `hotels-search` lists properties, `hotels-rooms` lists rooms and rate plans, `hotels-detail` takes a `property_id`. - `hotels-search` requires `check_in`, `check_out` and `region_id`. Paging uses `limit` and `offset`, and the response includes `has_more` and `next_offset`. - `hotels-rooms` returns `total_price` and `price_per_night` for each `rate_plan_id`, in the currency named in the response. - Each call costs 1 credit, so looking up a region, searching it and pulling rooms for one hotel is 3 credits. - Expedia Group runs its own partner API, Rapid, for travel partners. If you're a partner, that's the first route to check. ## Which endpoints make up the Expedia hotel search flow? Four endpoints cover a hotel search from a typed place name to a bookable room. You look up a destination, search hotels in it for a date range, then drill into one property for rooms or detail. All four are `GET` requests that return JSON and cost 1 credit each. The table lists the required and optional parameters. | Endpoint | Returns | Required | Optional | | --- | --- | --- | --- | | `/v1/expedia/destinations` | Destinations | `query` | `limit` | | `/v1/expedia/hotels-search` | Hotels Search | `check_in`, `check_out`, `region_id` | `adults`, `children`, `region_name`, `sort`, `limit`, `offset` | | `/v1/expedia/hotels-rooms` | Hotels Rooms | `check_in`, `check_out`, `property_id` | `adults`, `children` | | `/v1/expedia/hotels-detail` | Hotels Detail | `property_id` | `check_in`, `check_out`, `adults` | Each endpoint has its own page with a playground: [Destinations](https://perceptlayer.com/apis/expedia/destinations), [Hotels Search](https://perceptlayer.com/apis/expedia/hotels-search), [Hotels Rooms](https://perceptlayer.com/apis/expedia/hotels-rooms) and [Hotels Detail](https://perceptlayer.com/apis/expedia/hotels-detail). The wider [Travel APIs](https://perceptlayer.com/verticals/travel) area lists the other travel sources in the catalogue. ## How do you authenticate and make the first call? Send your key in the `X-API-Key` header on every request. Keys start with `sk_live_`, and where a header isn't possible you can use the `api_key` query parameter instead. A free account gets 100 credits after you verify an email address, with no credit card, so the calls below are free to try. The [authentication docs](https://docs.perceptlayer.com/authentication) cover the details. Start with the destination lookup. `query` takes up to 100 characters, and `limit` is optional: ```bash curl "https://api.perceptlayer.com/v1/expedia/destinations?query=Paris&limit=5" \ -H "X-API-Key: $API_KEY" ``` Run it in the playground on the [Destinations page](https://perceptlayer.com/apis/expedia/destinations) to see the response for your own query, then use the region you want as `region_id` in the search. The recorded searches in this article use `region_id=2734` with `region_name=Paris, France`. If you don't have a key yet, [get a free API key](https://perceptlayer.com/signup) first. ## How do you search hotels for a date range? `GET /v1/expedia/hotels-search` takes a `region_id`, `check_in` and `check_out`, and returns a ranked list of properties for those dates. Add `adults` for the party size, `region_name` as a label (up to 120 characters), and `limit` and `offset` to page. This request asks for the first 10 hotels in Paris for two adults: ```bash curl "https://api.perceptlayer.com/v1/expedia/hotels-search?region_id=2734®ion_name=Paris%2C+France&check_in=2026-11-20&check_out=2026-11-23&adults=2&limit=10" \ -H "X-API-Key: $API_KEY" ``` ### Parameters | Parameter | Type | Required | Notes | | --- | --- | --- | --- | | `check_in` | string | yes | Dates in the recorded requests look like `2026-11-20` | | `check_out` | string | yes | Same format as `check_in` | | `region_id` | string | yes | From the destinations lookup | | `adults` | integer | no | Number of adults | | `children` | string | no | Children in the party | | `region_name` | string | no | Up to 120 characters | | `sort` | string | no | One of `recommended`, `price_low_to_high`, `review` | | `limit` | integer | no | Hotels per page | | `offset` | integer | no | Where the page starts | ### What does the response look like? This is a recorded response for the request above, trimmed to the first hotel: ```json { "success": true, "data": { "region_id": "2734", "check_in": "2026-11-20", "check_out": "2026-11-23", "hotels": [ { "property_id": "564660", "position": 1, "name": "Mercure Paris Centre Tour Eiffel", "area": "Paris", "guest_rating": 8, "guest_rating_label": "Very good", "review_count": 1000, "total_price": 690, "price_per_night": 230, "free_cancellation": false, "sponsored": true, "amenities_preview": ["restaurant", "bar"], "currency": "EUR" }, … ], "total_results": 500, "offset": 0, "has_more": true, "next_offset": 10 }, "meta": { "endpoint_family": "hotel_search", "billable": true } } ``` A few fields are worth knowing before you build on them. The recording shows `position: 1` and `sponsored: true` on the hotel shown (and `sponsored: true` on both hotels recorded); the brief doesn't document what either field means, so check them against your own results before relying on them. The prices are in the `currency` field ( `EUR` here), and `total_price` for this stay is `price_per_night` times three nights: 3 × 230 = 690. Some hotels also carry an `original_price` next to `total_price`, which shows a discount. Each hotel also has `url` and `image_urls`, left out above. ### How do you page through results? Use `has_more` and `next_offset`. The recorded response reports `total_results` of 500, `offset` of 0 and `next_offset` of 10 with `limit=10`, so the next call repeats the request with `offset=10`. The recording shows `has_more` as `true`; no final page is recorded, so check the last page's response yourself before you rely on its shape. Each page is a separate call at 1 credit, so reading 500 results at 10 per page is 50 calls × 1 credit = 50 credits. The [request and response docs](https://docs.perceptlayer.com/requests) describe the response envelope. ## How do you list rooms and rate plans for one hotel? `GET /v1/expedia/hotels-rooms` takes a `property_id` from the search, the same dates, and optionally `adults` and `children`. It returns each room type with its features, amenities and a list of rate plans, each with a `rate_plan_id`, `total_price` and `price_per_night`. Rooms are where you see the spread within one hotel: ```bash curl "https://api.perceptlayer.com/v1/expedia/hotels-rooms?property_id=564660&check_in=2026-11-20&check_out=2026-11-23&adults=2" \ -H "X-API-Key: $API_KEY" ``` Recorded response for that request, trimmed to the first room: ```json { "success": true, "data": { "property_id": "564660", "check_in": "2026-11-20", "check_out": "2026-11-23", "currency": "EUR", "rooms": [ { "unit_id": "226385", "name": "Classic Room, 1 Double Bed", "features": ["18 sq m", "Sleeps 2"], "highlights": ["Soundproofed rooms", "Air-conditioning"], "amenities": ["Wheelchair accessibility", "Bathtub or shower"], "rate_plans": [ { "rate_plan_id": "397104173", "total_price": 690, "price_per_night": 230 }, { "rate_plan_id": "397104181", "total_price": 825, "price_per_night": 275 } ] }, … ] }, "meta": { "endpoint_family": "room_offers", "billable": true } } ``` The first rate plan, at 690 for three nights, matches the `total_price` the search gave for the same hotel and dates. The second room in the recorded response, "Classic Room, 2 Single Beds", has plans at 700 and 825. In this recording the search price equals the lowest rate plan of the first room, and the rooms call shows what the other plans cost. ## What does the detail endpoint add? `GET /v1/expedia/hotels-detail` takes a `property_id` and, optionally, `check_in`, `check_out` and `adults`. Only `property_id` is required. We haven't recorded a response for it, so we can't show its fields here. See the [Hotels Detail page](https://perceptlayer.com/apis/expedia/hotels-detail) for the fields and run it in the playground with your key. ## How do you chain the calls in Python? Search first, then fetch rooms for the top results. The script uses only the parameters and fields in the recordings above, and you need `API_KEY` set. It searches Paris for two adults, takes the first three hotels and prints each room's rate plans: ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} DATES = {"check_in": "2026-11-20", "check_out": "2026-11-23"} def get(path, **params): r = requests.get(BASE + path, headers=HEADERS, params=params, timeout=30) r.raise_for_status() return r.json()["data"] search = get( "/v1/expedia/hotels-search", region_id="2734", region_name="Paris, France", adults=2, limit=10, **DATES, ) for hotel in search["hotels"][:3]: print(hotel["name"], hotel["total_price"], hotel["currency"]) rooms = get( "/v1/expedia/hotels-rooms", property_id=hotel["property_id"], adults=2, **DATES, ) for room in rooms["rooms"]: for plan in room["rate_plans"]: print(" ", room["name"], plan["rate_plan_id"], plan["total_price"]) ``` This run makes 1 search and 3 rooms calls: 4 calls × 1 credit = 4 credits. Add a `try` around `raise_for_status` and read the JSON error body when it fails; the [error docs](https://docs.perceptlayer.com/errors) list the codes. If a request times out, it may have succeeded and been billed, because requests have no idempotency key. ## What does it cost to run at scale? Every call to these endpoints costs 1 credit, so cost is the call count. Watching 50 hotels for one stay, once a day for 30 days, is 50 × 30 = 1,500 rooms calls, or 1,500 credits. That's above the 100 free credits you get on signup, and within the smallest 10,000-credit Starter pack. Purchased credits last 12 months, with no subscription. [Pricing](https://perceptlayer.com/pricing) has what credits cost. Responses carry `X-Credits-Used` and `X-Credits-Remaining`, so you can track spend per call. Rates are per account and counted per minute: free accounts get 1 request a second, and paying accounts at least 5. A 429 response carries a `Retry-After` header with the seconds to wait. See [rate limits](https://docs.perceptlayer.com/rate-limits) and [credits](https://docs.perceptlayer.com/credits). For a rate-monitoring design, read [hotel price data for rate monitoring](https://perceptlayer.com/blog/hotel-price-data-rate-monitoring). ## Should you use Expedia's own API instead? If you're a travel partner of Expedia Group, probably yes. Expedia Group runs a partner API called [Rapid](https://partner.expediagroup.com/en-us/solutions/build-your-travel-experience/rapid-api) for lodging search and booking, and its [developer support pages](https://developers.expediagroup.com/rapid/support) point to the partner support channels. Check there for current access terms. It's the natural route if you need to take bookings or want a contractual relationship with Expedia. Perceptlayer fits a different job: reading search results as JSON without a partner agreement, for price comparison, research or an agent that needs live hotel prices. Data is collected from publicly available sources and returned as found at the time of the call. For other hotel sources, see the [Booking.com guide](https://perceptlayer.com/blog/booking-com-hotel-prices-api) and the [Google Hotels guide](https://perceptlayer.com/blog/google-hotels-api). Next step: [get a free API key](https://perceptlayer.com/signup), then run `hotels-search` in the playground on the [Expedia API page](https://perceptlayer.com/apis/expedia). ## APIs in this post - [Expedia **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/expedia) ## Frequently asked questions ### Does Expedia have a public hotel search API? Expedia Group offers a partner API, Rapid, for lodging search and booking, aimed at travel partners. For read-only hotel search results as JSON without a partner agreement, the `hotels-search` endpoint on Perceptlayer takes a region, dates and party size and returns ranked properties with prices. ### How much does an Expedia hotel search cost per call? Each of the four Expedia endpoints costs 1 credit per successful call. A search plus rooms for one hotel is 2 credits. Failed calls cost nothing and return `X-Credits-Used: 0`. Free accounts get 100 credits on signup, and [pricing](https://perceptlayer.com/pricing) shows what credit packs cost. ### How do I get the region\_id for a city? Call `GET /v1/expedia/destinations` with `query` set to the place name, for example `query=Paris`, and use the region you want as `region_id` in the search. The recorded searches in this guide use `region_id=2734` for Paris, France. ### Why is the search price different from a room's price? The search returns one headline price per hotel, such as 690 for three nights in the recorded response. The rooms endpoint lists every room and rate plan for the same dates, such as 690 and 825 for one room type. Use the rooms call when you need the full spread. ### What happens when the balance runs out? The service is prepaid. When credits run out, calls return `insufficient_credits` with HTTP status 402 and nothing more is debited. There is no automatic top-up. Errors come back as JSON with a `code`, `message` and `request_id`, described in the [error docs](https://docs.perceptlayer.com/errors). expedia hotel search api hotel prices travel rooms ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 25 Aug 2026 Updated 23 Oct 2026 Perceptlayer 8 min read ## [Booking.com Hotel Prices API: Search, Rooms and Reviews](https://perceptlayer.com/blog/booking-com-hotel-prices-api) Eleven Booking.com endpoints as JSON: search, prices, rooms and reviews, with parameters and a 1,000-hotel price check costed in credits. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 8 Nov 2026 Perceptlayer 8 min read ## [Expedia Scraper or API: What You Get](https://perceptlayer.com/blog/expedia-scraper-vs-api) An Expedia scraper vs 4 Expedia endpoints at 1 credit each: a recorded Paris search and rooms call with total\_price, rate plans, and the cost per hotel-date. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read ## [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) Expedia, Booking.com and Google Hotels hotel endpoints compared on recorded Paris searches: price as numbers or strings, hotel IDs, 1 credit per call. --- title: "Claude MCP Web Search: Live Results for an Agent" description: "Add the Perceptlayer MCP server to Claude, let the agent call the Google Search endpoint, and count its cost: 1 credit per search call." url: https://perceptlayer.com/blog/claude-agent-live-search-mcp --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Claude MCP Web Search: Live Results for an Agent 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 10 min read To give a Claude agent live search results over MCP, add the Perceptlayer MCP server at `https://perceptlayer.com/mcp` with your API key, then let the agent find and call the Google Search endpoint through the `search_endpoints`, `get_endpoint` and `call_endpoint` tools. Each successful search call costs 1 credit and failed calls cost nothing. This tutorial wires it up in Claude Code and in a Python agent, then counts the credits per question. ## Key takeaways - One command, `claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp`, connects Claude Code to the server with a Bearer header. - The server exposes three tools: `search_endpoints`, `get_endpoint` and `call_endpoint`. - A successful Google Search call costs 1 credit, so the 100 free credits on signup cover 100 search calls. - Failed calls cost nothing and return `X-Credits-Used: 0`, so errors your agent receives don't drain credits. A timeout is different: the call may have succeeded and been billed, because requests have no idempotency key (see [retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice)). - A cap of 3 search calls per question in the system prompt is a guardrail, not a hard limit, so the script in step 4 prints the call count for you to check against it. ## What do you need before you start? You need a Perceptlayer API key, the `claude` CLI or the Claude Agent SDK for Python, and an environment variable holding the key. Keys start with `sk_live_`. Every account gets 100 free credits after verifying an email address, with no credit card, so you can run everything below without paying. [Get a free API key](https://perceptlayer.com/signup) first, then export it. ```bash export API_KEY="sk_live_..." ``` The same key authenticates plain HTTP calls with the `X-API-Key` header and the MCP server with an `Authorization: Bearer` header. Where headers aren't possible, the `api_key` query parameter also works. The [authentication section of the docs](https://docs.perceptlayer.com/authentication) is the place to read more about keys. ## How does a Claude agent search the web over MCP? The Model Context Protocol lets an agent discover and call tools on a remote server. Perceptlayer's server speaks [Streamable HTTP](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http), the protocol's standard transport for remote servers, and gives the agent access to a catalogue of 480 websites and 2,782 endpoints, all returning JSON. The server's tools are `search_endpoints`, `get_endpoint` and `call_endpoint`. The [AI agents (MCP) section of the docs](https://docs.perceptlayer.com/ai-agents) covers the server, and the [protocol site](https://modelcontextprotocol.io/) describes MCP itself. ## Step 1: How do you add the MCP server to Claude Code? Run one command. It registers the server under the name `perceptlayer`, using the HTTP transport and your key as a Bearer token. Claude Code stores the entry in its MCP configuration. ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp \ --header "Authorization: Bearer $API_KEY" ``` Confirm the server connected: ```bash claude mcp list ``` You should see `perceptlayer` in the list. Inside a Claude Code session, the `/mcp` command shows the connection status of the server. If you want the entry scoped to a project instead of your user, the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp) lists the scope options. ### Ask a question that needs live search Start `claude` and ask something the model can't know from training, such as: "Use Perceptlayer to search Google for the latest Claude Code release notes and list the top five result titles with their URLs." The agent needs access to three tools to reach the Google Search endpoint: `search_endpoints`, `get_endpoint` and `call_endpoint`. If your permission settings block any of them, the call will fail, so allow all three. ## Step 2: Which Google Search endpoint should the agent use? The Google Search API has 7 endpoints, and every one costs 1 credit per successful call. For an agent answering open questions, start with `/v1/google-search/search`, which takes a required `query` and optional parameters for country ( `gl`), language ( `hl`), result count and paging. The others fit narrower jobs, so tell the agent which to prefer if you care. | Endpoint | Required | Use it when | | --- | --- | --- | | [`/v1/google-search/search`](https://perceptlayer.com/apis/google-search/search) | `query` | General web search with the full parameter set | | [`/v1/google-search/search-light`](https://perceptlayer.com/apis/google-search/search-light) | `query` | A smaller parameter set, with `num` for result count | | [`/v1/google-search/search-ai-overview`](https://perceptlayer.com/apis/google-search/search-ai-overview) | `query` | You want the AI Overview for a query | | [`/v1/google-search/google-ai-mode-search`](https://perceptlayer.com/apis/google-search/google-ai-mode-search) | `q` | You want an AI Mode answer, with `follow_up_token` for follow-ups | | [`/v1/google-search/search-light-autocomplete`](https://perceptlayer.com/apis/google-search/search-light-autocomplete) | `query` | Query suggestions, with `hl` and `limit` | Note that `google-ai-mode-search` uses `q` where the others use `query`. A hard-coded script needs to get that right. The [Google Search API page](https://perceptlayer.com/apis/google-search) lists all seven, including [`search-advanced`](https://perceptlayer.com/apis/google-search/search-advanced) and [`search-advanced-place`](https://perceptlayer.com/apis/google-search/search-advanced-place), and the [search engines hub](https://perceptlayer.com/verticals/search) shows related sources. ### When is Claude's built-in web search enough? Often it is. If you want a quick, prose answer to an occasional question and don't need to control how the search runs, Claude's own web search tool may be all you need, and you should start there. Check [Anthropic's web search tool documentation](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) for how to enable it on your surface and plan. A structured endpoint earns its place when the agent needs fields it can rely on. `/v1/google-search/search` takes `gl` and `hl` to fix country and language, `amount` to set the result count, and returns separate fields for organic results, related questions and related searches. Two sibling endpoints return an AI Overview or an AI Mode answer for a query. The cost is a key, a credit per call and a prompt that handles errors. If your agent only reads the answer and never parses it, that overhead may not pay off. For a longer comparison of tool-calling approaches, read [MCP vs function calling for live web data](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data). ## Step 3: How do you check the endpoint outside the agent? Call the endpoint directly with cURL before trusting an agent with it. If the request works from your terminal, any later failure is in the agent's prompt or tool use, not in the data call. The `-i` flag prints the response headers so you can see the status. ```bash curl -i "https://api.perceptlayer.com/v1/google-search/search?query=claude%20code%20release%20notes" \ -H "X-API-Key: $API_KEY" ``` The endpoint returns the search results as JSON. This excerpt is from a recorded response to a different request, `query=best restaurants in Berlin&hl=en&safe=off`, trimmed with …: ```json { "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. It holds two Michelin stars, has been frequently ranked on The World's 50 ..." }, { "position": 2, "title": "Restaurants - Berlin", "link": "https://guide.michelin.com/us/en/berlin-region/berlin/restaurants", "snippet": "Berlin and surroundings: 1-48 of 79 restaurants · POTS · Rutz · GOLVET · Bandol sur mer · Nobelhart & Schmutzig · Oukan · 136 · FACIL." } ], "related_questions": [ { "question": "What is the coolest restaurant in Berlin?", "next_page_token": "…" }, { "question": "What is famous to eat in Berlin?", "next_page_token": "…" } ] } ``` Each item in `organic_results` has a `position`, a `title`, a `link` and a `snippet`, which is what an agent needs to cite a page. `related_questions` holds follow-up questions the agent can use to refine a search. The full response has more fields, including `related_searches` and `local_results`. To see a real response for your own query before you wire up the agent, run it in the playground on the [Google Search API page](https://perceptlayer.com/apis/google-search); the [Search endpoint page](https://perceptlayer.com/apis/google-search/search) lists every parameter. Break the call on purpose to see the failure shape. Send a bad key and you get HTTP 401 with a body like `{"error": {"code": "invalid_api_key", ...}}`, and the response carries `X-Credits-Used: 0`. The [errors section of the docs](https://docs.perceptlayer.com/errors) is the reference for error responses. ## Step 4: How do you build a Python agent that uses the server? Use the Claude Agent SDK, point `mcp_servers` at the Perceptlayer URL, and allow the three tools by name. The script below asks one question, prints the answer, and counts how many times the agent called `call_endpoint`. The script counts only `call_endpoint` calls. `search_endpoints` and `get_endpoint` only look up the catalogue and cost nothing, so leaving them out doesn't hide any spend. The count includes failed calls, which are free, so it can be higher than the number of billed calls. For the exact figure, read the credits used and remaining that each `call_endpoint` result reports. Install the SDK with `pip install claude-agent-sdk`, then save this as `agent.py`: ```python import asyncio import os from claude_agent_sdk import ( AssistantMessage, ClaudeAgentOptions, TextBlock, ToolUseBlock, query, ) QUESTION = "What changed in the latest Claude Code release? Cite the result URLs you used." SYSTEM_PROMPT = ( "You answer questions with live web search. " "Use the perceptlayer MCP tools to find and call a Google Search endpoint. " "Make at most 3 search calls per question. Cite the URLs you relied on." ) OPTIONS = ClaudeAgentOptions( system_prompt=SYSTEM_PROMPT, mcp_servers={ "perceptlayer": { "type": "http", "url": "https://perceptlayer.com/mcp", "headers": {"Authorization": f"Bearer {os.environ['API_KEY']}"}, } }, allowed_tools=[ "mcp__perceptlayer__search_endpoints", "mcp__perceptlayer__get_endpoint", "mcp__perceptlayer__call_endpoint", ], ) async def main(): data_calls = 0 async for message in query(prompt=QUESTION, options=OPTIONS): if not isinstance(message, AssistantMessage): continue for block in message.content: if isinstance(block, ToolUseBlock) and block.name.endswith("call_endpoint"): data_calls += 1 elif isinstance(block, TextBlock): print(block.text) print(f"\ndata calls: {data_calls}") asyncio.run(main()) ``` The [Agent SDK documentation](https://code.claude.com/docs/en/agent-sdk/python) covers the options used above. ## Step 5: What does the script print? Run it with `python agent.py`. The agent's answer text prints as it arrives, followed by one summary line in this format, where `` is a number from your run: ```text data calls: ``` Compare that number with the cap in the system prompt. The credits used and remaining come from the `call_endpoint` results themselves, which report both. If the count is higher than the cap, tighten the prompt. ### Why cap the number of search calls? Each successful search call costs 1 credit, so the number of calls sets the credit cost of a question. The prompt line "at most 3 search calls per question" asks the agent to keep that spend to 3 credits, and the counter shows whether it does. The model can ignore the instruction, so treat the cap as a guardrail, not a guarantee, and check the printed count while you tune the prompt. For a hard limit, enforce it in your own code, for example by stopping the run after the third `call_endpoint` call. ## What does each question cost? A successful `call_endpoint` call to a Google Search endpoint costs 1 credit, so an agent that searches twice spends 2 credits. The figures below count only those search calls; `search_endpoints` and `get_endpoint` cost nothing, so they add no credits. The free tier of 100 credits, granted once on signup, covers 100 search calls, and purchased credits last 12 months with no subscription and no seats. The table below counts Perceptlayer credits only. Claude model tokens are billed separately by Anthropic, so the real cost of a question is higher than the credit figure. | Workload | Calls | Credits | Covered by | | --- | --- | --- | --- | | 100 questions × 1 search each | 100 | 100 | Free credits (100 on signup) | | 33 questions × 3 searches each | 99 | 99 | Free credits (100 on signup) | | 10,000 questions × 1 search each | 10,000 | 10,000 | Starter pack (10,000 credits) | | 5,000 questions × 3 searches each | 15,000 | 15,000 | Build pack (50,000 credits) | The third row is 10,000 calls × 1 credit = 10,000 credits, exactly the Starter pack's 10,000. The last row is 5,000 questions × 3 calls × 1 credit = 15,000 credits, within the Build pack's 50,000. The [pricing page](https://perceptlayer.com/pricing) shows what each pack costs, and the [credits section of the docs](https://docs.perceptlayer.com/credits) covers credits. Because failed calls are free, a rate-limited or erroring call doesn't add to the total. Only a successful response debits credits. ## What happens when a call fails? A failed call returns an HTTP status and a JSON body with `error.code`, `error.message` and `error.request_id`, and it costs nothing. Give the agent a rule for each case in the system prompt so it knows whether to retry, change the query, or stop, and doesn't loop. | Code | Status | What the agent should do | | --- | --- | --- | | `invalid_parameters` | 422 | Check the parameters against the endpoint page, fix, retry once | | `rate_limited` | 429 | Wait for the seconds in the `Retry-After` header, then retry; see [rate limits](https://docs.perceptlayer.com/rate-limits) | | `source_error` | 502 | Retry once, then report that search is unavailable | | `temporarily_unavailable` | 503 | Wait for the seconds in the `Retry-After` header, then retry | | `insufficient_credits` | 402 | Stop and tell the user to top up | | `invalid_api_key` | 401 | Stop; the key is wrong or revoked | | `restricted_endpoint` | 403 | Stop; the endpoint needs the restricted-endpoint terms accepted in the dashboard | Add a sentence such as "If a tool call fails with insufficient\_credits or invalid\_api\_key, stop and say so" to `SYSTEM_PROMPT`. Retrying a returned error is safe for your balance because failures aren't billed. A timeout is the exception: if the reply was lost, the request may have succeeded and been billed, and requests have no idempotency key. [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers how to handle that. ## Next step: point the same server at more sources The server isn't limited to Google Search. The same key and the same three tools reach the rest of the catalogue, so the agent can move from a search result to a listing, a review page or a price without a new integration. Some endpoints, covering social, personal and SEO data, need you to accept the restricted-endpoint terms in the dashboard first. Add the server with the command in step 1, ask your agent a question that needs live data, and check the credit count it prints. For more on using the server with agents, see the [MCP docs](https://docs.perceptlayer.com/ai-agents), and for related reading, see [MCP server for web scraping](https://perceptlayer.com/blog/mcp-server-for-web-scraping), [capping web data spend for agents](https://perceptlayer.com/blog/ai-agent-web-data-costs) and [Google search results as JSON](https://perceptlayer.com/blog/google-search-api-json). More agent tutorials are in the [AI agents category](https://perceptlayer.com/blog/category/ai-agents). ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) ## Frequently asked questions ### How much does a Claude MCP web search cost with Perceptlayer? A successful call to a Google Search endpoint costs 1 credit. The free tier gives 100 credits on signup, and the smallest pack is 10,000 credits, enough for 10,000 search calls at 1 credit each. See [pricing](https://perceptlayer.com/pricing) for what credits cost. Failed calls cost nothing and return `X-Credits-Used: 0`, so errors never add to your bill. ### Do I need the Claude Agent SDK, or does Claude Code work on its own? Claude Code works on its own. The `claude mcp add` command registers the server, and you ask questions in the terminal. The Agent SDK is for embedding the same behaviour in your own application, where you want to control the prompt, cap the number of searches and print the credits used per question. ### Can I use the key in a header other than Authorization? On plain HTTP calls, send the key in `X-API-Key`, or in the `api_key` query parameter where headers aren't possible. The MCP server uses an `Authorization: Bearer` header in the Claude Code command shown above. Keys start with `sk_live_`, and the [authentication section of the docs](https://docs.perceptlayer.com/authentication) has more on keys. ### What does the agent do when search is rate limited? A rate-limited call returns HTTP 429 with the code `rate_limited`, and it isn't billed. The response carries a `Retry-After` header with the seconds to wait, and a 503 does too. Free accounts get 1 request a second, shared by all the account's keys. Put a retry rule in the system prompt so the agent waits that long and tries again instead of looping. ### What are the data-use terms for search results? Data is collected from publicly available sources and returned as found at the time of the call. How you use results is your responsibility, so check the terms that apply to your use case. Social, personal and SEO endpoints need you to accept the restricted-endpoint terms, and you shouldn't use personal data to contact people without a lawful basis. claude mcp google search ai agents tool calling ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [AI Agent Tools: What an Agent Needs for Web Data](https://perceptlayer.com/blog/ai-agent-tools-web-data) An agent tool is a name, a description, an input schema and a result. How search, lookup and fetch tools map to three MCP tools, two of them free. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 13 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read ## [What Is an MCP Server? A Working Example with Web Data](https://perceptlayer.com/blog/what-is-an-mcp-server) An MCP server exposes tools, resources and prompts to AI apps over stdio or Streamable HTTP. See a real tools/list and tools/call, and what each costs. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 26 Sept 2026 Perceptlayer 7 min read ## [MCP Server Too Many Tools: Keeping Agent Context Small](https://perceptlayer.com/blog/mcp-too-many-tools-context) One tool per endpoint for 1,659 endpoints is about 567,000 characters of schema. A 10-step checklist to keep an MCP server's tool list small. --- title: "Craigslist API: Get Classified Postings as JSON" description: "Search Craigslist postings by site, category and price as JSON, then poll for new ones. A real response, the parameters and the credit cost." url: https://perceptlayer.com/blog/craigslist-api-postings-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Craigslist API: Get Classified Postings as JSON 3 Jul 2026 Updated 26 Oct 2026 Perceptlayer 8 min read Craigslist's documented developer interface is for submitting ads, not reading them, but you can get its classified postings as JSON with four GET calls: `sites`, `categories`, `search` and `posting`. Each call costs 1 credit, and a failed call costs nothing. This guide walks through them in order, shows a real search response, and ends with a polling loop that watches a category for new postings and a worked credit budget for it. ## Key takeaways - The Craigslist API has 4 endpoints, `/v1/craigslist/sites`, `/categories`, `/search` and `/posting`, and each successful call costs 1 credit. - `search` filters by `site`, `subarea`, `category`, `query`, `min_price`, `max_price`, `sort` and `page`, and returns `total`, `page`, `has_more` and a `results` array. - Use the `sites` and `categories` endpoints to look up the values you pass to `search`, so you never hard-code a guess. - A poll every 15 minutes is 96 calls a day, or 2,880 credits over 30 days, before any `posting` lookups. - Failed calls return `X-Credits-Used: 0`, so a retry loop around a 429 or 503 doesn't bill you for the failures. ## Is there an official Craigslist API? None that we know of for reading postings. The interface Craigslist documents is a [bulk posting interface](https://www.craigslist.org/about/bulk_posting_interface) for submitting ads, which is a different job from searching them, and its [terms of use](https://www.craigslist.org/about/terms.of.use) are worth reading before you build anything on top of the site. If you need to read postings as structured data, the options are a scraper you maintain or an API that returns them already parsed. The Perceptlayer [Craigslist API](https://perceptlayer.com/apis/craigslist) is the second option. It returns JSON with named fields instead of HTML, and data is collected from publicly available sources and returned as found at the time of the call. If you're weighing the two approaches, [what maintaining a scraper involves](https://perceptlayer.com/blog/scraper-vs-api-maintenance-cost) lays out the ongoing work. ## What does each Craigslist endpoint return? The four endpoints map onto how you'd browse the site by hand: pick a city, pick a section, search, open a posting. All four are `GET` requests under `https://api.perceptlayer.com`, all cost 1 credit per successful call, and none has required parameters except `posting`, which needs an `id`. | Endpoint | Returns | Credits | Required | Optional | | --- | --- | --- | --- | --- | | `/v1/craigslist/sites` | Craigslist sites (cities and regions) | 1 | none | `country`, `query` | | `/v1/craigslist/categories` | Posting categories | 1 | none | `query` | | `/v1/craigslist/search` | Search results | 1 | none | `site`, `subarea`, `category`, `query`, `min_price`, `max_price`, `sort`, `page` | | `/v1/craigslist/posting` | One posting | 1 | `id` | none | Each endpoint also has its own page with a playground: [Sites](https://perceptlayer.com/apis/craigslist/sites), [Categories](https://perceptlayer.com/apis/craigslist/categories), [Search](https://perceptlayer.com/apis/craigslist/search) and [Posting](https://perceptlayer.com/apis/craigslist/posting). The API belongs to the [Marketplaces](https://perceptlayer.com/verticals/marketplaces) area of the catalogue. ## How do you find the right site and category? Call `sites` and `categories` once, filter them with `query`, and store the values you need. The `site` and `category` parameters on `search` take short codes, and looking them up beats guessing. The recorded search below uses `site=portland` and `category=bia`, and its results report `portland` as the site and `mlt` as the sub-area. ```bash # Which sites match "portland"? curl "https://api.perceptlayer.com/v1/craigslist/sites?query=portland" \ -H "X-API-Key: $API_KEY" # Which categories match "bike"? curl "https://api.perceptlayer.com/v1/craigslist/categories?query=bike" \ -H "X-API-Key: $API_KEY" ``` `sites` also takes a `country` filter, and `query` is capped at 100 characters on both endpoints. Store the values you get back rather than looking them up on every poll. Run the two calls once and the 2 credits are a setup cost, not a per-poll cost. If you're new to the key and headers, [authentication](https://docs.perceptlayer.com/authentication) covers them, and the [quick start](https://docs.perceptlayer.com/quickstart) gets a first call running. ## Which parameters does the search endpoint take? `GET /v1/craigslist/search` takes eight optional parameters, so a bare call is valid, but you'll nearly always set `site` and `category`. Filters combine: a site, a category, a text query and a price range narrow the result set before it reaches you, which keeps pages short and credits low. | Parameter | Type | Notes | | --- | --- | --- | | `site` | string | A site from the `sites` endpoint, such as `portland` | | `subarea` | string | A sub-area within a site, such as `mlt` in the recorded response | | `category` | string | A category from the `categories` endpoint, such as `bia` | | `query` | string | Search text, up to 200 characters | | `min_price` | integer | Lower price bound | | `max_price` | integer | Upper price bound | | `sort` | string | One of `date`, `dateoldest`, `rel`, `priceasc`, `pricedsc` | | `page` | integer | Page number, starting from the `page` value in the response | The `sort` values are the lever for monitoring. For a poller, `date` is the one to start with. The reference doesn't spell out how each value orders results, so check the order on your first response before you rely on it. ## What does a search response look like? A search returns a `data` object with the match count and a `results` array of postings. Here's a real call for bikes between 50 and 300 dollars in Portland, followed by an excerpt of the recorded response, trimmed with `…`. ```bash curl "https://api.perceptlayer.com/v1/craigslist/search?site=portland&category=bia&query=bike&min_price=50&max_price=300" \ -H "X-API-Key: $API_KEY" ``` ```json { "success": true, "data": { "total": 821, "page": 1, "per_page": 360, "has_more": true, "results": [ { "position": 1, "id": "wnD16b4hEY7DaHprfGYGAg", "posting_id": 7988730852, "title": "21\" Specialized Sirrus A1 commuter", "url": "https://www.craigslist.org/view/wnD16b4hEY7DaHprfGYGAg", "price": 250, "currency": "USD", "images": [ "https://images.craigslist.org/00s0s_f9B6cl8tXrr_0Cz0t2_600x450.jpg" ], "slug": "portland-21-specialized-sirrus-a1", "location": { "name": "multnomah county", "site": "portland", "subarea": "mlt", "latitude": 45.56, "longitude": -122.6001 }, "bumped_at": "2026-10-23T20:30:33Z" }, … ] }, "meta": { "endpoint_family": "search", "billable": true } } ``` The fields that matter for most jobs are `title`, `price` with `currency`, `images`, `location` (with `latitude` and `longitude`) and `bumped_at`. There are two identifiers: `id`, a string, and `posting_id`, an integer. In the recorded response, `total` was 821 and `has_more` was `true`, so one call is a window onto a larger set, and `page` moves through it. For a safe page loop, see [paginating a web data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python). ## How do you fetch a single posting? Call `GET /v1/craigslist/posting` with the posting's `id`, the one required parameter on any Craigslist endpoint. It costs 1 credit and returns that one posting, which is the call to make when you already have an `id` from a search and want that posting on its own. ```bash curl "https://api.perceptlayer.com/v1/craigslist/posting?id=wnD16b4hEY7DaHprfGYGAg" \ -H "X-API-Key: $API_KEY" ``` We don't have a recorded `posting` response to quote here, so run it in the playground on the [Posting page](https://perceptlayer.com/apis/craigslist/posting) to see its exact fields before you write a parser. Treat `posting` as the second step, not the first: search results already carry title, price, photos and location, so fetch a posting on its own only when you've decided you care about it. That alone cuts a monitoring job's credit use sharply. ## How do you poll for new postings? Run a `search` with `sort=date` on a timer, remember the `id` values you've already seen, and treat anything new as a fresh posting. The loop below uses the Python `requests` library, honours `Retry-After` on a 429 or 503, and prints new postings; swap the print for a database write or a notification. ```python import os import time import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PARAMS = { "site": "portland", "category": "bia", "query": "bike", "min_price": 50, "max_price": 300, "sort": "date", } INTERVAL = 15 * 60 # seconds between polls seen = set() first_run = True while True: resp = requests.get( f"{BASE}/v1/craigslist/search", headers=HEADERS, params=PARAMS, timeout=30 ) if resp.status_code in (429, 503): time.sleep(int(resp.headers.get("Retry-After", 30))) continue resp.raise_for_status() for item in resp.json()["data"]["results"]: if item["id"] in seen: continue seen.add(item["id"]) if not first_run: print(item["price"], item["title"], item["url"]) first_run = False print("credits left:", resp.headers.get("X-Credits-Remaining")) time.sleep(INTERVAL) ``` The first pass only fills `seen`, so you don't get the whole current page as "new". If `sort=date` returns the newest first, as you should confirm on your first response, page 1 is enough as long as fewer new postings arrive between polls than one page holds. If your category is busier than that, shorten the interval or narrow it with `subarea` or a tighter price range. A timeout on the client side may mean the call succeeded and was billed, since requests have no idempotency key; the next poll simply picks up whatever you missed. [Retrying without paying twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers the edge cases, and [errors](https://docs.perceptlayer.com/errors) lists every code. ## What does polling cost in credits? Every poll is one `search` call at 1 credit, so the cost is the number of polls plus any `posting` lookups. You choose the interval, and the arithmetic is simple enough to do before you start. The table assumes one search per poll and no detail lookups. | Interval | Calls per day | Credits over 30 days | | --- | --- | --- | | Every 60 minutes | 24 | 720 | | Every 15 minutes | 96 | 2,880 | | Every 5 minutes | 288 | 8,640 | You get 100 free credits once, after you verify an email address, so an hourly poll of one search (24 credits a day) runs on them for the first 4 days (4 × 24 = 96). After that it needs a pack. Polling every 15 minutes for 30 days is 96 × 30 = 2,880 credits, which is within the smallest pack, Starter, of 10,000 credits. Purchased credits last 12 months, there's no subscription, and [pricing](https://perceptlayer.com/pricing) has what credits cost. Add detail lookups on top. If 150 new postings turn up in a month and you fetch each one with `posting`, that's 150 × 1 credit = 150 more credits. Every response carries `X-Credits-Used` and `X-Credits-Remaining`, so the loop above can stop itself when the balance gets low. See [credits](https://docs.perceptlayer.com/credits) for how billing works. A job like this is also a request-rate question. One search every few minutes is far below the 1 request a second a free account gets, but if you run many sites and categories at once, stagger them. The [rate limits](https://docs.perceptlayer.com/rate-limits) page has the headers to watch. ## When should you not use this? If you only need a handful of postings once, the free tier and the playground are enough, and you don't need a loop. If you're building something that reaches out to the people who posted, stop and read the site's terms and the law that applies to you first: the data here is for analysis such as price tracking and market research, not for contacting individuals. For a different marketplace shape, the same pattern applies to [eBay search results](https://perceptlayer.com/blog/ebay-item-search-data-json), and [deduplicating listings across sources](https://perceptlayer.com/blog/deduplicate-listings-across-sources) helps when the same item appears in more than one place. Next step: [get a free API key](https://perceptlayer.com/signup), then run the `sites` call above in the playground on the [Craigslist API page](https://perceptlayer.com/apis/craigslist). ## APIs in this post - [Craigslist **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/craigslist) ## Frequently asked questions ### Is there a Craigslist API for searching postings? Craigslist documents a bulk posting interface for submitting ads, but we know of no documented endpoint for searching them. Perceptlayer's Craigslist API covers that with four endpoints ( `sites`, `categories`, `search` and `posting`) that return postings as JSON, each costing 1 credit per successful call. ### How much does a Craigslist API call cost? Every Craigslist endpoint costs 1 credit per successful call, and failed calls cost nothing and return `X-Credits-Used: 0`. The free tier includes 100 credits after email verification, with no credit card. A 15-minute polling loop uses 2,880 credits over 30 days. ### Can I filter Craigslist results by price and location? Yes. `search` accepts `min_price` and `max_price` as integers, plus `site` and `subarea` for location, `category` for the section and `query` for text. Each result also carries a `location` object with a name, site, sub-area, `latitude` and `longitude`. ### How do I get more than one page of results? Pass `page` as an integer on `search`. The response includes `total`, `page`, `per_page` and `has_more`, so loop while `has_more` is `true`. Each page is a separate call at 1 credit, so budget pages the same way you budget polls. ### What happens when I hit the rate limit? You get a 429 with a `Retry-After` header giving the seconds to wait, and the rejected call isn't billed. Free accounts get 1 request a second, and paying accounts run at least 5 a second. Limits are per account, shared by all its keys. ### Should I build a Craigslist scraper instead? You can, but a Craigslist scraper is yours to keep working: page markup changes, request limits apply, and Craigslist's terms govern how you collect postings. The search endpoint returns postings as named JSON fields for 1 credit per successful call. A scraper makes sense only for data the endpoint doesn't return; run the endpoint in the playground first to compare. craigslist classifieds marketplaces listings polling ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Oct 2026 Perceptlayer 8 min read ## [Craigslist Scraper or API: Watching New Postings](https://perceptlayer.com/blog/craigslist-scraper-vs-api) Compare a Craigslist scraper with four endpoints at 1 credit a call: a recorded Portland bike search with 821 results, bumped\_at times and a 3-call sweep. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 28 Sept 2026 Perceptlayer 7 min read ## [Kleinanzeigen API: Search German Classifieds as JSON](https://perceptlayer.com/blog/kleinanzeigen-api-search-json) Search Kleinanzeigen ads by query, city, category and price range with one GET call. Parameters, a real response and the cost: 1 credit per call. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Jul 2026 Updated 10 Nov 2026 Perceptlayer 8 min read ## [eBay API: Search Results, Items and Autocomplete as JSON](https://perceptlayer.com/blog/ebay-item-search-data-json) Use the eBay API to get search results, items and autocomplete as JSON with one key. Real parameters, a recorded response and the cost: 1 credit per call. --- title: "Zillow Listings API: Get Property Data as JSON" description: "One GET to /v1/zillow/search returns listings near a point as JSON with price, beds, baths and address. Parameters, a real response, 1 credit per call." url: https://perceptlayer.com/blog/zillow-listings-api-json --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Zillow Listings API: Get Property Data as JSON 3 Jul 2026 Updated 10 Nov 2026 Perceptlayer 9 min read You can get Zillow listings as JSON with one GET request to `/v1/zillow/search` on the Perceptlayer API. Pass a latitude, longitude and radius, and the response lists properties with address, price, bedrooms, bathrooms and photos. Each successful call costs 1 credit, and a failed call costs nothing. This guide shows the request, the parameters, a trimmed real response and the cost in credits. ## Key takeaways - `GET /v1/zillow/search` takes a point and radius ( `latitude`, `longitude`, `radius_mi`) or a bounding box, and returns listings under `data.listings`. - Filters include `min_price`, `max_price`, `min_beds`, `min_baths`, `home_statuses[]` and `sort_order`. All of them are optional. - Look up one property with `GET /v1/zillow/property?zpid[]=`, using the `zpid` from a search result. - Every Zillow endpoint costs 1 credit per successful call: 1,000 calls × 1 credit = 1,000 credits. See [pricing](https://perceptlayer.com/pricing) for what credits cost. - The free tier gives 100 credits after you verify an email address. No credit card. ## Is there an official Zillow listings API? Zillow Group runs a [developer site](https://www.zillowgroup.com/developers/) that lists APIs for MLS listings, rentals feeds, public data and Zestimates, offered to the public and to partners. Those programs have their own terms and eligibility. If your use fits one, check that route first, because it's the authoritative one. If you aren't, or you need a plain search-by-location call returning JSON today, that's the gap the Perceptlayer [Zillow API](https://perceptlayer.com/apis/zillow) fills. It exposes 10 endpoints under one key, with the same authentication and credit model as every site in the catalogue: Zillow is one of 480 websites and 2,782 endpoints in the catalogue. Data is collected from publicly available sources and returned as found at the time of the call. Listing fields can change between calls, so store the timestamp of each pull. ## How do you get a key and make the first call? Sign up, verify your email and copy a key that starts with `sk_live_`. Send it in the `X-API-Key` header on every request. If you can't set headers, the `api_key` query parameter works instead. The free tier is 100 credits on signup, enough for 100 Zillow calls, so you can run everything below without paying. The [authentication docs](https://docs.perceptlayer.com/authentication) cover both options. [Get a free API key](https://perceptlayer.com/signup), export it, then run this search for listings within 5 miles of a point in Seattle (latitude 47.6062, longitude -122.3321): ```bash export API_KEY=sk_live_your_key_here curl "https://api.perceptlayer.com/v1/zillow/search?latitude=47.6062&longitude=-122.3321&radius_mi=5&listing_category=category1&page_size=20" \ -H "X-API-Key: $API_KEY" ``` The response is JSON with a `data` object. The listings sit in `data.listings`, one object per property. The [requests docs](https://docs.perceptlayer.com/requests) explain the general conventions that apply to every endpoint. ## Which parameters does the search endpoint take? `/v1/zillow/search` has no required parameters, but you'll always want to say where to look. Use a centre point with `radius_mi`, a bounding box made of four coordinates, `region_ids[]`, or a `polygon` string. Everything else narrows the results by price, size, status or keyword. The table groups all 29 parameters by job. | Group | Parameter | Type | | --- | --- | --- | | Point and radius | `latitude`, `longitude`, `radius_mi` | number | | Bounding box | `north_latitude`, `south_latitude`, `east_longitude`, `west_longitude` | number | | Region | `region_ids[]` | list of integer | | Region | `region_id_type` | integer | | Shape | `polygon` | string | | Category | `listing_category` | string: `all`, `category1`, `category2` | | Status | `home_statuses[]` | list of string | | Status | `include_off_market`, `allow_empty` | boolean | | Price | `min_price`, `max_price` | integer | | Size | `min_beds`, `max_beds`, `min_baths`, `max_baths` | integer | | Size | `living_area_min`, `lot_size_min`, `year_built_min` | integer | | Text | `keywords` | string | | Map | `zoom_level` | integer | | Sorting | `sort_order` | string, see below | | Sorting | `sort_ascending` | boolean | | Paging | `page`, `page_size` | integer | `sort_order` accepts one of `baths`, `yearBuilt`, `price`, `relevance`, `beds`, `daysOn`, `featured`, `livingArea`, `lotArea`, `nearby`, `recentlyChanged`, `rentalDays` or `rentalPriorityScore`. `category1` selects sale listings and `category2` selects rent listings, per the recorded response. The example request above uses `category1`, and every listing in the response below carries `"listingCategory": "category1"` and a `forSale` status. The response also reports category counts, but they're cross-mapped: a `category1` (sale) request reports the `category2` (rent) counts, as a note in the recorded response said. Don't read `listing_category_counts` as the totals for the category you asked for. ### Narrowing the search Add filters as plain query parameters. This request asks for homes with at least 3 bedrooms and 2 bathrooms between $500,000 and $900,000, sorted by price: ```bash curl "https://api.perceptlayer.com/v1/zillow/search?latitude=47.6062&longitude=-122.3321&radius_mi=5&min_price=500000&max_price=900000&min_beds=3&min_baths=2&sort_order=price&sort_ascending=true&page_size=20" \ -H "X-API-Key: $API_KEY" ``` A tight filter can return few or no listings, so loosen one filter at a time if a search comes back thin. The search endpoint also takes an `allow_empty` boolean. ## What does a search response look like? The response wraps results in `data.listings`. Each listing carries a `zpid` (the property ID), a `location`, an `address`, a `media` block with photo links, and the facts a valuation or lead tool needs: `bedrooms`, `bathrooms`, `livingArea`, `yearBuilt`, `propertyType`, a `listing` status object and a `price` object. This is a trimmed excerpt of a recorded response to the Seattle request above: ```json { "data": { "listings": [ { "zpid": 2068074790, "location": { "latitude": 47.592564, "longitude": -122.386925 }, "address": { "streetAddress": "1124 Sunset Avenue SW", "zipcode": "98116", "city": "Seattle", "state": "WA" }, "media": { … }, "currency": "usd", "country": "usa", "bestGuessTimeZone": "America/Los_Angeles", "bathrooms": 6, "bedrooms": 4, "livingArea": 7870, "yearBuilt": 2015, "lotSizeWithUnit": { "lotSize": 0.2652, "lotSizeUnit": "acres" }, "propertyType": "singleFamily", "listing": { "listingStatus": "forSale", "marketingStatus": "active", "palsId": "39001_2591845" }, "price": { "value": 14000000, "pricePerSquareFoot": 1779 … ``` Field names are camelCase and nested. Price is at `price.value`, the street at `address.streetAddress`, and the lot size is an object with a value and a unit. The excerpt also holds media flags and recommendation blocks that we've cut with `…`. Treat any field you don't see in your own response as absent, and check for it in code rather than assuming it's there. Some fields appear only on some listings. In the recorded response, the first listing has `estimates.zestimate` (13068300) but no `taxAssessment`, while the second has `taxAssessment` ( `taxAssessedValue` 949000, `taxAssessmentYear` "2025") but no `estimates` block. A parser that reads either one unguarded will fail on half the results. For how fields like these feed a valuation model, see [Real Estate Listing Data: Fields That Matter for Valuation](https://perceptlayer.com/blog/real-estate-listing-data-valuation-fields). ### Fields outside the listings After the `listings` array, the `data` object carries paging and context fields. This is the tail of the same recorded response, trimmed with `…`: ```json "count": 20, "total_matching_count": 2058, "page": 1, "page_size": 20, "listing_category_counts": [ { "totalMatching": 56, "listingCategory": "category2" } ], "freshness": [ "Based on information submitted to the MLS GRID as of 2026-10-21 06:24:36 PDT. …" ], "paging_note": "page * page_size must not exceed 1000; up to 1000 rows come back in one request." ``` `count` is the number of listings in this page (20), and `total_matching_count` is how many properties matched the search (2,058 here). `freshness` holds the MLS as-of note, a timestamp for the underlying listing data, so store it next to your own pull time. `paging_note` states the paging limit covered in the Python section below. ## How do you fetch one property by ID? Take the `zpid` from a search result and pass it to `/v1/zillow/property`. The endpoint has no required parameters and accepts a `zpid[]` list. Per-endpoint pages, such as [Zillow API: Property](https://perceptlayer.com/apis/zillow/property), list the parameters and let you try the call. ```bash curl "https://api.perceptlayer.com/v1/zillow/property?zpid[]=2068074790" \ -H "X-API-Key: $API_KEY" ``` We haven't recorded a property response for this guide, so we won't show one. Run the call on your own key and inspect the JSON before you map fields. The other Zillow endpoints follow the same pattern: | Endpoint | Use it for | Credits | | --- | --- | --- | | `/v1/zillow/autocomplete` | Turn a typed place name into suggestions ( `query` required) | 1 | | `/v1/zillow/photos` | Photos for one or more `zpid[]` | 1 | | `/v1/zillow/photo` | One photo by `photo_id`, with optional `size` | 1 | | `/v1/zillow/building` | A building by `slug`, `lot_id` or coordinates | 1 | | `/v1/zillow/schools` | Schools by ID or bounding box | 1 | | `/v1/zillow/market-data` | Market statistics ( `family` and `geography` required) | 1 | ## How do you call it from Python? The same request in Python needs only `requests`. This script searches around the same Seattle point, then prints address, bedrooms and price for each listing. It reads the key from the environment and checks the status before parsing, so a failed call raises an error instead of returning bad data. ```python import os import requests resp = requests.get( "https://api.perceptlayer.com/v1/zillow/search", headers={"X-API-Key": os.environ["API_KEY"]}, params={ "latitude": 47.6062, "longitude": -122.3321, "radius_mi": 5, "listing_category": "category1", "page_size": 20, }, timeout=30, ) resp.raise_for_status() for item in resp.json()["data"]["listings"]: print( item.get("zpid"), (item.get("address") or {}).get("streetAddress"), item.get("bedrooms"), (item.get("price") or {}).get("value"), ) ``` The `timeout=30` matters more than it looks. If the client gives up, the request may still have succeeded and been billed, because requests have no idempotency key. Check `X-Credits-Remaining` before you resend, and see [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) for a safe pattern. To page through more results, increase `page` and keep `page_size` fixed, but mind the limit in the recorded response: `page * page_size` must not exceed 1000. With `page_size=20` you can reach page 50 and no further, and the recorded search matched 2,058 properties, more than one search can return. To cover a large area, split it into smaller searches (a tighter radius, a bounding box per neighbourhood, or price bands) rather than paging deeper. Each page is its own call and its own credit, so pick the smallest `page_size` that covers your need. [Paginate a Web Data API in Python](https://perceptlayer.com/blog/paginate-web-data-api-python) shows a safe page loop. ## What does it cost per 1,000 calls? Every Zillow endpoint costs 1 credit per successful call, so 1,000 search calls use 1,000 credits. Failed calls cost nothing and come back with `X-Credits-Used: 0`. The free tier of 100 credits on signup, granted once, covers the first 100 calls. Beyond that, purchased credits last 12 months, with no subscription and no seats. The [credits docs](https://docs.perceptlayer.com/credits) and [pricing page](https://perceptlayer.com/pricing) have the detail. | Plan | Credits | Search calls at 1 credit | | --- | --- | --- | | Free tier | 100, once | 100 | | Starter | 10,000 | 10,000 | | Growth | 200,000 | 200,000 | | Scale | 1,000,000 | 1,000,000 | A worked example: refreshing 10 search areas twice a day for 30 days is 10 × 2 × 30 = 600 calls × 1 credit = 600 credits. The free tier covers its first 5 days, and the Starter pack's 10,000 covers a year of it (12 × 600 = 7,200). A job making 10,000 calls a month uses 10,000 × 1 credit = 10,000 credits, which equals one Starter pack. Check [pricing](https://perceptlayer.com/pricing) for what each pack costs. If the same areas repeat, [caching API responses](https://perceptlayer.com/blog/cache-web-data-api-responses) cuts the credits you spend. ## What happens when a call fails? A failed call returns an HTTP status and a JSON body shaped as `{"error": {"code", "message", "request_id"}}`, and it isn't billed. The codes you'll most likely meet are `invalid_api_key` (401), `insufficient_credits` (402), `invalid_parameters` (422), `rate_limited` (429) and `source_error` (502). The [errors docs](https://docs.perceptlayer.com/errors) list all of them. Handle them by code, not by message text. Retry `rate_limited`, `source_error` and `temporarily_unavailable` (503) with a growing delay between attempts. The 429 and 503 responses carry a `Retry-After` header with the seconds to wait, so use it instead of guessing. A client timeout is different: with no response, you don't know the outcome, and requests have no idempotency key, so the call may have succeeded and been billed. Check `X-Credits-Remaining` before you resend. [Retry Web API Calls Without Paying Twice](https://perceptlayer.com/blog/retry-web-api-calls-without-paying-twice) covers this in detail. A 429 is the standard "too many requests" status, defined in [RFC 6585](https://www.rfc-editor.org/rfc/rfc6585#section-4) (2012). Fix `invalid_parameters` before you retry, since repeating the same request will fail the same way. See the [rate limits docs](https://docs.perceptlayer.com/rate-limits) for the limits on your key. ## Can an AI agent call these endpoints? Yes. The MCP server at `https://perceptlayer.com/mcp` exposes `search_endpoints`, `get_endpoint` and `call_endpoint`, so an agent can find the Zillow search endpoint and call it without custom glue code. In Claude Code, add it with the command below, then ask for listings in a city. The [MCP docs](https://docs.perceptlayer.com/ai-agents) cover other clients. ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` Only successful calls are billed and failed calls cost nothing, so cap the number of calls a task may make. [AI Agent API Cost Control](https://perceptlayer.com/blog/ai-agent-web-data-costs) shows how. For more real estate sources, see the [real estate APIs](https://perceptlayer.com/verticals/real-estate), and for similar guides browse the [API guides](https://perceptlayer.com/blog/category/api-guides). Ready to try it? [Get a free API key](https://perceptlayer.com/signup), run the Seattle search above, and check the [Zillow API page](https://perceptlayer.com/apis/zillow) for the other nine endpoints. ## APIs in this post - [Zillow **1 credit per call** · 20 endpoints](https://perceptlayer.com/apis/zillow) ## Frequently asked questions ### Does Zillow have a public API for listings? Zillow Group lists official APIs on its [developer site](https://www.zillowgroup.com/developers/), covering MLS listings, rentals feeds, public data and Zestimates, for the public and for partners. If you qualify for a program, use it. If you need a key-based search call that returns JSON now, the Perceptlayer Zillow API provides one. ### How much does one Zillow search call cost? One credit per successful call, so 1,000 calls × 1 credit = 1,000 credits. Packs start at 10,000 credits (Starter), and [pricing](https://perceptlayer.com/pricing) shows what credits cost. The free tier includes 100 credits after you verify an email address, with no credit card. Failed calls return `X-Credits-Used: 0`. ### How do I search by area instead of a radius? Use the bounding box: `north_latitude`, `south_latitude`, `east_longitude` and `west_longitude`. You can also pass `region_ids[]` with `region_id_type`, or a `polygon` string. All are optional parameters on `/v1/zillow/search`, and each search is one call and one credit. ### Can I filter by price and bedrooms? Yes. Use `min_price` and `max_price` for price, and `min_beds`, `max_beds`, `min_baths` and `max_baths` for rooms. Add `living_area_min`, `lot_size_min` or `year_built_min` to cut further. Combine them in one request and you still pay one credit. ### Is the data complete and current? Data is collected from publicly available sources and returned as found at the time of the call. We don't promise completeness or freshness beyond that. For anything time-sensitive, such as a price change, call again and compare against your stored copy. ### Should I build a Zillow scraper instead? Only if you need a page this API doesn't cover. A Zillow scraper is yours to maintain: page markup changes, requests get blocked, and Zillow's terms of use apply to how you collect data. The search and property endpoints return named JSON fields for 1 credit per successful call, and failed calls cost nothing, so try them in the playground on the Zillow API page first. zillow real estate listings property data api ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Nov 2026 Perceptlayer 7 min read ## [Realtor.com API: Property Listings as JSON](https://perceptlayer.com/blog/realtor-com-api-listings-json) Watch new Realtor.com listings with the search endpoint: list\_price, beds, sqft, list\_date and coordinates as JSON, at 1 credit per call. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 22 Sept 2026 Perceptlayer 6 min read ## [Realestate.com.au API: Australian Listings as JSON](https://perceptlayer.com/blog/realestate-com-au-api-listings) Search realestate.com.au by location and channel (buy, rent, sold), then open each listing by URL. Parameters, a recorded Sydney response and the cost. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 17 Nov 2026 Perceptlayer 7 min read ## [Homes.com API: Listings and Neighborhoods as JSON](https://perceptlayer.com/blog/homes-com-api-listings-json) Search Homes.com listings by location, beds and price at 1 credit a call: a recorded Austin search with price, sqft and list\_date, plus neighborhood lookups. --- title: "Capterra API: Software Reviews and Comparisons as JSON" description: "Find a product with products-search, pull its reviews filtered by country, company size and time used, and compare two products, at 1 credit per call." url: https://perceptlayer.com/blog/capterra-api-software-reviews --- [Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides) # Capterra API: Software Reviews and Comparisons as JSON 1 Jul 2026 Perceptlayer 7 min read Capterra doesn't offer a public API for reading its software reviews. To get them as JSON, the Perceptlayer Capterra API has 10 GET endpoints at 1 credit per successful call: find a product with `/v1/capterra/products-search` ( `q`), read its reviews with `/v1/capterra/products-reviews` ( `id`), and put two products side by side with `/v1/capterra/compare` ( `product_a`, `product_b`). Reviews filter by country, company size, time used and minimum rating. ## Key takeaways - The flow is `products-search` with `q` (up to 100 characters), then `products-detail` and `products-reviews` with the product `id`. - `products-reviews` filters with `countries[]`, `company_size[]` (codes `A` to `I`), `time_used[]` ( `FreeTrial` to `MoreThan2Years`) and `overall_rating_ge`, and sorts by `most_helpful` or `most_recent`. - `compare` takes two integer product IDs, `product_a` and `product_b`, with optional slugs. - For a whole category, `categories-products` lists products by category `id`, sorted by `popularity`. - All 10 endpoints cost 1 credit per successful call. Reviews for the top 20 products in a category at 5 pages each is 100 credits, plus the category pages. ## Does Capterra have an official API? Not for reading reviews: we couldn't find a public API that returns Capterra's reviews to any developer who signs up. Ownership is also changing: in January 2026, G2 announced it had agreed to acquire Capterra, Software Advice and GetApp from Gartner, and said it would bring their data and offerings into its own platform ( [G2](https://company.g2.com/news/g2-acquires-capterra-software-advice-getapp), 2026). Vendor-side programmes may move as a result. If you're a software vendor and want your own Capterra data, start with your Capterra account contact. If you need reviews, ratings and comparisons across products for competitive research or product work, the [Capterra API](https://perceptlayer.com/apis/capterra) returns them as JSON with one key. Data is collected from publicly available sources and returned as found at the time of the call. ## Which Capterra endpoints are there? Ten GET endpoints, each 1 credit per successful call. Three find products (search, category listings and the full product list), three work on one product (detail, reviews, one review), one compares two products, and three browse the catalogue (categories, catalogue and vendors). The table shows each with its required parameters. | Endpoint | Returns | Required | | --- | --- | --- | | [`/v1/capterra/products-search`](https://perceptlayer.com/apis/capterra/products-search) | Products matching a query | `q` | | [`/v1/capterra/products-detail`](https://perceptlayer.com/apis/capterra/products-detail) | One product | `id` | | [`/v1/capterra/products-reviews`](https://perceptlayer.com/apis/capterra/products-reviews) | A page of reviews | `id` | | `/v1/capterra/products-reviews-detail` | One review | `id`, `reviewId` | | [`/v1/capterra/compare`](https://perceptlayer.com/apis/capterra/compare) | Two products compared | `product_a`, `product_b` | | [`/v1/capterra/categories-products`](https://perceptlayer.com/apis/capterra/categories-products) | Products in a category | `id` | | `/v1/capterra/products` | The product list | none | | [`/v1/capterra/categories`](https://perceptlayer.com/apis/capterra/categories) | Categories | none | | [`/v1/capterra/catalog`](https://perceptlayer.com/apis/capterra/catalog) | Catalogue entries | none | | `/v1/capterra/vendors` | Vendors | none | The product endpoints accept an optional `slug` (up to 200 characters) next to the `id`. You don't need it to make a call, but storing both makes rows easier to read later. ## How do you find a product and its ID? Call `GET /v1/capterra/products-search` with the product or vendor name as `q`. Add `page` and `limit` to page through matches. The results give you the product `id` the other endpoints take. This request searches for project management tools named Asana: ```bash curl "https://api.perceptlayer.com/v1/capterra/products-search?q=asana&limit=5" \ -H "X-API-Key: $API_KEY" ``` Keys start with `sk_live_` and go in the `X-API-Key` header. [Get a free API key](https://perceptlayer.com/signup); the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest. For a whole market rather than one product, use `GET /v1/capterra/categories-products` with a category `id` from `categories`, and `sort=popularity`. `categories` takes an optional `type` of `targets` or `super_industries`, and `products` takes `categoryIds[]`, `exclude[]` and `sortBy` ( `name` or `popularity`). The recorded `products` call, with `sortBy=popularity&limit=10&page=1`, shows what a product list returns. Its first entry, trimmed with `…`: ```json { "success": true, "data": { "products": [ { "uuid": "9985c8b6-47d0-4328-b13d-a6d200b6686a", "name": "Planview ProjectAdvantage", "vendor": "Planview", "published_on": ["Capterra", "GetApp", "SoftwareAdvice"], "category_ids": ["13920971-cae5-47eb-8b98-47e5fb597970", "49d5abf4-bb03-4aed-a0fd-ce02288db64c", "4cadc6c5-d533-4af4-a9ac-a56ec6d5954c"], "languages": ["de", "en", "es"], "review_count": 72, … }, … ], "page": 1, "limit": 10, "has_more": true } } ``` `review_count` tells you how many review pages a product is worth pulling, and `published_on` shows the product is listed on Capterra, GetApp and Software Advice. Products are identified by a `uuid` here, while `compare` takes integer IDs, so check in the playground on the [Capterra API page](https://perceptlayer.com/apis/capterra) which ID each endpoint expects. We haven't recorded the search, detail or reviews responses. ## How do you pull a product's reviews? Call `GET /v1/capterra/products-reviews` with the product `id`. Everything else is optional: `page` for paging, `sort` for order, and four filters that narrow reviews to the reviewers you care about. A B2B review means more when you know who wrote it, so these filters are the useful part of the endpoint. ```bash curl -G "https://api.perceptlayer.com/v1/capterra/products-reviews" \ -d id=$PRODUCT_ID -d sort=most_recent -d page=1 \ -d "countries[]=US" -d "time_used[]=MoreThan2Years" -d overall_rating_ge=1 \ -H "X-API-Key: $API_KEY" ``` | Parameter | Type | Notes | | --- | --- | --- | | `id` | string, required | Product ID from search | | `slug` | string | Up to 200 characters | | `page` | integer | Results page | | `sort` | string | `most_helpful` or `most_recent` | | `countries[]` | list of strings | Reviewer countries | | `company_size[]` | list of strings | `A`, `B`, `C`, `D`, `E`, `F`, `G`, `H` or `I` | | `time_used[]` | list of strings | `FreeTrial`, `LessThan6Months`, `LessThan12Months`, `LessThan2Years`, `MoreThan2Years` | | `overall_rating_ge` | integer | Minimum overall rating | The `company_size[]` codes are letters, and their bands aren't documented here, so map each letter to its band by trying it in the playground and reading the reviews it returns. The country code format isn't documented either; confirm it the same way. `time_used[]` is the one to reach for when you want reviews from long-term users rather than trial users: `MoreThan2Years` keeps only those. Filters don't make a review genuine, though. Fake and incentivised reviews are a known problem: the US Federal Trade Commission finalised a rule in 2024 banning fake reviews and rewards conditioned on a review's sentiment ( [FTC](https://www.ftc.gov/news-events/news/press-releases/2024/08/federal-trade-commission-announces-final-rule-banning-fake-reviews-testimonials), 2024), so look at rating distributions over time, not only averages. To read one review in full, call `products-reviews-detail` with the product `id` and the `reviewId`. ## How do you compare two products? Call `GET /v1/capterra/compare` with two product IDs as integers, `product_a` and `product_b`. The optional `slug_a` and `slug_b` take the slugs. This returns Capterra's comparison of the two, one call for the pair, which is cheaper than reconstructing it from two detail calls and two pages of reviews when all you need is the side-by-side. ```bash curl "https://api.perceptlayer.com/v1/capterra/compare?product_a=$ID_A&product_b=$ID_B" \ -H "X-API-Key: $API_KEY" ``` Note the types: `compare` requires integers, while the other product endpoints take `id` as a string. If your IDs are stored as strings, they'll still work in the query string as long as they're digits; a non-numeric value fails with `invalid_parameters` (422) and costs nothing. ## How do you pull reviews for a whole category in Python? List the category's products, then page through each product's reviews and save every page. The script below takes the product IDs as a list; fill it from `categories-products`, after checking in the playground which identifier `products-reviews` accepts as `id`. It sorts reviews `most_recent` so a later run can stop at reviews it already has. ```python import json import os import requests URL = "https://api.perceptlayer.com/v1/capterra/products-reviews" HEADERS = {"X-API-Key": os.environ["API_KEY"]} PRODUCT_IDS = ["PASTE_IDS_FROM_CATEGORIES_PRODUCTS"] PAGES = 5 spent = 0 for pid in PRODUCT_IDS: for page in range(1, PAGES + 1): r = requests.get(URL, headers=HEADERS, timeout=60, params={"id": pid, "page": page, "sort": "most_recent"}) if r.status_code != 200: print(pid, page, r.json()["error"]["code"]) break spent += int(r.headers["X-Credits-Used"]) with open(f"capterra-{pid}-p{page}.json", "w") as f: json.dump(r.json(), f) print("credits used:", spent) ``` We haven't run this script live for this article. Reviews are written by people, and the response carries what Capterra shows about each reviewer. Keep the rating, date, role, company size and text you need for analysis, and drop names unless you have a reason and a lawful basis to keep them. ## What does a category-wide review pull cost? One credit per successful call, so the cost is pages of products plus pages of reviews. Take the 20 most popular products in a category, found in 1 to 2 `categories-products` pages, with 5 pages of reviews each. That's 2 + 20 × 5 = 102 credits. Add a detail call per product and 10 head-to-head comparisons, and it's 132. | Step | Calls | Credits | | --- | --- | --- | | `categories-products`, 2 pages | 2 | 2 | | `products-reviews`, 5 pages × 20 products | 100 | 100 | | `products-detail` × 20 | 20 | 20 | | `compare` × 10 pairs | 10 | 10 | | **Total** | **132** | **132** | A weekly refresh that reads only page 1 of `most_recent` reviews for the same 20 products is 20 × 4 = 80 credits a month. The first pull is 32 credits more than the 100 free credits on signup, and the weekly refresh needs a pack: a year of it, 960 credits, fits in the Starter pack's 10,000. Failed calls cost nothing. The [credits docs](https://docs.perceptlayer.com/credits) explain the balance, and [pricing](https://perceptlayer.com/pricing) has what credit packs cost. For app reviews alongside B2B ones, the [Google Play Store API guide](https://perceptlayer.com/blog/google-play-store-api) and the [Trustpilot reviews guide](https://perceptlayer.com/blog/trustpilot-reviews-api) cover two more sources. To try it, run a product search in the playground on the [Capterra API page](https://perceptlayer.com/apis/capterra). ## APIs in this post - [Capterra **1 credit per call** · 10 endpoints](https://perceptlayer.com/apis/capterra) ## Frequently asked questions ### How much does the Capterra API cost? Each of the 10 endpoints costs 1 credit per successful call, and failed calls cost nothing. Reviews for 20 products at 5 pages each, plus 2 category pages, is 102 credits. Every verified account gets 100 free credits on signup, and the [pricing page](https://perceptlayer.com/pricing) has what credit packs cost beyond that. ### Can I filter reviews by company size? Yes, with `company_size[]` on `products-reviews`. It takes letter codes from `A` to `I`, and you can repeat the parameter for several bands. The bands each letter stands for aren't documented here, so check them in the playground before you label your data, and store the code you filtered on with each row. ### Does the API return the reviewer's name? Reviews include whatever Capterra displays about the reviewer, so check a page in the playground to see exactly which fields. For competitive research you rarely need a name. Drop anything that identifies a person, keep attributes such as company size, and don't use review data to contact reviewers. ### What is the difference between compare and two detail calls? `compare` returns Capterra's comparison of two products in one call, 1 credit. Two `products-detail` calls cost 2 credits and give each product's full record. Use `compare` for a side-by-side summary and detail calls when you need everything about each product. ### What happens if a product ID is wrong? The call fails with an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, and `X-Credits-Used` is 0, so you pay nothing. For `compare`, a non-integer `product_a` or `product_b` fails with `invalid_parameters` (422). The [errors docs](https://docs.perceptlayer.com/errors) list every code. capterra software reviews b2b software reviews saas ## More from the blog 1. [API guides](https://perceptlayer.com/blog/category/api-guides) 2 Nov 2026 Perceptlayer 8 min read ## [Capterra Scraper or API: What You Get](https://perceptlayer.com/blog/capterra-scraper-vs-api) A Capterra scraper vs 1-credit endpoints: a recorded products page with uuid, vendor, category\_ids and review\_count, and the cost of a daily review-count watch. 2. [API guides](https://perceptlayer.com/blog/category/api-guides) 7 Nov 2026 Perceptlayer 8 min read ## [Tripadvisor Scraper or API: What You Get](https://perceptlayer.com/blog/tripadvisor-scraper-vs-api) A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location\_id, type, rating and review\_count, and the cost per place tracked. 3. [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 7 min read ## [Trustpilot Scraper or API: Ratings and Review History](https://perceptlayer.com/blog/trustpilot-scraper-vs-api) A Trustpilot scraper vs a 1-credit company-reviews call: the recorded Amazon response, its star breakdown, and 2,340 pages × 1 credit for a full history. --- title: "Verify Agent Answers with Live Search: A Grounding Pattern" description: "Check a model's claim against Google Search and Google News JSON with two calls (2 credits), and handle stale or conflicting sources honestly." url: https://perceptlayer.com/blog/ground-agent-answers-live-search --- [Blog](https://perceptlayer.com/blog) / [AI agents](https://perceptlayer.com/blog/category/ai-agents) # Verify Agent Answers with Live Search: A Grounding Pattern 1 Jul 2026 Updated 24 Oct 2026 Perceptlayer 8 min read Grounding an LLM with search results means checking each factual claim in a draft answer against live sources before it reaches the user. Extract the claim, run one web search and one news search, hand the model only those results, and make it return a verdict with URLs and dates. Two calls cost 2 credits per claim, and the hard part is not the retrieval but deciding what to do when the sources are old or disagree. ## Key takeaways - Treat grounding as a verification step after the draft, not only as context before it: one `/v1/google-search/search` call plus one `/v1/google-news/news` call per claim. - Keep the date with every result. News results carry `iso_date`; web snippets sometimes start with a date, and some don't. - Return one of five verdicts: supported, contradicted, outdated, conflicting or unverified. "Unverified" is a valid answer. - Checking a claim costs 2 credits (2 calls × 1 credit). Failed calls cost nothing. - Search results are evidence, not truth. A snippet can be truncated, old or wrong, and the pattern has to say so. ## What does grounding an LLM with search results mean? Grounding means the model's answer is tied to retrieved sources that a reader can open, instead of resting on training data alone. Retrieval-augmented generation, introduced in [Lewis et al.'s 2020 paper](https://arxiv.org/abs/2005.11401), supplies documents to the model at generation time. Hallucination, where fluent output is not supported by any source, is surveyed in [Ji et al.'s 2022 review](https://arxiv.org/abs/2202.03629). Most grounding guides retrieve first and generate second. That works for questions you know in advance. This article covers the other direction: the agent has already drafted an answer, and a second pass checks the claims in it. It's cheaper to reason about, because each check is small, bounded and has an explicit pass or fail. If you want the retrieve-first version, read [RAG with live web data](https://perceptlayer.com/blog/rag-with-live-web-data). The two combine well: retrieve to write, verify before you send. ## Why check claims after the draft instead of before? A draft shows you which claims the model actually made, so you only spend calls on those. Pre-retrieval fetches pages for the topic and hopes the right fact is in them. Post-draft verification queries the exact statement, and a miss is visible: no supporting result means the claim stays unverified. It also separates two jobs. The first pass writes. The second pass acts as a reviewer that sees only the claim and the evidence, not the conversation, so it can't be talked into agreeing with the draft. The cost is latency. You make a second round trip, and you'll want to run the two searches concurrently. If you hit the request rate, [concurrent requests under rate limits](https://perceptlayer.com/blog/concurrent-api-requests-python-rate-limit) covers the loop. Rates are counted per minute, and every response carries `RateLimit-Remaining` and `RateLimit-Reset`; the [rate limits](https://docs.perceptlayer.com/rate-limits) docs cover the rest. ## How does the pattern work step by step? Five steps: pull checkable claims out of the draft, turn each into a search query, fetch web and news results, compact them to the fields the judge needs, and ask the model for a verdict that cites the evidence. The model never sees raw JSON, only a short list of titles, URLs, snippets, sources and dates. 1. **Extract claims.** Ask the model for atomic, checkable statements: names, numbers, dates, "latest" and "first" claims. Skip opinions. 2. **Write a query per claim.** Short and specific beats a pasted sentence. 3. **Fetch two views.** The [Search endpoint](https://perceptlayer.com/apis/google-search/search) returns web results; the [News endpoint](https://perceptlayer.com/apis/google-news/news) returns articles with a publication timestamp. 4. **Compact.** Keep title, link, snippet, source and date. Drop thumbnails, tokens and pagination. [Trimming API responses for LLM context](https://perceptlayer.com/blog/trim-api-responses-llm-context) shows how much that saves. 5. **Judge.** Force a verdict from a fixed list and require a URL for every verdict except "unverified". ### The evidence fetcher This Python collects both result sets for one query. It uses only parameters from the endpoint tables: `query` and `hl` for search, `q` and `hl` for news. ```python import os import requests BASE = "https://api.perceptlayer.com" HEADERS = {"X-API-Key": os.environ["API_KEY"]} def get(path, **params): r = requests.get(BASE + path, headers=HEADERS, params=params, timeout=30) if r.status_code in (429, 503): wait = r.headers.get("Retry-After") raise RuntimeError(f"retry after {wait}s") r.raise_for_status() return r.json() def evidence(query): web = get("/v1/google-search/search", query=query, hl="en") news = get("/v1/google-news/news", q=query, hl="en") return { "web": [ { "title": x.get("title"), "url": x.get("link"), "snippet": x.get("snippet"), "source": x.get("source"), } for x in web.get("organic_results", []) ], "news": [ { "title": x.get("title"), "url": x.get("link"), "snippet": x.get("snippet"), "source": (x.get("source") or {}).get("name"), "date": x.get("iso_date"), } for x in news.get("news_results", []) ], } ``` Authentication is the `X-API-Key` header ( [authentication](https://docs.perceptlayer.com/authentication)). A rate-limited (429) or temporarily unavailable (503) response carries `Retry-After` with the seconds to wait, and failed calls aren't billed. Production code should retry; [handling errors in Python](https://perceptlayer.com/blog/handle-web-data-api-errors-python) has the full version. ### The judge prompt The prompt is where most grounding fails, so keep it strict: ```text Claim: {claim} Today's date: {today} Evidence (web results and news results, each with source and date when known): {evidence} Using ONLY the evidence, return JSON: {"verdict": "supported|contradicted|outdated|conflicting|unverified", "reason": "one sentence", "urls": ["the result URLs your verdict rests on"]} Rules: - If sources disagree, use "conflicting" and list both sides. - If the evidence is newer than the claim implies, use "outdated". - If no result addresses the claim, use "unverified". Do not guess. - A snippet that ends in "..." may be cut off; do not infer what follows. ``` Pass today's date explicitly. Models don't reliably know it, and "outdated" is meaningless without it. ## What does a worked check look like? Two checks, using excerpts of real recorded responses. In both, the claim is what a model might plausibly say; the evidence is what the API returned. ### Example 1: a stale "latest" claim Suppose the draft says: "Gartner's most recent strategic technology trends report covers 2025." The recorded sample comes from a broader query, `q=technology`, which is enough to show the mechanics; in your agent you'd search for the claim's own wording. The news call: ```bash curl "https://api.perceptlayer.com/v1/google-news/news?q=technology" \ -H "X-API-Key: $API_KEY" ``` The recorded response for that request includes this first result: ```json { "news_results": [ { "position": 1, "title": "Top Strategic Technology Trends for 2027", "link": "https://www.gartner.com/en/articles/top-technology-trends-2027", "snippet": "Explore Gartner's Top Strategic Technology Trends for 2027 — 10 trends that will shape autonomy, resilience and governance in the years...", "iso_date": "2026-10-20T15:59:45+00:00", … "source": { "name": "Gartner", … } } ], … } ``` A Gartner page titled for 2027 and dated 2026-10-20 strongly suggests the draft's "most recent" claim is out of date as of 2026-10-24, since a 2027 report implies a newer one than 2025. The verdict is **outdated**, with the Gartner URL as the citation. It's an inference, not proof: the snippet is truncated and the title alone doesn't rule out something newer still, so a stricter pipeline would fetch the page before committing. The source is the publisher itself and the timestamp is machine-readable, which keeps the judge's guessing to a minimum. ### Example 2: a number that a snippet disputes Now suppose the draft says: "Tim Raue, the Berlin restaurant, holds three Michelin stars." The search call is the one from the recorded sample: ```bash curl "https://api.perceptlayer.com/v1/google-search/search?query=best+restaurants+in+Berlin&hl=en&safe=off" \ -H "X-API-Key: $API_KEY" ``` Two organic results from the recorded response: ```json { "organic_results": [ { "position": 1, "title": "The Best Restaurants in Berlin - Food Guide & Map", "link": "https://andershusa.com/best-restaurants-berlin-germany-guide/", "snippet": "Dec 3, 2025 — Tim Raue is the most internationally renowned restaurant in Berlin. It holds two Michelin stars, has been frequently ranked on The World's 50 ...", "source": "Anders & Kaitlin", … }, { "position": 2, "title": "Restaurants - Berlin", "link": "https://guide.michelin.com/us/en/berlin-region/berlin/restaurants", "snippet": "Berlin and surroundings: 1-48 of 79 restaurants · POTS · Rutz · GOLVET · Bandol sur mer · Nobelhart & Schmutzig · Oukan · 136 · FACIL.", "source": "MICHELIN Guide", … } ], … } ``` Result 1 says two stars, which differs from the draft's three. This article doesn't vouch for either number; the point is what the evidence says. That result is a travel blog, the snippet is dated Dec 3, 2025, and it's a secondary source. Result 2 is the Michelin Guide's own listing page, the kind of primary source you'd want, and its snippet doesn't mention stars at all. An honest verdict here is **conflicting, leaning contradicted**: one dated secondary source disagrees with the draft, and the primary source's snippet neither confirms nor denies. Nobody has checked the Michelin page itself. A good pipeline doesn't quietly rewrite "three" to "two". It flags the claim, links both results, and, if the stakes justify it, fetches the Michelin page itself. ## Where does this pattern fail? It fails in four predictable ways, and each one needs a decision in your code rather than a better prompt. Stale sources look authoritative, sources disagree, snippets are cut off, and ranking is not truth. Stating these in the output is part of the pattern; a verifier that always sounds certain is a hallucination generator with citations. | Failure | What you see | What to do | | --- | --- | --- | | Stale source | A well-ranked result is months old; the web snippet has no date | Prefer news results with `iso_date` for time-sensitive claims. Return "outdated" or "unverified", never "supported", when the only match is undated | | Conflicting sources | Two results give different numbers | Return "conflicting" with both URLs. Don't average, and don't pick the higher-ranked one | | Truncated snippet | The text ends in `...` | Treat it as a lead, not a quote. Fetch the page if the claim hinges on the missing words | | Rank is not truth | The top result is a blog; the primary source is third | Tell the judge to prefer primary sources (the company, the registry, the publisher) and to say which kind it relied on | | No match | Neither call returns anything on the claim | "Unverified". Absence of results is not a contradiction | Two limits are specific to the tools. News coverage depends on what Google News indexes, so a niche claim may have no news result at all. And data is returned as found at the time of the call: a result that's correct today can change tomorrow, so store the retrieval date next to each verdict. ## What does it cost per answer? Each claim costs 2 credits: one Search call and one News call, 1 credit each. An answer with 5 checkable claims costs 5 × 2 = 10 credits, and an agent that verifies 1,000 such answers a month spends 10,000 credits. Failed calls cost nothing and return `X-Credits-Used: 0`. The free tier gives 100 credits after you verify an email, which covers 50 claim checks, or 10 answers of 5 claims. Beyond that, credits come in prepaid packs starting at 10,000 credits; [pricing](https://perceptlayer.com/pricing) has what they cost, and the [credits](https://docs.perceptlayer.com/credits) docs cover how credits work. To keep spend predictable, verify only claims that matter: numbers, dates, "latest", "first", names. Skip claims the user supplied and anything with no external referent. For caps and budgets across a whole agent, see [AI agent API cost control](https://perceptlayer.com/blog/ai-agent-web-data-costs), and [caching responses](https://perceptlayer.com/blog/cache-web-data-api-responses) helps when the same claim recurs. ## How do you give an agent this as a tool? Expose the two calls as tools and let the agent choose, or wrap `evidence()` in one `verify_claim` tool of your own. The MCP server at `https://perceptlayer.com/mcp` offers `search_endpoints`, `get_endpoint` and `call_endpoint`. The first two only read the catalogue and cost nothing; `call_endpoint` runs an endpoint and spends its credits on success only. For Claude Code, add the server with the command from the [AI agents docs](https://docs.perceptlayer.com/ai-agents): ```bash claude mcp add --transport http perceptlayer https://perceptlayer.com/mcp --header "Authorization: Bearer $API_KEY" ``` A single wrapped tool is usually the better design for verification, because it fixes the query shape, the compaction and the two-call budget. Open-ended tool access makes sense when the agent must choose among many sources. The trade-offs are covered in [MCP vs function calling](https://perceptlayer.com/blog/mcp-vs-function-calling-web-data) and [tool schema design](https://perceptlayer.com/blog/agent-tool-schema-design-web-apis). For a full MCP walkthrough, see [Claude MCP web search](https://perceptlayer.com/blog/claude-agent-live-search-mcp). Your next step: [get a free API key](https://perceptlayer.com/signup), run the News call from example 1 in the playground on the [Google News API](https://perceptlayer.com/apis/google-news) page, then try one claim from your own agent's last answer. ## APIs in this post - [Google Search **1 credit per call** · 7 endpoints](https://perceptlayer.com/apis/google-search) - [Google News **1 credit per call** · 9 endpoints](https://perceptlayer.com/apis/google-news) ## Frequently asked questions ### Does grounding with search results stop hallucinations? It reduces unsupported claims but doesn't remove them. The model can still misread a snippet, cite a result that doesn't say what it claims, or accept a wrong source. Requiring a URL per verdict, a fixed verdict list and an explicit "unverified" option makes errors visible and checkable instead of hidden. ### Should I use Google Search or Google News for verification? Use both. News results include `iso_date`, so they suit time-sensitive claims such as latest releases and recent events. Web results cover reference pages, primary sources and older facts, but snippets may carry no date. One call to each costs 2 credits. See the [Google Search API](https://perceptlayer.com/apis/google-search) and [Google News API](https://perceptlayer.com/apis/google-news). ### What happens if a verification call fails? A failed call is not billed and returns `X-Credits-Used: 0`. For 429 and 503, wait the seconds in `Retry-After` and retry. Other failures return a JSON error with a code and `request_id`; see [errors](https://docs.perceptlayer.com/errors). If a lookup still fails, mark the claim unverified rather than passing it unchecked. ### Can I fetch the full page behind a result? The Search and News endpoints return titles, links, snippets and dates, not page bodies. If a claim depends on text past a truncated snippet, fetch the linked page with your own HTTP client, or use another endpoint from the [catalogue](https://perceptlayer.com/apis) that fits that website. Keep the retrieval date with whatever you store. ### How many claims should I verify per answer? Only the ones a wrong answer would hurt: figures, dates, names, and anything phrased as "latest" or "first". Each verified claim costs 2 credits, so 5 claims cost 10 credits. Verifying every sentence adds cost and latency without adding much, because most sentences aren't checkable facts. grounding ai agents verification google search google news ## More from the blog 1. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 5 Sept 2026 Perceptlayer 7 min read ## [RAG with Live Web Data: When to Skip the Vector Store](https://perceptlayer.com/blog/rag-with-live-web-data) Which RAG questions need a stored index and which need a fresh call. A per-query Google Search lookup costs 1 credit, with the latency trade-off. 2. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 24 Jul 2026 Perceptlayer 7 min read ## [Scheduled AI Agent Runs: Budgeting Credits per Run](https://perceptlayer.com/blog/scheduled-agent-credit-budget) Cap an agent at N calls per run with a Python ledger that reads X-Credits-Used, plus the math for hourly and daily runs on 100 credits on signup. 3. [AI agents](https://perceptlayer.com/blog/category/ai-agents) 18 Jul 2026 Updated 10 Nov 2026 Perceptlayer 11 min read ## [LangChain Custom Tool for Live Web Data: Python Tutorial](https://perceptlayer.com/blog/langchain-custom-tool-web-data) Build a LangChain tool in Python for Google Search and News: typed arguments, retries on 429, 502 and 503 only, and a per-run credit cap. # Endpoints Base URL https://api.perceptlayer.com. Send the key in the X-API-Key header. Credits are per successful call. ## 28Hse API https://perceptlayer.com/apis/28hse - GET /v1/28hse/agency: Agency. 1 credit. Params: id*, page. - GET /v1/28hse/autocomplete: Autocomplete. 1 credit. Params: keyword*, mode. - GET /v1/28hse/listing: Listing. 1 credit. Params: id*, mode*. - GET /v1/28hse/search: Search. 1 credit. Params: mode*, page, bedrooms, price_range, area_type, area_range, estate_id, location, sort. ## 4zida API https://perceptlayer.com/apis/4zida - GET /v1/4zida/agency: Agency. 1 credit. Params: id*. - GET /v1/4zida/autocomplete: Autocomplete. 1 credit. Params: q*, page. - GET /v1/4zida/listing: Listing. 1 credit. Params: id*. - GET /v1/4zida/place-children: Place Children. 1 credit. Params: id*. - GET /v1/4zida/search: Search. 1 credit. Params: for*, type, place_ids[], min_price, max_price, min_area, max_area, min_price_per_m2, max_price_per_m2, min_floor, max_floor, rooms[], categories[], states[], furnished[], heating[], payment_terms[], advertiser_types[], registered, sort, page, elevator, terrace, yard, garage, parking_space, attic, basement, air_conditioning, pets_allowed, smoking_allowed, inhabitable_now, cctv, alarm_secured, asphalt_access, sewerage, power_line, phone_line, wheelchair_access, virtual_sightseeing, video_or_3d_tour, urgent, with_images, new_build. ## 591 API https://perceptlayer.com/apis/591-house - GET /v1/591-house/locations: Locations. 1 credit. Params: region_id, q. - GET /v1/591-house/locations-suggest: Locations Suggest. 1 credit. Params: q*, region_id*. - GET /v1/591-house/rent-listing: Rent Listing. 1 credit. Params: id*. - GET /v1/591-house/rent-search: Rent Search. 1 credit. Params: region_id*, section_ids[], kind, price_min, price_max, area_min, area_max, keywords, shape[], layout[], sort, page. - GET /v1/591-house/sale-listing: Sale Listing. 1 credit. Params: id*. - GET /v1/591-house/sale-search: Sale Search. 1 credit. Params: region_id*, section_ids[], kind, price_min, price_max, area_min, area_max, shape[], layout[], bathrooms, age_max, keywords, sort, cursor. ## 99.co API https://perceptlayer.com/apis/99co - GET /v1/99co/agent: Agent. 1 credit. Params: cea_number*. - GET /v1/99co/agents: Agents. 1 credit. Params: page, limit. - GET /v1/99co/autocomplete: Autocomplete. 1 credit. Params: query*, listing_type, property_segments. - GET /v1/99co/search: Search. 1 credit. Params: listing_type*, property_segments, main_category, location_type, location_id, min_price, max_price, bedrooms, bathrooms, min_area, max_area, sort_by, sort_order, page, limit. - GET /v1/99co/transactions: Transactions. 1 credit. Params: development_id*, transaction_type*, page, limit. ## 99acres API https://perceptlayer.com/apis/99acres - GET /v1/99acres/city-listings: City Listings. 1 credit. Params: city*. - GET /v1/99acres/filter-landings: Filter Landings. 1 credit. Params: slug*, page. - GET /v1/99acres/listing: Listing. 1 credit. Params: spid*, slug. - GET /v1/99acres/search: Search. 1 credit. Params: slug*, page. ## About You API https://perceptlayer.com/apis/about-you - GET /v1/about-you/product: Product. 1 credit. Params: product_id, url, country, language. - GET /v1/about-you/search: Search. 1–3 credits. 1 credit, plus 1 with resolve_names and 1 with include_facets. Params: query, category, brand, color, size, size_system, min_price, max_price, sale_only, sort, page, limit, include_facets, resolve_names, country, language. ## adidas API https://perceptlayer.com/apis/adidas - GET /v1/adidas/product: Product. 1–10 credits. 10 credits with per-size stock, which include_stock turns on unless set to false; 1 credit without it. Params: product_code, url, country, include_stock. - GET /v1/adidas/search: Search. 1 credit. Params: query, category, gender, size, color, price_min, price_max, sale_only, sort, page, country. ## Adondevivir API https://perceptlayer.com/apis/adondevivir - GET /v1/adondevivir/agency: Agency. 1 credit. Params: url, id, page. - GET /v1/adondevivir/listing: Listing. 1 credit. Params: url, id. - GET /v1/adondevivir/locations: Locations. 1 credit. Params: query*, limit. - GET /v1/adondevivir/search: Search. 1 credit. Params: operation, type, location, min_price, max_price, currency, min_bedrooms, max_bedrooms, min_bathrooms, min_garages, min_area, max_area, q, address, sort, page. ## ADS-B History API https://perceptlayer.com/apis/adsb-history - GET /v1/adsb-history/aircraft-history: Aircraft History. 18 credits. Params: hex*, date*, include_track. ## Agoda API https://perceptlayer.com/apis/agoda - GET /v1/agoda/hotel: Hotel. 1 credit. Params: hotel_id*. - GET /v1/agoda/reviews: Reviews. 1 credit. Params: hotel_id*, page, sort. - GET /v1/agoda/rooms: Rooms. 1 credit. Params: check_in*, check_out*, adults, rooms, children_ages[], hotel_id*, city_id*, country_id*. - GET /v1/agoda/search: Search. 1 credit. Params: check_in*, check_out*, adults, rooms, children_ages[], city_id*, currency, page. - GET /v1/agoda/suggest: Suggest. 1 credit. Params: query*. ## Airbnb API https://perceptlayer.com/apis/airbnb - GET /v1/airbnb/listing: Listing. 1 credit. Params: listing_id*, checkin, checkout, adults. - GET /v1/airbnb/reviews: Reviews. 1 credit. Params: listing_id*, limit, offset. - GET /v1/airbnb/search: Search. 1 credit. Params: place*, checkin, checkout, adults, children, infants, pets, currency, price_max, room_type, cursor. ## Airportia API https://perceptlayer.com/apis/airportia - GET /v1/airportia/airport: Airport. 1 credit. Params: code*, mode, page. - GET /v1/airportia/flight-history: Flight History. 1 credit. Params: query*, origin, destination. ## Alibaba API https://perceptlayer.com/apis/alibaba - GET /v1/alibaba/product: Product. 1 credit. Params: id, url. - GET /v1/alibaba/search: Search. 1 credit. Params: query*, page, category, min_price, max_price, min_moq, max_moq, country, review_score, verified, sort. - GET /v1/alibaba/supplier: Supplier. 1 credit. Params: id, url, subdomain. ## AliExpress API https://perceptlayer.com/apis/aliexpress - GET /v1/aliexpress/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/aliexpress/product: Product. 1 credit. Params: product_id*. - GET /v1/aliexpress/product-description: Product Description. 1 credit. Params: description_ref*. - GET /v1/aliexpress/product-reviews: Product Reviews. 1 credit. Params: product_id*, page*, page_size*, filter*. - GET /v1/aliexpress/product-shipping: Product Shipping. 1 credit. Params: product_id*, country*. - GET /v1/aliexpress/search: Search. 1 credit. Params: query*, page*, sort*, min_price, max_price, ship_from, filters[]. - GET /v1/aliexpress/store: Store. 1 credit. Params: seller_id*, store_id*. - GET /v1/aliexpress/store-benefits: Store Benefits. 1 credit. Params: seller_id*, store_id*. - GET /v1/aliexpress/store-products: Store Products. 1 credit. Params: seller_id*, store_id*. ## Allegro API https://perceptlayer.com/apis/allegro - GET /v1/allegro/categories: Categories. 1–20 credits. 1 credit for the top-level list, 20 for the tree under one category. Params: category, country. - GET /v1/allegro/offer: Offer. 20 credits. Params: url, offer_id, country. - GET /v1/allegro/reviews: Reviews. 1 credit. Params: product_id*, page, rating. - GET /v1/allegro/search: Search. 20 credits. Params: query*, category, price_from, price_to, condition, sort, page, country, buy_now, smart, super_seller, seller_id. ## Amazon API https://perceptlayer.com/apis/amazon - GET /v1/amazon/autocomplete: Autocomplete. 1 credit. Params: domain*, prefix*, limit. - GET /v1/amazon/best-sellers: Best Sellers. 1 credit. Params: category*, domain*, page. - GET /v1/amazon/categories: Categories. 1 credit. Params: domain*, page, category*. - GET /v1/amazon/category-products: Category Products. 1 credit. Params: domain*, page, node*, sort. - GET /v1/amazon/customers-say: Customers Say. 1 credit. Params: asin*, domain*. - GET /v1/amazon/deals: Deals. 1 credit. Params: domain*, start_index*, department, lightning. - GET /v1/amazon/featured-reviews: Featured Reviews. 1 credit. Params: asin*, domain*. - GET /v1/amazon/influencer: Influencer. 1 credit. Params: handle*, domain*. - GET /v1/amazon/media-reviews: Media Reviews. 1 credit. Params: asin*, domain*. - GET /v1/amazon/new-releases: New Releases. 1 credit. Params: category*, domain*, page. - GET /v1/amazon/offers: Offers. 1 credit. Params: asin*, domain*, page, condition. - GET /v1/amazon/product: Product. 1 credit. Params: asin*, domain. - GET /v1/amazon/promotion: Promotion. 1 credit. Params: promotionId*, domain*, promotion_id*, page_token. - GET /v1/amazon/rating-summary: Rating Summary. 1 credit. Params: asin*, domain*. - GET /v1/amazon/search: Search. 1 credit. Params: query*, domain, page, sort, category, min_price, max_price, language, rh, dc, node. - GET /v1/amazon/seller: Seller. 1 credit. Params: sellerId*, domain*, page, seller_id*. - GET /v1/amazon/seller-products: Seller Products. 1 credit. Params: sellerId*, domain*, page, seller_id*. - GET /v1/amazon/seller-reviews: Seller Reviews. 1 credit. Params: sellerId*, domain*, page, seller_id*, rating, period. ## Apartment List API https://perceptlayer.com/apis/apartment-list - GET /v1/apartment-list/listing: Listing. 1 credit. Params: slug, rental_id. - GET /v1/apartment-list/location-autocomplete: Location Autocomplete. 1 credit. Params: q*, types[]. - GET /v1/apartment-list/search: Search. 1 credit. Params: location_id*, beds[], baths[], price_min, price_max, amenities[], sort, page, per_page. ## Apartments.com API https://perceptlayer.com/apis/apartments-com - GET /v1/apartments-com/colleges: Colleges. 1 credit. Params: ids[]. - GET /v1/apartments-com/locations: Locations. 1 credit. Params: query*, max_items, use. - GET /v1/apartments-com/property: Property. 1 credit. Params: listing_key*. - GET /v1/apartments-com/property-features: Property Features. 1 credit. Params: listing_key*. - GET /v1/apartments-com/property-fees: Property Fees. 1 credit. Params: listing_key*. - GET /v1/apartments-com/property-map: Property Map. 1 credit. Params: listing_key*. - GET /v1/apartments-com/property-placards: Property Placards. 1 credit. Params: listing_keys[], geo_mid, geo_type. - GET /v1/apartments-com/property-reviews: Property Reviews. 1 credit. Params: listing_key*, page_size. - GET /v1/apartments-com/property-units: Property Units. 1 credit. Params: listing_key*, unit_key*. - GET /v1/apartments-com/property-url: Property Url. 1 credit. Params: listing_key*. - GET /v1/apartments-com/property-virtual-tour: Property Virtual Tour. 1 credit. Params: listing_key*, include_tour_details. - GET /v1/apartments-com/property-walkscore: Property Walkscore. 1 credit. Params: listing_key*. - GET /v1/apartments-com/renter-guides: Renter Guides. 1 credit. Params: kind*, slug, neighborhood, city, state. - GET /v1/apartments-com/search: Search. 1 credit. Params: location, geo_mid, geo_type, property_type, min_rent, max_rent, min_beds, max_beds, pet_friendly, amenities[], bbox. - GET /v1/apartments-com/sitemap-index: Sitemap Index. 1 credit. Params: sitemap. - GET /v1/apartments-com/student-housing-locations: Student Housing Locations. 1 credit. Params: state*, city*, slug*. ## Apple App Store API https://perceptlayer.com/apis/apple-app-store - GET /v1/apple-app-store/apps-product: Apps Product. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/audiobooks-product: Audiobooks Product. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/books-product: Books Product. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/charts: Charts. 1 credit. Params: store, chart, genre, country, limit. - GET /v1/apple-app-store/details: Details. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/developer: Developer. 1 credit. Params: artist_id, id, country. - GET /v1/apple-app-store/movies-product: Movies Product. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/music-product: Music Product. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/podcasts-product: Podcasts Product. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/product: Product. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/product-reviews: Product Reviews. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. - GET /v1/apple-app-store/search: Search. 1 credit. Params: query*, store, country, limit. - GET /v1/apple-app-store/tv-product: Tv Product. 1 credit. Params: id, product_id, store, country, season_id, num, offset, next_page_token. ## Apple Maps API https://perceptlayer.com/apis/apple-maps - GET /v1/apple-maps/place: Place. 1 credit. Params: muid, place_id, auid, locale. - GET /v1/apple-maps/reviews: Reviews. 1 credit. Params: muid*, locale, page. - GET /v1/apple-maps/search: Search. 1 credit. Params: q*, lat*, lon*, locale, radius_km. ## Aqar API https://perceptlayer.com/apis/aqar - GET /v1/aqar/agent: Agent. 1 credit. Params: user_id*, page, size. - GET /v1/aqar/autocomplete: Autocomplete. 1 credit. Params: query*, city_id, category_id, limit. - GET /v1/aqar/listing: Listing. 1 credit. Params: id, url. - GET /v1/aqar/search: Search. 1 credit. Params: listing_type, property_type, category_id, city_id, district_id, min_price, max_price, min_area, max_area, min_beds, min_baths, min_living_rooms, min_street_width, max_age, furnished, rent_period, keyword, sort, page, size. ## Aqarmap API https://perceptlayer.com/apis/aqarmap - GET /v1/aqarmap/agent: Agent. 1 credit. Params: listing_id*, lang. - GET /v1/aqarmap/agents: Agents. 1 credit. Params: location, section, property_type, limit, lang. - GET /v1/aqarmap/compounds: Compounds. 1 credit. Params: q*, lang. - GET /v1/aqarmap/listing: Listing. 1 credit. Params: id*, lang. - GET /v1/aqarmap/listing-children: Listing Children. 1 credit. Params: listing_id*, lang. - GET /v1/aqarmap/listing-valuation: Listing Valuation. 1 credit. Params: listing_id*, lang. - GET /v1/aqarmap/location-stats: Location Stats. 1 credit. Params: location*, property_type. - GET /v1/aqarmap/locations: Locations. 1 credit. Params: q*, lang. - GET /v1/aqarmap/search: Search. 1 credit. Params: section, location, property_type, rooms, baths, price_min, price_max, area_min, area_max, finish_type, payment_method, owner_only, has_video, keyword, sort, page, limit, lang. ## Aramisauto API https://perceptlayer.com/apis/aramisauto - GET /v1/aramisauto/search: Search. 1 credit. Params: query, energy, make, model, mileage_min, mileage_max, sort, page, limit. - GET /v1/aramisauto/vehicle: Vehicle. 1 credit. Params: vehicle_id*. ## Arbeitsagentur Jobs API https://perceptlayer.com/apis/arbeitsagentur-jobs - GET /v1/arbeitsagentur-jobs/job: Job. 1 credit. Params: refnr*. - GET /v1/arbeitsagentur-jobs/locations: Locations. 1 credit. Params: plz, suchwort. - GET /v1/arbeitsagentur-jobs/search: Search. 1 credit. Params: was, wo, berufsfeld, arbeitgeber, page, size, angebotsart, arbeitszeit, befristung, veroeffentlichtseit, umkreis, zeitarbeit, pav. ## Argenprop API https://perceptlayer.com/apis/argenprop - GET /v1/argenprop/agencies: Agencies. 1 credit. Params: query, page, rows. - GET /v1/argenprop/agency: Agency. 1 credit. Params: id, slug. - GET /v1/argenprop/listing: Listing. 1 credit. Params: id*. - GET /v1/argenprop/locations-autocomplete: Locations Autocomplete. 1 credit. Params: q*. - GET /v1/argenprop/search: Search. 1 credit. Params: operation, country, page, rows, sort, price_min, price_max, seller_type, price_availability, region, partido, property_type. ## Ashby API https://perceptlayer.com/apis/ashby - GET /v1/ashby/jobs: Jobs. 1 credit. Params: board*, q, location, department, team, workplace_type, employment_type, include_compensation, page, limit. ## ASOS API https://perceptlayer.com/apis/asos - GET /v1/asos/autocomplete: Autocomplete. 1 credit. Params: query*, store. - GET /v1/asos/product: Product. 1 credit. Params: product_id, url, store. - GET /v1/asos/reviews: Reviews. 1 credit. Params: product_id*, page, store. - GET /v1/asos/search: Search. 1 credit. Params: query, category_id, page, sort, brand, colour, size, min_price, max_price, sale_only, store. ## athome API https://perceptlayer.com/apis/athome - GET /v1/athome/agency: Agency. 1 credit. Params: slug*, type. - GET /v1/athome/autocomplete: Autocomplete. 1 credit. Params: keyword*, type, prefecture. - GET /v1/athome/places: Places. 1 credit. Params: query*. - GET /v1/athome/rent-detail: Rent Detail. 1 credit. Params: id*. - GET /v1/athome/rent-search: Rent Search. 1 credit. Params: prefecture*, city, layouts, walk_max, age_max, page, per_page, property_type, rent_min, rent_max, area_min. - GET /v1/athome/sale-detail: Sale Detail. 1 credit. Params: id*. - GET /v1/athome/sale-search: Sale Search. 1 credit. Params: prefecture*, city, layouts, walk_max, age_max, page, per_page, price_min, price_max, area_min, area_max. ## Autohero API https://perceptlayer.com/apis/autohero - GET /v1/autohero/car: Car. 1 credit. Params: id*. - GET /v1/autohero/search: Search. 1 credit. Params: country, brand, model, price_min, price_max, mileage_max, year_min, sort, limit, offset. ## AutoScout24 API https://perceptlayer.com/apis/autoscout24 - GET /v1/autoscout24/dealer: Dealer. 1 credit. Params: market, dealer_slug*. - GET /v1/autoscout24/dealer-inventory: Dealer Inventory. 1 credit. Params: market, dealer_slug*, page, limit. - GET /v1/autoscout24/dealer-reviews: Dealer Reviews. 1 credit. Params: market, dealer_slug*. - GET /v1/autoscout24/listing: Listing. 1 credit. Params: market, listing_id*. - GET /v1/autoscout24/search: Search. 1 credit. Params: market, make_id, model_id, price_min, price_max, mileage_min, mileage_max, registration_year_min, registration_year_max, power_min, power_max, power_unit, fuel[], transmission[], body_type[], equipment[], seller_type, offer, usage_state[], zip, radius, sort, order, page, limit. - GET /v1/autoscout24/taxonomy: Taxonomy. 1 credit. Params: market, make_id, include[]. ## AutoTempest API https://perceptlayer.com/apis/autotempest - GET /v1/autotempest/makes: Makes. 1 credit. - GET /v1/autotempest/models: Models. 1 credit. Params: make*. - GET /v1/autotempest/search: Search. 1 credit. Params: make*, model, zip*, radius, sources[], sort, per_page, min_price, max_price, min_year, max_year, min_miles, max_miles, drive, fuel, body_style, cursor. ## AutoTrack.nl API https://perceptlayer.com/apis/autotrack-nl - GET /v1/autotrack-nl/dealers: Dealers. 1 credit. Params: dealerId*. - GET /v1/autotrack-nl/dealers-listings: Dealers Listings. 1 credit. Params: dealerId*, pageNumber, pageSize, sortField, sortOrder, make_id[], fuel[], transmission[], body_type[], seller_type[], province[], listed_within_days, price_min, price_max, year_min, year_max, mileage_min, mileage_max, power_min, power_max. - GET /v1/autotrack-nl/dealers-reviews: Dealers Reviews. 1 credit. Params: dealerId*. - GET /v1/autotrack-nl/filters: Filters. 1 credit. - GET /v1/autotrack-nl/kenteken: Kenteken. 1 credit. Params: plate*. - GET /v1/autotrack-nl/listings: Listings. 1 credit. Params: advertentieId*. - GET /v1/autotrack-nl/listings-media: Listings Media. 1 credit. Params: advertentieId*. - GET /v1/autotrack-nl/listings-search: Listings Search. 1 credit. Params: pageNumber, pageSize, sortField, sortOrder, make_id[], fuel[], transmission[], body_type[], seller_type[], province[], listed_within_days, price_min, price_max, year_min, year_max, mileage_min, mileage_max, power_min, power_max. ## Autotrader API https://perceptlayer.com/apis/autotrader - GET /v1/autotrader/recent-listings: Recent Listings. 1 credit. - GET /v1/autotrader/search-options: Search Options. 1 credit. ## AutoTrader UK API https://perceptlayer.com/apis/autotrader-uk - GET /v1/autotrader-uk/dealer: Dealer. 1 credit. Params: retailer_id*. - GET /v1/autotrader-uk/dealer-listings: Dealer Listings. 1 credit. Params: postcode*, price_search_type, make, model, body_type, colour, transmission, seller_type, fuel_type[], min_price, max_price, min_year_manufactured, max_year_manufactured, min_mileage, max_mileage, distance, sort, page, retailer_id*. - GET /v1/autotrader-uk/facets: Facets. 1 credit. Params: postcode*, price_search_type, facets[], make, model, sort. - GET /v1/autotrader-uk/listing: Listing. 1 credit. Params: advert_id*. - GET /v1/autotrader-uk/search: Search. 1 credit. Params: postcode*, price_search_type, make, model, body_type, colour, transmission, seller_type, fuel_type[], min_price, max_price, min_year_manufactured, max_year_manufactured, min_mileage, max_mileage, distance, sort, page. - GET /v1/autotrader-uk/taxonomy: Taxonomy. 1 credit. Params: postcode*, make. ## AutoTrader.ca API https://perceptlayer.com/apis/autotrader-ca - GET /v1/autotrader-ca/listing: Listing. 1 credit. Params: id*. - GET /v1/autotrader-ca/search: Search. 1 credit. Params: make, model, province, city, offer, price_from, price_to, year_from, year_to, km_from, km_to, seller_type, postal_code, radius, sort, desc, page. ## AutoUncle API https://perceptlayer.com/apis/autouncle - GET /v1/autouncle/car: Car. 1 credit. Params: id*, country*. - GET /v1/autouncle/search: Search. 1 credit. Params: country*, brand, model, min_price, max_price, min_year, max_year, fuel_type[], page*. ## Autovit API https://perceptlayer.com/apis/autovit - GET /v1/autovit/dealer: Dealer. 1 credit. Params: dealer_id, url. - GET /v1/autovit/listing: Listing. 1 credit. Params: listing_id, url. - GET /v1/autovit/search: Search. 1 credit. Params: make, model, price_min, price_max, year_min, year_max, mileage_min, mileage_max, fuel[], gearbox[], sort, page. - GET /v1/autovit/taxonomy: Taxonomy. 1 credit. Params: make. ## Baidu API https://perceptlayer.com/apis/baidu - GET /v1/baidu/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/baidu/developer-search: Developer Search. 1 credit. Params: query*. - GET /v1/baidu/images: Images. 1 credit. Params: query*. - GET /v1/baidu/maps: Maps. 1 credit. Params: query*, city*, page. - GET /v1/baidu/news: News. 1 credit. Params: query*, page, period. - GET /v1/baidu/search: Search. 1 credit. Params: query*. - GET /v1/baidu/translation-suggestions: Translation Suggestions. 1 credit. Params: query*. - GET /v1/baidu/trending: Trending. 1 credit. Params: query*. ## Bandcamp API https://perceptlayer.com/apis/bandcamp - GET /v1/bandcamp/album: Album. 1 credit. Params: url*. - GET /v1/bandcamp/artist: Artist. 1 credit. Params: url*. - GET /v1/bandcamp/discover: Discover. 1 credit. Params: cursor, size. ## Batdongsan.com.vn API https://perceptlayer.com/apis/batdongsan - GET /v1/batdongsan/agent: Agent. 1 credit. Params: agent_id*. - GET /v1/batdongsan/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/batdongsan/listing: Listing. 1 credit. Params: id*. - GET /v1/batdongsan/map-markers: Map Markers. 1 credit. Params: listing_type, city*, north_east_lat*, north_east_lng*, south_west_lat*, south_west_lng*. - GET /v1/batdongsan/price-history: Price History. 1 credit. Params: id*. - GET /v1/batdongsan/search: Search. 1 credit. Params: listing_type, city*, category, min_price, max_price, min_area, max_area, bedrooms, bathrooms, frontage_width, road_width, location_id, location_type, verified, pro_agent, sort, page, per_page, legality, interior, floors, direction, balcony_direction. - GET /v1/batdongsan/similar: Similar. 1 credit. Params: id*. - GET /v1/batdongsan/top-agents: Top Agents. 1 credit. Params: city*. ## Bayut API https://perceptlayer.com/apis/bayut - GET /v1/bayut/agency: Agency. 1 credit. Params: query, external_id. - GET /v1/bayut/agency-listings: Agency Listings. 1 credit. Params: agency_external_id*, purpose, sort, page, limit. - GET /v1/bayut/listing: Listing. 1 credit. Params: external_id*. - GET /v1/bayut/locations: Locations. 1 credit. Params: query*, level, page, limit. - GET /v1/bayut/search: Search. 1 credit. Params: query, purpose, price_min, price_max, rooms, baths, area_min, area_max, location_external_id[], category_external_id, sort, page, limit. ## Behance API https://perceptlayer.com/apis/behance - GET /v1/behance/gallery: Gallery. 1 credit. Params: field*, search. - GET /v1/behance/project: Project. 1 credit. Params: id*, slug. - GET /v1/behance/search: Search. 1 credit. Params: search*, sort. - GET /v1/behance/user: User. 1 credit. Params: username*. ## Bezrealitky API https://perceptlayer.com/apis/bezrealitky - GET /v1/bezrealitky/autocomplete: Autocomplete. 1 credit. Params: q*, size, from. - GET /v1/bezrealitky/listing: Listing. 1 credit. Params: id, url, listing_id*. - GET /v1/bezrealitky/search: Search. 1 credit. Params: offer_type, estate_type[], land_type[], region_ids[], bedrooms[], disposition[], ownership[], condition[], construction[], equipped[], available_from, query, bbox, polygon, sort, page, per_page, balcony, loggia, terrace, cellar, pet_friendly, parking, garage, lift, barrier_free, low_energy, roommate, discounted_only, include_short_term, price_min, price_max, area_min, area_max, land_area_min, land_area_max. ## Bien'ici API https://perceptlayer.com/apis/bienici - GET /v1/bienici/agency-listings: Agency Listings. 1 credit. Params: import_account_id*, transaction_type, property_type[], page, size. - GET /v1/bienici/listing: Listing. 1 credit. Params: ad_id*. - GET /v1/bienici/locations: Locations. 1 credit. Params: query*, type. - GET /v1/bienici/place: Place. 1 credit. Params: query*, type. - GET /v1/bienici/place-details: Place Details. 1 credit. Params: department*. - GET /v1/bienici/programme-units: Programme Units. 1 credit. Params: ad_id*. - GET /v1/bienici/search: Search. 1 credit. Params: transaction_type, property_type[], zone_ids[], postal_code[], min_price, max_price, min_area, max_area, min_bedrooms, max_bedrooms, min_rooms, max_rooms, min_garden_area, max_garden_area, energy_classification, on_the_market, new_only, sort, sort_order, page, size, is_preview, is_on_last_floor, has_3d_model, is_ground_floor, is_not_ground_floor, has_pool, has_balcony, has_terrace, has_balcony_or_terrace, has_cellar, has_parking, has_fire_place, has_door_code, has_intercom, has_garden, has_elevator, work_to_do, no_work_to_do, single_storey_house, is_disabled_people_friendly, flat_sharing, is_building_plot, is_exclusive_sale_mandate, has_caretaker, is_duplex, has_separate_toilet, is_furnished, is_not_furnished, has_photo, is_eligible_for_denormandie_law, exportable_ad, is_in_student_residence, is_in_senior_residence, is_in_tourism_residence, is_in_managed_residence, is_not_in_residence, is_not_life_annuity_sale, is_life_annuity_sale_only, is_not_property_without_usufruct, is_property_without_usufruct_only, is_promoted_new_property, has_no_photo, has_no_address, has_address, has_no_price, is_promoted_as_exclusive, has_to_be_built, has_not_to_be_built. ## Bilbasen API https://perceptlayer.com/apis/bilbasen - GET /v1/bilbasen/dealers-listings: Dealers Listings. 1 credit. Params: seller_id*, page, page_size. - GET /v1/bilbasen/listing: Listing. 1 credit. Params: listing_id*. - GET /v1/bilbasen/metadata: Metadata. 1 credit. - GET /v1/bilbasen/search: Search. 1 credit. Params: category, make, model, year_from, year_to, price_from, price_to, mileage_from, mileage_to, fuel, body_type, horse_power_from, horse_power_to, consumption_from, consumption_to, photo_ads, sort, page, page_size. ## Bilibili API https://perceptlayer.com/apis/bilibili - GET /v1/bilibili/comments: Comments. 1 credit. Params: type*, oid*, sort, pn, ps. - GET /v1/bilibili/search: Search. 1 credit. Params: search_type*, keyword*, page, order, duration, tids. - GET /v1/bilibili/user: User. 1 credit. Params: mid*. - GET /v1/bilibili/user-videos: User Videos. 1 credit. Params: vmid*, order, pn, ps. - GET /v1/bilibili/video: Video. 1 credit. Params: bvid, aid. - GET /v1/bilibili/video-tags: Video Tags. 1 credit. Params: bvid*. ## Billiger.de API https://perceptlayer.com/apis/billiger - GET /v1/billiger/baseproduct: Baseproduct. 1 credit. Params: baseproduct_id*. - GET /v1/billiger/offers: Offers. 1 credit. Params: product_id*, page_no, page, page_size, product_offers_sorting, sort, product_offers_sorting_direction, direction, product_offers_group_by_shop, group_by_shop, all, offer_conditions. - GET /v1/billiger/product: Product. 1 credit. Params: product_id*. - GET /v1/billiger/search: Search. 1 credit. Params: query*, q, page_no, page, page_size, sort, cat, doctype, filters[]*, fuzzy. - GET /v1/billiger/shop: Shop. 1 credit. Params: shop_id*. ## Bing API https://perceptlayer.com/apis/bing - GET /v1/bing/autocomplete: Autocomplete. 1 credit. Params: query*, mkt, cc, setlang. - GET /v1/bing/images: Images. 1 credit. Params: query*, mkt, cc, setlang, page, size, layout, type, color, freshness, license. - GET /v1/bing/maps: Maps. 1 credit. Params: query*, mkt, cc, setlang, limit. - GET /v1/bing/news: News. 1 credit. Params: query*, mkt, cc, setlang, page, freshness. - GET /v1/bing/product: Product. 1 credit. Params: query*, mkt, cc, setlang, product_token*. - GET /v1/bing/reverse-image: Reverse Image. 1 credit. Params: image_url*, mkt, cc, setlang. - GET /v1/bing/search: Search. 1 credit. Params: query*, page, num, site, filetype, safe, hl, include_html. - GET /v1/bing/shopping: Shopping. 1 credit. Params: query*, mkt, cc, setlang, page. - GET /v1/bing/suggestions: Suggestions. 1 credit. Params: query*, mkt, cc, setlang. - GET /v1/bing/videos: Videos. 1 credit. Params: query*, mkt, cc, setlang, page, freshness. ## Blibli API https://perceptlayer.com/apis/blibli - GET /v1/blibli/product: Product. 1 credit. Params: id*, item_sku. - GET /v1/blibli/reviews: Reviews. 1 credit. Params: product_sku*, page. - GET /v1/blibli/search: Search. 1 credit. Params: query*, page, sort, min_price, max_price, min_rating, location. - GET /v1/blibli/shop: Shop. 1 credit. Params: code*, page. ## Blocket Bil API https://perceptlayer.com/apis/blocket-bil - GET /v1/blocket-bil/listing: Listing. 1 credit. Params: id*. - GET /v1/blocket-bil/recommendations: Recommendations. 1 credit. Params: ad_id*. - GET /v1/blocket-bil/search: Search. 1 credit. Params: page, lim, sort, variant, location, sales_form[], fuel, price_from, price_to, year_from, year_to, mileage_from, mileage_to, body_type, transmission, org_id. ## Blocket Bostad API https://perceptlayer.com/apis/blocket-bostad - GET /v1/blocket-bostad/landlord: Landlord. 1 credit. Params: uid*. - GET /v1/blocket-bostad/listing: Listing. 1 credit. Params: id*. - GET /v1/blocket-bostad/location-autocomplete: Location Autocomplete. 1 credit. Params: q*. - GET /v1/blocket-bostad/search: Search. 1 credit. Params: area, min_rent, max_rent, min_rooms, max_rooms, min_size, max_size, min_bedrooms, home_type, shared, furnished, pets, smoking, wheelchair_accessible, first_hand, student_home, senior_home, corporate_home, sort, direction, limit, page. ## Bluesky API https://perceptlayer.com/apis/bluesky - GET /v1/bluesky/followers: Followers. 1 credit. Params: actor*, limit, cursor, sort. - GET /v1/bluesky/following: Following. 1 credit. Params: actor*, limit, cursor, sort. - GET /v1/bluesky/likes: Likes. 1 credit. Params: uri*, limit, cursor. - GET /v1/bluesky/posts: Posts. 1 credit. Params: uris[]. - GET /v1/bluesky/profile: Profile. 1 credit. Params: actor*. - GET /v1/bluesky/profiles: Profiles. 1 credit. Params: actors[]. - GET /v1/bluesky/quotes: Quotes. 1 credit. Params: uri*, limit, cursor. - GET /v1/bluesky/relationships: Relationships. 1 credit. Params: actor*, others[]*. - GET /v1/bluesky/reposts: Reposts. 1 credit. Params: uri*, limit, cursor. - GET /v1/bluesky/resolve-handle: Resolve Handle. 1 credit. Params: handle*. - GET /v1/bluesky/search-posts: Search Posts. 1 credit. Params: q, query, version*, limit, cursor, sort, author, lang, domain, url, since, until, authors[], hashtags[], domains[], urls[], languages[], embeddedAtUris[], tag[], excludeAuthors[], excludeHashtags[], excludeMentions[], excludeDomains[], excludeUrls[], excludeLanguages[], excludeEmbeddedAtUris[], mentions[], allTime, hasMedia, hasVideo, repliesOnly, excludeReplies, following. - GET /v1/bluesky/search-users: Search Users. 1 credit. Params: q*, limit, cursor. - GET /v1/bluesky/thread: Thread. 1 credit. Params: uri*, version*, depth, parentHeight, branchingFactor, below, above. - GET /v1/bluesky/typeahead-users: Typeahead Users. 1 credit. Params: q*, limit. - GET /v1/bluesky/user-posts: User Posts. 1 credit. Params: actor*, limit, cursor, filter, includePins. ## bol.com API https://perceptlayer.com/apis/bol - GET /v1/bol/autocomplete: Autocomplete. 3 credits. Params: q*, country, language. - GET /v1/bol/offers: Offers. 3 credits. Params: id, url, slug, country, language, condition. - GET /v1/bol/product: Product. 7 credits. Params: id, url, slug, country, language. - GET /v1/bol/reviews: Reviews. 7 credits. Params: id, url, slug, country, language. - GET /v1/bol/search: Search. 9 credits. Params: q*, page, sort, category, facet_ids, min_price, max_price, country, language. ## Boliga API https://perceptlayer.com/apis/boliga - GET /v1/boliga/listing: Listing. 1 credit. Params: id*. - GET /v1/boliga/search: Search. 1 credit. Params: page, page_size, property_type, municipality, zip_codes, price_min, price_max, size_min, size_max, rooms_min, rooms_max, build_year_min, build_year_max, sort. - GET /v1/boliga/sold: Sold. 1 credit. Params: page, page_size, street, zip_from, zip_to, municipality, property_type, sales_year_min, sales_year_max, sort. ## BoligPortal API https://perceptlayer.com/apis/boligportal - GET /v1/boligportal/address-autocomplete: Address Autocomplete. 1 credit. Params: q*, container. - GET /v1/boligportal/count: Count. 1 credit. Params: location, district, area, street, type, min_rooms, max_rooms, min_size, max_size, min_rent, max_rent, min_rental_period, available_before, min_lat, max_lat, min_lng, max_lng, pet_friendly, furnished, balcony, parking, elevator, shareable, student_only, senior_friendly, social_housing, newbuild, electric_charging_station, dishwasher, washing_machine, dryer. - GET /v1/boligportal/listings: Listings. 1 credit. Params: ids*. - GET /v1/boligportal/map: Map. 1 credit. Params: location, district, area, street, type, min_rooms, max_rooms, min_size, max_size, min_rent, max_rent, min_rental_period, available_before, min_lat*, max_lat*, min_lng*, max_lng*, pet_friendly, furnished, balcony, parking, elevator, shareable, student_only, senior_friendly, social_housing, newbuild, electric_charging_station, dishwasher, washing_machine, dryer. - GET /v1/boligportal/postal-code: Postal Code. 1 credit. Params: code*. - GET /v1/boligportal/price-histogram: Price Histogram. 1 credit. Params: location, district, area, street, type, min_rooms, max_rooms, min_size, max_size, min_rental_period, available_before, min_lat, max_lat, min_lng, max_lng, pet_friendly, furnished, balcony, parking, elevator, shareable, student_only, senior_friendly, social_housing, newbuild, electric_charging_station, dishwasher, washing_machine, dryer. - GET /v1/boligportal/search: Search. 1 credit. Params: location, district, area, street, type, min_rooms, max_rooms, min_size, max_size, min_rent, max_rent, min_rental_period, available_before, min_lat, max_lat, min_lng, max_lng, pet_friendly, furnished, balcony, parking, elevator, shareable, student_only, senior_friendly, social_housing, newbuild, electric_charging_station, dishwasher, washing_machine, dryer, order, page. ## Boligsiden API https://perceptlayer.com/apis/boligsiden - GET /v1/boligsiden/address: Address. 1 credit. Params: id*. - GET /v1/boligsiden/agencies: Agencies. 1 credit. Params: location_name*, location_type, address_type, sort_by, sort_ascending, page, per_page. - GET /v1/boligsiden/agency: Agency. 1 credit. Params: id*. - GET /v1/boligsiden/foreclosures: Foreclosures. 1 credit. Params: page, per_page, sort_ascending, sort_by. - GET /v1/boligsiden/listing: Listing. 1 credit. Params: id*. - GET /v1/boligsiden/locations: Locations. 1 credit. Params: q*, listing_type, address_types[]. - GET /v1/boligsiden/previews: Previews. 1 credit. Params: page, per_page, sort_ascending, zip_codes[], cities[], municipalities[], provinces[], address_types[], sort_by, price_min, price_max, rooms_min, area_min, area_max. - GET /v1/boligsiden/price-history: Price History. 1 credit. Params: id*. - GET /v1/boligsiden/reference: Reference. 1 credit. Params: type*. - GET /v1/boligsiden/search: Search. 1 credit. Params: page, per_page, sort_ascending, zip_codes[], cities[], municipalities[], provinces[], address_types[], listing_type, sort_by, price_min, price_max, rent_min, rent_max, deposit_min, deposit_max, rooms_min, rooms_max, area_min, area_max, lot_area_min, lot_area_max, floor_min, floor_max, monthly_expense_min, monthly_expense_max, year_built_from, year_built_to, energy_labels[], free_text, realtor_id, balcony, terrace, elevator, price_drop, pets_allowed. ## Booking.com API https://perceptlayer.com/apis/booking - POST /v1/booking/bulk-prices: Bulk Prices. 1 credit. Params: searches*, debug. - GET /v1/booking/destinations: Destinations. 1 credit. Params: q*, lang, currency. - GET /v1/booking/facilities: Facilities. 1 credit. Params: url, country, slug, checkin, checkout, group_adults, group_children, no_rooms, lang, currency. - GET /v1/booking/hotel: Hotel. 1 credit. Params: url, country, slug. - GET /v1/booking/photos: Photos. 1 credit. Params: url, country, slug, checkin, checkout, group_adults, group_children, no_rooms, lang, currency. - GET /v1/booking/prices: Prices. 1 credit. Params: ss*, checkin*, checkout*, group_adults, group_children, no_rooms, dest_id, dest_type, lang, currency. - GET /v1/booking/review-scores: Review Scores. 1 credit. Params: url, country, slug, checkin, checkout, group_adults, group_children, no_rooms, lang, currency. - GET /v1/booking/reviews: Reviews. 1 credit. Params: url, country, slug, lang, currency, page, limit, sort. - GET /v1/booking/rooms: Rooms. 1 credit. Params: url, country, slug, checkin, checkout, group_adults, group_children, no_rooms, lang, currency. - GET /v1/booking/search: Search. 1 credit. Params: ss*, checkin, checkout, group_adults, group_children, no_rooms, dest_id, dest_type, lang, currency. - GET /v1/booking/search-by-url: Search By Url. 1 credit. Params: url*. ## Booli API https://perceptlayer.com/apis/booli - GET /v1/booli/area-statistics: Area Statistics. 1 credit. Params: area_id*, object_type. - GET /v1/booli/areas: Areas. 1 credit. Params: query, ids. - GET /v1/booli/filters: Filters. 1 credit. Params: type. - GET /v1/booli/listing: Listing. 1 credit. Params: booli_id, residence_id. - GET /v1/booli/search: Search. 1 credit. Params: area_ids*, sort, ascending, page, limit, object_type, amenities, extend_areas, floor, days_active, showing_start_relative, max_rent, max_distance_to_water, show_only, is_new_construction, upcoming_sale, min_rooms, max_rooms, min_living_area, max_living_area, min_plot_area, max_plot_area, min_construction_year, max_construction_year, min_list_price, max_list_price, min_list_sqm_price, max_list_sqm_price. - GET /v1/booli/sold: Sold. 1 credit. Params: area_ids*, sort, ascending, page, limit, object_type, amenities, extend_areas, min_sold_date, max_sold_date, min_rooms, max_rooms, min_living_area, max_living_area, min_plot_area, max_plot_area, min_construction_year, max_construction_year, min_sold_price, max_sold_price, min_sold_sqm_price, max_sold_sqm_price. - GET /v1/booli/sold-properties: Sold Properties. 1 credit. Params: booli_id, residence_id. ## Bproperty API https://perceptlayer.com/apis/bproperty - GET /v1/bproperty/agent: Agent. 1 credit. Params: id*. - GET /v1/bproperty/categories: Categories. 1 credit. Params: type. - GET /v1/bproperty/cities: Cities. 1 credit. - GET /v1/bproperty/features: Features. 1 credit. - GET /v1/bproperty/listing: Listing. 1 credit. Params: slug, id. - GET /v1/bproperty/location-autocomplete: Location Autocomplete. 1 credit. Params: q*, limit. - GET /v1/bproperty/search: Search. 1 credit. Params: status*, type, category, area, city, agent_id, q, min_price, max_price, bedrooms, bathrooms, verified, featured, min_lat, max_lat, min_lng, max_lng, sort, page, per_page. ## Brave Search API https://perceptlayer.com/apis/brave - GET /v1/brave/search: Search. 1 credit. Params: query*, language, page, include_html, q. ## Bring a Trailer API https://perceptlayer.com/apis/bring-a-trailer - GET /v1/bring-a-trailer/auctions-filters: Auctions Filters. 1 credit. - GET /v1/bring-a-trailer/auctions-search: Auctions Search. 1 credit. Params: auction_status, sale_status, sort, page, per_page, make_or_model, category, era, origin, location_country, minimum_year, maximum_year, minimum_bid, maximum_bid, auction_type, range, zip_code, user_lat, user_lon, maximum_distance, s. - GET /v1/bring-a-trailer/bids: Bids. 1 credit. - GET /v1/bring-a-trailer/listings: Listings. 1 credit. Params: id*. ## Capterra API https://perceptlayer.com/apis/capterra - GET /v1/capterra/catalog: Catalog. 1 credit. Params: type, page, limit, offset. - GET /v1/capterra/categories: Categories. 1 credit. Params: type. - GET /v1/capterra/categories-products: Categories Products. 1 credit. Params: id*, slug, page, sort. - GET /v1/capterra/compare: Compare. 1 credit. Params: product_a*, product_b*, slug_a, slug_b. - GET /v1/capterra/products: Products. 1 credit. Params: page, limit, sortBy, categoryIds[], exclude[]. - GET /v1/capterra/products-detail: Products Detail. 1 credit. Params: id*, slug. - GET /v1/capterra/products-reviews: Products Reviews. 1 credit. Params: id*, slug, page, sort, countries[], company_size[], time_used[], overall_rating_ge. - GET /v1/capterra/products-reviews-detail: Products Reviews Detail. 1 credit. Params: id*, reviewId*, slug. - GET /v1/capterra/products-search: Products Search. 1 credit. Params: q*, page, limit. - GET /v1/capterra/vendors: Vendors. 1 credit. Params: type, limit, offset. ## CarDekho API https://perceptlayer.com/apis/cardekho - GET /v1/cardekho/cities: Cities. 1 credit. Params: q*. - GET /v1/cardekho/makes: Makes. 1 credit. - GET /v1/cardekho/models: Models. 1 credit. Params: brand*, model*. - GET /v1/cardekho/new-cars: New Cars. 1 credit. Params: brand*, model*. - GET /v1/cardekho/new-cars-dealers: New Cars Dealers. 1 credit. Params: brand*, model*. - GET /v1/cardekho/new-cars-price: New Cars Price. 1 credit. Params: model_slug*, brand*, model*. - GET /v1/cardekho/used-cars: Used Cars. 1 credit. Params: city, make, model, price_min, price_max, year_min, year_max, km_max, fuel, transmission, body_type, owner, seats, sort, sort_direction, page. - GET /v1/cardekho/used-cars-dealers: Used Cars Dealers. 1 credit. Params: city_id, latitude, longitude. - GET /v1/cardekho/used-cars-detail: Used Cars Detail. 1 credit. Params: used_car_sku_id*, city. - GET /v1/cardekho/used-cars-filters: Used Cars Filters. 1 credit. - GET /v1/cardekho/used-cars-gallery: Used Cars Gallery. 1 credit. Params: sku_ids[]. - GET /v1/cardekho/used-cars-seller: Used Cars Seller. 1 credit. Params: used_car_sku_id*, city. ## CarGurus API https://perceptlayer.com/apis/cargurus - GET /v1/cargurus/dealer: Dealer. 1 credit. Params: service_provider_id*. - GET /v1/cargurus/makes: Makes. 1 credit. Params: locale, country_code, origin, device_platform. - GET /v1/cargurus/models: Models. 1 credit. Params: locale, country_code, origin, device_platform, make_id*. - GET /v1/cargurus/search: Search. 1 credit. Params: make_model_trim_paths, price_min, price_max, distance, sort, sort_direction, page. ## CarMax API https://perceptlayer.com/apis/carmax - GET /v1/carmax/filters: Filters. 1 credit. - GET /v1/carmax/media: Media. 1 credit. Params: stockNumber*. - GET /v1/carmax/search: Search. 1 credit. Params: make, model, year, mileage, price, sort, zip. - GET /v1/carmax/store: Store. 1 credit. Params: storeId*. - GET /v1/carmax/taxonomy: Taxonomy. 1 credit. ## Cars & Bids API https://perceptlayer.com/apis/cars-and-bids - GET /v1/cars-and-bids/auction: Auction. 1 credit. Params: id*. - GET /v1/cars-and-bids/auction-state: Auction State. 1 credit. Params: id*. - GET /v1/cars-and-bids/search: Search. 1 credit. Params: status, limit, offset, search, make_slug, model_slug, start_year, end_year, sort, transmission, body_style. ## Cars.com API https://perceptlayer.com/apis/cars-com - GET /v1/cars-com/dealer: Dealer. 1 credit. Params: listing_id*, zip*. - GET /v1/cars-com/facets: Facets. 1 credit. Params: zip*. - GET /v1/cars-com/listing: Listing. 1 credit. Params: listing_id*, zip*. - GET /v1/cars-com/media: Media. 1 credit. Params: listing_id*, zip*. - GET /v1/cars-com/model-reviews: Model Reviews. 1 credit. Params: listing_id*, zip*. - GET /v1/cars-com/price-eval: Price Eval. 1 credit. Params: zip*, radius_miles*, no_accidents, sort*, page*, page_size*. - GET /v1/cars-com/search: Search. 1 credit. Params: zip*, radius_miles*, makes[], models[], stock_type*, year_min, year_max, fuel_slugs[], transmission_slugs[], seller_type[], sort*, page*, page_size*. - GET /v1/cars-com/taxonomy: Taxonomy. 1 credit. ## Cars24 API https://perceptlayer.com/apis/cars24 - GET /v1/cars24/cities: Cities. 1 credit. Params: q. - GET /v1/cars24/filters: Filters. 1 credit. Params: make, model, year_min, year_max, price_min, price_max, km_min, km_max, fuel, transmission, body_type, color, owners, seats, business_vertical, hub, city_id, view. - GET /v1/cars24/hubs: Hubs. 1 credit. Params: city_id, code. - GET /v1/cars24/listing: Listing. 1 credit. Params: id*. - GET /v1/cars24/locations: Locations. 1 credit. Params: pincode, city_id. - GET /v1/cars24/makes: Makes. 1 credit. Params: view, city_id. - GET /v1/cars24/search: Search. 1 credit. Params: make, model, year_min, year_max, price_min, price_max, km_min, km_max, fuel, transmission, body_type, color, owners, seats, business_vertical, hub, city_id, sort, page, size, cursor, lat, lon, nearby. - GET /v1/cars24/suggestions: Suggestions. 1 credit. Params: q*. ## Carsales API https://perceptlayer.com/apis/carsales - GET /v1/carsales/dealer-stock: Dealer Stock. 1 credit. Params: condition, make, model, state, body_style, transmission, keyword, year_min, year_max, price_min, price_max, odometer_min, odometer_max, limit. - GET /v1/carsales/facets: Facets. 1 credit. Params: condition, make, model, state, body_style, transmission, keyword, year_min, year_max, price_min, price_max, odometer_min, odometer_max, level, q. - GET /v1/carsales/listing: Listing. 1 credit. Params: id*. - GET /v1/carsales/search: Search. 1 credit. Params: condition, make, model, state, body_style, transmission, keyword, year_min, year_max, price_min, price_max, odometer_min, odometer_max, seller_type, sort, limit. - GET /v1/carsales/taxonomy: Taxonomy. 1 credit. Params: condition, make. - GET /v1/carsales/valuation: Valuation. 1 credit. Params: make*, model*, year*. ## Carvana API https://perceptlayer.com/apis/carvana - GET /v1/carvana/delivery: Delivery. 1 credit. Params: zip5*. - POST /v1/carvana/facets: Facets. 1 credit. Params: filters*. - POST /v1/carvana/listing: Listing. 1 credit. Params: filters*, pagination, sortBy. - GET /v1/carvana/media: Media. 1 credit. Params: vehicleId*. - POST /v1/carvana/search: Search. 1 credit. Params: pagination, filters*, sortBy, zip5, requestedFeatures, browserCookieId, searchSessionId. - GET /v1/carvana/suggest: Suggest. 1 credit. Params: query*. - POST /v1/carvana/taxonomy: Taxonomy. 1 credit. Params: filters*. ## Carwow API https://perceptlayer.com/apis/carwow - GET /v1/carwow/listing: Listing. 1 credit. Params: id*. - GET /v1/carwow/model: Model. 1 credit. Params: brand*, model*. - GET /v1/carwow/search: Search. 1 credit. Params: brand, model, fuel, transmission, page. ## Casa Sapo API https://perceptlayer.com/apis/casa-sapo - GET /v1/casa-sapo/agencies: Agencies. 1 credit. Params: page. - GET /v1/casa-sapo/agency: Agency. 1 credit. Params: id*. - GET /v1/casa-sapo/agency-listings: Agency Listings. 1 credit. Params: id*, page. - GET /v1/casa-sapo/listing: Listing. 1 credit. Params: id*. - GET /v1/casa-sapo/locations: Locations. 1 credit. Params: query*. - GET /v1/casa-sapo/search: Search. 1 credit. Params: operation*, property_type, location, bedrooms, sort, price_min, price_max, area_min, area_max, seller_type, page. ## Casa.it API https://perceptlayer.com/apis/casa-it - GET /v1/casa-it/listing: Listing. 1 credit. Params: id*. - GET /v1/casa-it/locations: Locations. 1 credit. Params: query*. - GET /v1/casa-it/search: Search. 1 credit. Params: transaction*, location*, page, price_min, price_max, rooms. ## Cdiscount API https://perceptlayer.com/apis/cdiscount - GET /v1/cdiscount/offers: Offers. 1 credit. Params: mode*, offer_id, unit_price, product_id, seller_id. - GET /v1/cdiscount/product: Product. 1 credit. Params: url, id. - GET /v1/cdiscount/reviews: Reviews. 1 credit. Params: url, id, page. - GET /v1/cdiscount/search: Search. 1 credit. Params: query*, category, min_price, max_price, sort, page. - GET /v1/cdiscount/suggest: Suggest. 1 credit. Params: query*, limit. ## Centaline Property API https://perceptlayer.com/apis/centaline - GET /v1/centaline/agent: Agent. 1 credit. Params: agent_no*, lang. - GET /v1/centaline/agent-listings: Agent Listings. 1 credit. Params: agent_no*, listing_type*, lang, page, size, sort, order. - GET /v1/centaline/agents: Agents. 1 credit. Params: keyword, page, lang. - GET /v1/centaline/autocomplete: Autocomplete. 1 credit. Params: keyword*, listing_type, size, lang. - GET /v1/centaline/branches: Branches. 1 credit. Params: keyword, page, size, lang. - GET /v1/centaline/filter-options: Filter Options. 1 credit. Params: listing_type, lang. - GET /v1/centaline/listing: Listing. 1 credit. Params: ref_no*, details, lang. - GET /v1/centaline/search: Search. 1 credit. Params: listing_type*, lang, page, size, sort, order, price_min, price_max, area_min, area_max, building_age_min, building_age_max, bedrooms, property_type, location, agent_no, mtr_walk_minutes, views, features, facilities, developers, topics, floors. ## Centris API https://perceptlayer.com/apis/centris - GET /v1/centris/broker: Broker. 1 credit. Params: code*. - GET /v1/centris/broker-autocomplete: Broker Autocomplete. 1 credit. Params: query*. - GET /v1/centris/brokers: Brokers. 1 credit. Params: name, agency, page. - GET /v1/centris/listing: Listing. 1 credit. Params: mls*. - GET /v1/centris/listing-photos: Listing Photos. 1 credit. Params: mls*. - GET /v1/centris/locations: Locations. 1 credit. Params: query*. - GET /v1/centris/search: Search. 1 credit. Params: transaction_type, property_type, building_type, min_price, max_price, bedrooms, bathrooms, parking, garage, pool, location_id, location_type, broker_id, sort, page. ## Chewy API https://perceptlayer.com/apis/chewy - GET /v1/chewy/search: Search. 1 credit. Params: group_id*, page*, sort*, count*. - GET /v1/chewy/sitemap: Sitemap. 1 credit. ## CHINTAI API https://perceptlayer.com/apis/chintai - GET /v1/chintai/agency: Agency. 1 credit. Params: id*. - GET /v1/chintai/agency-listings: Agency Listings. 1 credit. Params: id*, sort, page. - GET /v1/chintai/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/chintai/listing: Listing. 1 credit. Params: id*. - GET /v1/chintai/locations: Locations. 1 credit. Params: level, prefecture. - GET /v1/chintai/search: Search. 1 credit. Params: prefecture*, city, line, type, min_rent, max_rent, min_area, max_area, layouts, walk_minutes, max_age_years, sort, page. ## Chrome Web Store API https://perceptlayer.com/apis/chrome-web-store - GET /v1/chrome-web-store/app: App. 1 credit. Params: id*, hl. - GET /v1/chrome-web-store/reviews: Reviews. 1 credit. Params: id*, sort, token. - GET /v1/chrome-web-store/search: Search. 1 credit. Params: q, category, hl, page, token. ## Chrono24 API https://perceptlayer.com/apis/chrono24 - GET /v1/chrono24/dealer-reviews: Dealer Reviews. 1 credit. Params: dealer_id*, page, size, country. - GET /v1/chrono24/listing: Listing. 1 credit. Params: id, url, country. - GET /v1/chrono24/suggest: Suggest. 1 credit. Params: query*, country. ## Ciencuadras API https://perceptlayer.com/apis/ciencuadras - GET /v1/ciencuadras/agency: Agency. 1 credit. Params: agency_id*, order, page, per_page. - GET /v1/ciencuadras/autocomplete: Autocomplete. 1 credit. Params: q*, transaction, size. - GET /v1/ciencuadras/property: Property. 1 credit. Params: url*. - GET /v1/ciencuadras/search: Search. 1 credit. Params: transaction*, department, city, locality, neighborhood, property_type[], bedrooms[], bathrooms[], garages[], stratum[], min_price, max_price, min_area, max_area, project, include_map, sort, order, page, per_page. ## Coches.net API https://perceptlayer.com/apis/coches-net - GET /v1/coches-net/dealer: Dealer. 1 credit. Params: slug*. - GET /v1/coches-net/dealer-listings: Dealer Listings. 1 credit. Params: slug*, page. - GET /v1/coches-net/listing: Listing. 1 credit. Params: path*. - GET /v1/coches-net/makes: Makes. 1 credit. Params: make_id. - GET /v1/coches-net/search: Search. 1 credit. Params: q, make_id, model_id, province_id, price_min, price_max, mileage_min, mileage_max, year_min, year_max, fuel, body_type, transmission, seller_type, offer_type, certified, has_photo, sort, order, page. ## CoinGecko API https://perceptlayer.com/apis/coingecko - GET /v1/coingecko/coin: Coin. 1 credit. Params: id*, currency. - GET /v1/coingecko/exchanges: Exchanges. 1 credit. Params: page, per_page. - GET /v1/coingecko/history: History. 1 credit. Params: id*, days, currency. - GET /v1/coingecko/listings: Listings. 1 credit. Params: page, per_page, currency, order, category. - GET /v1/coingecko/markets: Markets. 1 credit. Params: id*, page, currency. - GET /v1/coingecko/search: Search. 1 credit. Params: page, per_page, q*. - GET /v1/coingecko/trending: Trending. 1 credit. Params: currency. ## CoinMarketCap API https://perceptlayer.com/apis/coinmarketcap - GET /v1/coinmarketcap/coin: Coin. 1 credit. Params: id, slug, currency. - GET /v1/coinmarketcap/exchanges: Exchanges. 1 credit. Params: page, per_page, sort, order. - GET /v1/coinmarketcap/history: History. 1 credit. Params: id*, range, interval, currency. - GET /v1/coinmarketcap/listings: Listings. 1 credit. Params: page, per_page, sort, order, currency. - GET /v1/coinmarketcap/markets: Markets. 1 credit. Params: page, per_page, id*, sort, category, currency. - GET /v1/coinmarketcap/search: Search. 1 credit. Params: page, per_page, q*. - GET /v1/coinmarketcap/trending: Trending. 1 credit. Params: page, per_page, interval, currency. ## Condos.ca API https://perceptlayer.com/apis/condos-ca - GET /v1/condos-ca/agent: Agent. 1 credit. Params: url*. - GET /v1/condos-ca/agents: Agents. 1 credit. Params: query*, limit, page. - GET /v1/condos-ca/autocomplete: Autocomplete. 1 credit. Params: q*, limit. - GET /v1/condos-ca/buildings: Buildings. 1 credit. Params: query, id, limit, page. - GET /v1/condos-ca/listing: Listing. 1 credit. Params: mls_number*. - GET /v1/condos-ca/search: Search. 1 credit. Params: area_id*, area_type*, mode, min_price, max_price, beds, min_baths, min_sqft, max_sqft, home_type, property_type, parking, locker, balcony, furnished, exposure, amenities, max_maintenance_fee, max_building_age, max_days_on_market, min_photos, sort, page, per_page. ## ConsumerAffairs API https://perceptlayer.com/apis/consumeraffairs - GET /v1/consumeraffairs/search: Search. 1 credit. Params: query*, page. ## Copart API https://perceptlayer.com/apis/copart - GET /v1/copart/lots-detail: Lots Detail. 1 credit. Params: lot_number*. - GET /v1/copart/lots-filters: Lots Filters. 1 credit. Params: make, model, year_from, year_to, damage, title_group, yard, odometer_max, buy_it_now. - GET /v1/copart/lots-images: Lots Images. 1 credit. Params: lot_number*. - GET /v1/copart/lots-search: Lots Search. 1 credit. Params: make, model, year_from, year_to, damage, title_group, yard, odometer_max, buy_it_now, q, page, per_page. ## Costco API https://perceptlayer.com/apis/costco - GET /v1/costco/autocomplete: Autocomplete. 1 credit. Params: country, locale, query*. - GET /v1/costco/product: Product. 1 credit. Params: country, locale, id*, warehouse. - GET /v1/costco/product-price: Product Price. 1 credit. Params: country, locale, item*, warehouses[]. - GET /v1/costco/reviews: Reviews. 1 credit. Params: country, product_id*, page, per_page, sort, rating, max_rating, locale. - GET /v1/costco/reviews-summary: Reviews Summary. 1 credit. Params: country, product_id*. - GET /v1/costco/search: Search. 1 credit. Params: country, locale, query*, page, per_page, sort, brand[], min_rating, min_price, max_price, category, in_stock, warehouse. - GET /v1/costco/warehouse: Warehouse. 1 credit. Params: id*, locale, include_gas. - GET /v1/costco/warehouses: Warehouses. 1 credit. Params: locale, latitude, longitude, postal_code, page, per_page. ## Craigslist API https://perceptlayer.com/apis/craigslist - GET /v1/craigslist/categories: Categories. 1 credit. Params: query. - GET /v1/craigslist/posting: Posting. 1 credit. Params: id*. - GET /v1/craigslist/search: Search. 1 credit. Params: site, subarea, category, query, min_price, max_price, sort, page. - GET /v1/craigslist/sites: Sites. 1 credit. Params: country, query. ## Crexi API https://perceptlayer.com/apis/crexi - GET /v1/crexi/auction: Auction. 1 credit. Params: id*. - GET /v1/crexi/lease-listing: Lease Listing. 1 credit. Params: id*. - GET /v1/crexi/lease-search: Lease Search. 1 credit. Params: location, property_type, min_rate, max_rate, sort, order, page, per_page. - GET /v1/crexi/lease-spaces: Lease Spaces. 1 credit. Params: id*. - GET /v1/crexi/listing: Listing. 1 credit. Params: id*. - GET /v1/crexi/search: Search. 1 credit. Params: state, property_type, trading_status, min_price, max_price, min_cap_rate, min_latitude, max_latitude, min_longitude, max_longitude, include_unpriced, sort, order, page, per_page. ## Dabang API https://perceptlayer.com/apis/dabang - GET /v1/dabang/agent: Agent. 1 credit. Params: id*. - GET /v1/dabang/agents: Agents. 1 credit. Params: lat*, lng*, radius_km, page. - GET /v1/dabang/autocomplete: Autocomplete. 1 credit. Params: q*, types[]. - GET /v1/dabang/listing: Listing. 1 credit. Params: id*. - GET /v1/dabang/search: Search. 1 credit. Params: property_type*, sales_type, lat, lng, radius_km, region_code, subway_id, university_id, deposit_min, deposit_max, rent_min, rent_max, price_min, price_max, size_min, size_max, floor[], room_type[], deal_type, building_age_min, building_age_max, household_min, household_max, parking_num_min, elevator, parking, short_lease, duplex, pano, has_take_tenant, page. ## Daft.ie API https://perceptlayer.com/apis/daft-ie - GET /v1/daft-ie/agents: Agents. 1 credit. Params: section*, ad_state, sort. - GET /v1/daft-ie/discovery: Discovery. 1 credit. - GET /v1/daft-ie/filters: Filters. 1 credit. Params: section*. - GET /v1/daft-ie/geocode: Geocode. 1 credit. Params: query*. - GET /v1/daft-ie/listing: Listing. 1 credit. Params: id*. - GET /v1/daft-ie/locations: Locations. 1 credit. Params: mode, query, id. - GET /v1/daft-ie/search: Search. 1 credit. Params: section*, ad_state, sort, page, per_page, price_min, price_max, min_beds, max_beds, min_bathrooms, property_type, facility, first_publish_date, keyword, lat, lon, radius, north, south, east, west. ## Dailymotion API https://perceptlayer.com/apis/dailymotion - GET /v1/dailymotion/channel: Channel. 1 credit. Params: id*, fields, include, page, limit, sort. - GET /v1/dailymotion/search: Search. 1 credit. Params: search*, fields, page, limit, sort, filters, channel, tags, languages, country, created_after, created_before, list, user. - GET /v1/dailymotion/trending: Trending. 1 credit. Params: sort, fields, page, limit, list. - GET /v1/dailymotion/video: Video. 1 credit. Params: id*, fields. ## Das Örtliche API https://perceptlayer.com/apis/dasoertliche - GET /v1/dasoertliche/business: Business. 1 credit. Params: id*. - GET /v1/dasoertliche/search: Search. 1 credit. Params: query*, location*, page. ## DBA API https://perceptlayer.com/apis/dba - GET /v1/dba/listing: Listing. 1 credit. Params: id*. - GET /v1/dba/search: Search. 1 credit. Params: query, category, price_from, price_to, sort, page, location, condition[], dealer_segment, trade_type, shipping_types, published. ## DDproperty API https://perceptlayer.com/apis/ddproperty - GET /v1/ddproperty/agent: Agent. 1 credit. Params: id, url. - GET /v1/ddproperty/autocomplete: Autocomplete. 1 credit. Params: query*, locale, limit. - GET /v1/ddproperty/listing: Listing. 1 credit. Params: id, url, listing_type. - GET /v1/ddproperty/search: Search. 1 credit. Params: listing_type, region_code, district_code, area_code, property_id, keyword, property_type, min_price, max_price, bedrooms, bathrooms, min_size, max_size, sort, page. ## Depop API https://perceptlayer.com/apis/depop - GET /v1/depop/brands: Brands. 1 credit. Params: letter, slug, query, limit, offset. - GET /v1/depop/categories: Categories. 1 credit. Params: view*. - GET /v1/depop/facets: Facets. 1 credit. Params: query*, country. - GET /v1/depop/markets: Markets. 1 credit. - GET /v1/depop/product: Product. 1 credit. Params: product_id*. - GET /v1/depop/product-extended: Product Extended. 1 credit. Params: slug*. - GET /v1/depop/product-similar: Product Similar. 1 credit. Params: product_id*, country, limit. - GET /v1/depop/search: Search. 1 credit. Params: query*, country, limit, cursor, sort, condition, brands, colours, variants, product_types, groups, gender, is_kids, price_min, price_max, discounted, discount_types, min_discount, max_discount. - GET /v1/depop/shipping-providers: Shipping Providers. 1 credit. Params: country. - GET /v1/depop/shop: Shop. 1 credit. Params: seller_id, username. - GET /v1/depop/shop-aggregates: Shop Aggregates. 1 credit. Params: seller_id*. - GET /v1/depop/shop-feedback: Shop Feedback. 1 credit. Params: seller_id*, role*, limit, offset. - GET /v1/depop/shop-likes: Shop Likes. 1 credit. Params: seller_id*, limit, cursor. - GET /v1/depop/shop-products: Shop Products. 1 credit. Params: seller_id*, limit, cursor, ranking. - GET /v1/depop/shop-sold: Shop Sold. 1 credit. Params: seller_id*, limit, cursor. - GET /v1/depop/sizes: Sizes. 1 credit. - GET /v1/depop/suggestions: Suggestions. 1 credit. Params: query*. - GET /v1/depop/users-search: Users Search. 1 credit. Params: query*. ## derStandard Immobilien API https://perceptlayer.com/apis/der-standard-immobilien - GET /v1/der-standard-immobilien/agency: Agency. 1 credit. Params: company_id*, tenure, property_type, sort, page. - GET /v1/der-standard-immobilien/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/der-standard-immobilien/listing: Listing. 1 credit. Params: id*. - GET /v1/der-standard-immobilien/search: Search. 1 credit. Params: tenure*, location, osm_ids, property_type, price_min, price_max, area_min, area_max, rooms_min, building_type, property_subtype, amenities, q, company_id, sort, page. - GET /v1/der-standard-immobilien/similar: Similar. 1 credit. Params: id*. ## DeviantArt API https://perceptlayer.com/apis/deviantart - GET /v1/deviantart/deviation: Deviation. 1 credit. Params: username*, deviation_id*. - GET /v1/deviantart/gallery: Gallery. 1 credit. Params: username*, offset. - GET /v1/deviantart/search: Search. 1 credit. Params: q*, sort, cursor. - GET /v1/deviantart/user: User. 1 credit. Params: username*. ## Dice API https://perceptlayer.com/apis/dice - GET /v1/dice/job: Job. 1 credit. Params: id*. - GET /v1/dice/search: Search. 1 credit. Params: query*, location, radius, employment_type[], workplace_type[], posted_date, easy_apply, willing_to_sponsor, page, limit. ## Discogs API https://perceptlayer.com/apis/discogs - GET /v1/discogs/marketplace: Marketplace. 1 credit. Params: release_id*, condition, sleeve_condition, currency, ships_from, limit, cursor. - GET /v1/discogs/release: Release. 1–2 credits. 1 credit, plus 1 when include_sales_stats returns sales statistics. Params: id*, currency, include_sales_stats. - GET /v1/discogs/search: Search. 1 credit. Params: q, type, format, genre, style, year, country, page, per_page. ## Doctolib API https://perceptlayer.com/apis/doctolib - GET /v1/doctolib/practitioner: Practitioner. 1 credit. Params: slug*, visit_motive_id, agenda_ids[], practice_id. - GET /v1/doctolib/search: Search. 1 credit. Params: specialty*, location*, insurance_type, page. ## Domain Availability API https://perceptlayer.com/apis/domain-availability - GET /v1/domain-availability/domains-availability: Domains Availability. 1 credit. Params: domain*. ## Domain.com.au API https://perceptlayer.com/apis/domain-com-au - GET /v1/domain-com-au/agency: Agency. 1 credit. Params: slug*. - GET /v1/domain-com-au/agent: Agent. 1 credit. Params: slug*. - GET /v1/domain-com-au/agents: Agents. 1 credit. Params: suburb, suburbs[], suburb_slugs[], page, page_size. - GET /v1/domain-com-au/auction-results: Auction Results. 1 credit. Params: city*. - GET /v1/domain-com-au/locations: Locations. 1 credit. Params: q*, channel, mode, suburb_slug, page_size. - GET /v1/domain-com-au/property: Property. 1 credit. Params: listing_id, slug. - GET /v1/domain-com-au/search: Search. 1 credit. Params: mode*, suburb, suburbs[], region, state, postcode, page, property_types[], listing_attributes[], min_bedrooms, max_bedrooms, min_bathrooms, max_bathrooms, min_carspaces, max_carspaces, min_price, max_price, min_land_area, max_land_area, sold_date_range. - GET /v1/domain-com-au/suburb-insights: Suburb Insights. 1 credit. Params: slug, top_left[latitude], top_left[longitude], bottom_right[latitude], bottom_right[longitude], bedrooms*, property_type*. ## DoorDash API https://perceptlayer.com/apis/doordash - GET /v1/doordash/store: Store. 1–11 credits. 1 credit, plus 1 for each of the first 10 items whose options load with include_options; at most 11. Params: store*, include_options. - GET /v1/doordash/stores: Stores. 1 credit. Params: query*, lat*, lng*, cursor, sort, min_rating, price_range[], open_now. ## Dot Property API https://perceptlayer.com/apis/dotproperty - GET /v1/dotproperty/agent: Agent. 1 credit. Params: id*, slug. - GET /v1/dotproperty/agents: Agents. 1 credit. Params: page, per_page. - GET /v1/dotproperty/autocomplete: Autocomplete. 1 credit. Params: query*, listing_category. - GET /v1/dotproperty/filter-options: Filter Options. 1 credit. - GET /v1/dotproperty/listing: Listing. 1 credit. Params: id*. - GET /v1/dotproperty/search: Search. 1 credit. Params: transaction_type, location, property_type[], min_price, max_price, min_price_per_sqm, max_price_per_sqm, bedrooms, min_bedrooms, max_bedrooms, bathrooms, min_bathrooms, max_bathrooms, project_id, agent_id, pets, views[], features[], listed_by, sort, order, page. ## Dribbble API https://perceptlayer.com/apis/dribbble - GET /v1/dribbble/popular: Popular. 1 credit. Params: category*, page, per_page. - GET /v1/dribbble/search: Search. 1 credit. Params: query*. - GET /v1/dribbble/shot: Shot. 1 credit. Params: id*, slug. - GET /v1/dribbble/user: User. 1 credit. Params: username*, page, per_page. ## Dubizzle API https://perceptlayer.com/apis/dubizzle - GET /v1/dubizzle/classified-search: Classified Search. 1 credit. Params: query, emirate, price_min, price_max, page, limit, category. - GET /v1/dubizzle/facets: Facets. 1 credit. Params: vertical*, purpose, segment, query, emirate, category, price_min, price_max. - GET /v1/dubizzle/listing: Listing. 1 credit. Params: id*, vertical*. - GET /v1/dubizzle/motors-search: Motors Search. 1 credit. Params: query, emirate, price_min, price_max, page, limit, category, year_min, year_max, kilometers_min, kilometers_max, seller_type, sort. - GET /v1/dubizzle/property-search: Property Search. 1 credit. Params: query, emirate, price_min, price_max, page, limit, purpose, segment, category, bedrooms_min, bedrooms_max, size_min, size_max, furnished, sort. ## DuckDuckGo API https://perceptlayer.com/apis/duckduckgo - GET /v1/duckduckgo/maps: Maps. 1 credit. Params: q*, lat, lon, bbox, country, l, limit. - GET /v1/duckduckgo/news: News. 1 credit. Params: q*, start, region, safe, freshness, date_from. - GET /v1/duckduckgo/search: Search. 1 credit. Params: q*, kl, df, safe, start. ## eBay API https://perceptlayer.com/apis/ebay - GET /v1/ebay/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/ebay/categories: Categories. 1 credit. Params: site, parent, depth. - GET /v1/ebay/item: Item. 1 credit. Params: item_id*. - GET /v1/ebay/product-reviews: Product Reviews. 1 credit. Params: epid*, page, sort, rating. - GET /v1/ebay/seller: Seller. 1 credit. Params: username*, site. - GET /v1/ebay/seller-feedback: Seller Feedback. 1 credit. Params: username*, site, role, period, rating, include_automated, sort, page, per_page. ## Economy Car Rentals API https://perceptlayer.com/apis/economy-car-rentals - GET /v1/economy-car-rentals/autocomplete: Autocomplete. 1 credit. Params: query*, limit, language_id. ## EdgeProp API https://perceptlayer.com/apis/edgeprop - GET /v1/edgeprop/search: Search. 1 credit. Params: listing_type*, category, min_price, max_price, bedrooms, bathrooms, min_area, max_area, page. ## Edmunds API https://perceptlayer.com/apis/edmunds - GET /v1/edmunds/catalog-makes: Catalog Makes. 1 credit. - GET /v1/edmunds/catalog-model-years: Catalog Model Years. 1 credit. Params: make*, model*. - GET /v1/edmunds/catalog-submodels: Catalog Submodels. 1 credit. Params: make*, model*, year, page, per_page. - GET /v1/edmunds/inventory-listing: Inventory Listing. 1 credit. Params: vin*. - GET /v1/edmunds/inventory-search: Inventory Search. 1 credit. Params: make*, model*, zip*, type, radius, page, per_page. - GET /v1/edmunds/reviews-customer: Reviews Customer. 1 credit. Params: submodel_id*, page, per_page, sort. - GET /v1/edmunds/reviews-editorial: Reviews Editorial. 1 credit. Params: make*, model*, year*, submodel*. - GET /v1/edmunds/tmv-new: Tmv New. 1 credit. Params: style_id*, zip*. - GET /v1/edmunds/tmv-used: Tmv Used. 1 credit. Params: style_id*, zip*, mileage*, condition. ## Emlakjet API https://perceptlayer.com/apis/emlakjet - GET /v1/emlakjet/agencies: Agencies. 1 credit. Params: location*, page. - GET /v1/emlakjet/agency: Agency. 1 credit. Params: id*. - GET /v1/emlakjet/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/emlakjet/listing: Listing. 1 credit. Params: id*. - GET /v1/emlakjet/locations: Locations. 1 credit. Params: level, id. - GET /v1/emlakjet/search: Search. 1 credit. Params: trade*, type, location, min_price, max_price, min_area, max_area, rooms, bathrooms, sort, page. ## Encuentra24 API https://perceptlayer.com/apis/encuentra24 - GET /v1/encuentra24/agent: Agent. 1 credit. Params: id*, country, page. - GET /v1/encuentra24/autocomplete: Autocomplete. 1 credit. Params: query*, country, limit. - GET /v1/encuentra24/listing: Listing. 1 credit. Params: link, id, country. - GET /v1/encuentra24/property-types: Property Types. 1 credit. Params: listing_type. - GET /v1/encuentra24/search: Search. 1 credit. Params: country, listing_type, property_type, region, keyword, min_price, max_price, min_bedrooms, max_bedrooms, min_bathrooms, max_bathrooms, min_area, max_area, posted_within_days, sort, page. ## Etsy API https://perceptlayer.com/apis/etsy - GET /v1/etsy/product: Product. 10 credits. Params: url, listing_id. ## Etuovi API https://perceptlayer.com/apis/etuovi - GET /v1/etuovi/agencies: Agencies. 1 credit. Params: location, name. - GET /v1/etuovi/agency: Agency. 1 credit. Params: id*, include_listings, listing_type, property_type, page, per_page. - GET /v1/etuovi/agent: Agent. 1 credit. Params: realtor_id*, include_listings. - GET /v1/etuovi/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/etuovi/listing: Listing. 1 credit. Params: id*, listing_type. - GET /v1/etuovi/search: Search. 1 credit. Params: listing_type, location, location_type, location_code, property_type, residential_type[], room_counts[], min_price, max_price, min_area, max_area, min_year, max_year, agency_id, sort, page, per_page. ## Eventbrite API https://perceptlayer.com/apis/eventbrite - GET /v1/eventbrite/categories: Categories. 1 credit. - GET /v1/eventbrite/city-browse: City Browse. 1 credit. Params: place_id*, exclude_buckets. - GET /v1/eventbrite/collections: Collections. 1 credit. - GET /v1/eventbrite/collections-events: Collections Events. 1 credit. Params: collectionId*. - GET /v1/eventbrite/event: Event. 1 credit. Params: eventId*. - GET /v1/eventbrite/event-organizer-events: Event Organizer Events. 1 credit. Params: eventId*. - GET /v1/eventbrite/event-related: Event Related. 1 credit. Params: eventId*. - GET /v1/eventbrite/event-tickets: Event Tickets. 1 credit. Params: eventId*. - GET /v1/eventbrite/event-urgency: Event Urgency. 1 credit. Params: eventId*. - GET /v1/eventbrite/formats: Formats. 1 credit. - GET /v1/eventbrite/organizer: Organizer. 1 credit. Params: organizerId*. - GET /v1/eventbrite/organizer-events: Organizer Events. 1 credit. Params: organizerId*. - GET /v1/eventbrite/organizer-quality: Organizer Quality. 1 credit. Params: organizerId*. - GET /v1/eventbrite/organizer-stats: Organizer Stats. 1 credit. Params: organizerId*. - GET /v1/eventbrite/place: Place. 1 credit. Params: latitude, longitude, google_place_id. - GET /v1/eventbrite/places: Places. 1 credit. Params: q*. - GET /v1/eventbrite/search: Search. 1 credit. - GET /v1/eventbrite/series: Series. 1 credit. Params: seriesId*. - GET /v1/eventbrite/series-events: Series Events. 1 credit. Params: seriesId*. - GET /v1/eventbrite/subcategories: Subcategories. 1 credit. - GET /v1/eventbrite/trending: Trending. 1 credit. Params: location*. - GET /v1/eventbrite/venues: Venues. 1 credit. Params: q*. ## Expedia API https://perceptlayer.com/apis/expedia - GET /v1/expedia/destinations: Destinations. 1 credit. Params: query*, limit. - GET /v1/expedia/hotels-detail: Hotels Detail. 1 credit. Params: check_in, check_out, adults, property_id*. - GET /v1/expedia/hotels-rooms: Hotels Rooms. 1 credit. Params: check_in*, check_out*, adults, children, property_id*. - GET /v1/expedia/hotels-search: Hotels Search. 1 credit. Params: check_in*, check_out*, adults, children, region_id*, region_name, sort, limit, offset. ## Facebook API https://perceptlayer.com/apis/facebook - GET /v1/facebook/event: Event. 1 credit. Params: event_id*. - GET /v1/facebook/event-post: Event Post. 1 credit. Params: permalink*. - GET /v1/facebook/events: Events. 1 credit. Params: query*, location. - GET /v1/facebook/group: Group. 1 credit. Params: group_id*. - GET /v1/facebook/group-posts: Group Posts. 1 credit. Params: group_id*. - GET /v1/facebook/marketplace-browse: Marketplace Browse. 1 credit. Params: location. - GET /v1/facebook/marketplace-item: Marketplace Item. 1 credit. Params: listing_id*. - GET /v1/facebook/marketplace-search: Marketplace Search. 1 credit. Params: query, location. - GET /v1/facebook/page: Page. 1 credit. Params: handle*. - GET /v1/facebook/page-about: Page About. 1 credit. Params: handle*. - GET /v1/facebook/page-events: Page Events. 1 credit. Params: handle*. - GET /v1/facebook/photo: Photo. 1 credit. Params: photo*. - GET /v1/facebook/photos: Photos. 1 credit. Params: handle*. - GET /v1/facebook/post: Post. 1 credit. Params: permalink*. - GET /v1/facebook/profile: Profile. 1 credit. Params: handle*. - GET /v1/facebook/profile-about: Profile About. 1 credit. Params: handle*. - GET /v1/facebook/profile-feed: Profile Feed. 1 credit. Params: handle*. - GET /v1/facebook/reel: Reel. 1 credit. Params: permalink*. - GET /v1/facebook/reels: Reels. 1 credit. Params: handle*. - GET /v1/facebook/search-profiles: Search Profiles. 1 credit. Params: query*, limit. - GET /v1/facebook/videos: Videos. 1 credit. Params: handle*. ## Facebook Ad Library API https://perceptlayer.com/apis/facebook-ad-library - GET /v1/facebook-ad-library/ad-details: Ad Details. 1 credit. Params: ad_archive_id*, page_id*, country. - GET /v1/facebook-ad-library/advertisers: Advertisers. 1 credit. Params: query*, country, ad_type. - GET /v1/facebook-ad-library/eu-report: Eu Report. 1 credit. Params: section*, country, time_preset. - GET /v1/facebook-ad-library/filters: Filters. 1 credit. Params: query, country, ad_type. - GET /v1/facebook-ad-library/search: Search. 1 credit. Params: query, page_id, country, ad_type, media_type, active_status, publisher_platforms[], start_date, cursor. ## Farfetch API https://perceptlayer.com/apis/farfetch - GET /v1/farfetch/product: Product. 1 credit. Params: country, currency, id, url. - GET /v1/farfetch/search: Search. 1 credit. Params: country, currency, query, designer[], category[], gender, size[], color[], price_min, price_max, sale_only, sort, page, page_size. ## Fincaraiz API https://perceptlayer.com/apis/fincaraiz - GET /v1/fincaraiz/agencies: Agencies. 1 credit. - GET /v1/fincaraiz/agency: Agency. 1 credit. Params: id*. - GET /v1/fincaraiz/agency-properties: Agency Properties. 1 credit. Params: operation_type_id, property_type_id, minPrice, maxPrice, m2Min, m2Max, bedrooms, bathrooms, rooms, stratum, privateOwner, order, owner_id, rows, page, locations. - GET /v1/fincaraiz/available-filters: Available Filters. 1 credit. - GET /v1/fincaraiz/fast-search: Fast Search. 1 credit. Params: operation_type_id, property_type_id, minPrice, maxPrice, m2Min, m2Max, bedrooms, bathrooms, rooms, stratum, privateOwner, order, owner_id, rows, page, locations. - GET /v1/fincaraiz/location: Location. 1 credit. Params: id*, type. - GET /v1/fincaraiz/location-autocomplete: Location Autocomplete. 1 credit. Params: term*. - GET /v1/fincaraiz/location-geometry: Location Geometry. 1 credit. Params: ids*. - GET /v1/fincaraiz/location-vocabulary: Location Vocabulary. 1 credit. Params: estate_id. - GET /v1/fincaraiz/map-pins: Map Pins. 1 credit. Params: operation_type_id, property_type_id, minPrice, maxPrice, m2Min, m2Max, bedrooms, bathrooms, rooms, stratum, privateOwner, order, owner_id, rows, page, locations. - GET /v1/fincaraiz/market-data: Market Data. 1 credit. Params: operation_type_id, property_type_id, minPrice, maxPrice, m2Min, m2Max, bedrooms, bathrooms, rooms, stratum, privateOwner, order, owner_id, rows, page, locations. - GET /v1/fincaraiz/project: Project. 1 credit. Params: id, ref, type, page, per_page. - GET /v1/fincaraiz/projects: Projects. 1 credit. Params: id, ref, type, page, per_page. - GET /v1/fincaraiz/property: Property. 1 credit. Params: id*. - GET /v1/fincaraiz/route-resolver: Route Resolver. 1 credit. Params: url*. - GET /v1/fincaraiz/search: Search. 1 credit. Params: operation_type_id, property_type_id, minPrice, maxPrice, m2Min, m2Max, bedrooms, bathrooms, rooms, stratum, privateOwner, order, owner_id, rows, page, locations. - GET /v1/fincaraiz/seasons: Seasons. 1 credit. Params: property_id*. - GET /v1/fincaraiz/seo-meta: Seo Meta. 1 credit. Params: path*. - GET /v1/fincaraiz/similar-properties: Similar Properties. 1 credit. Params: id*, rows, page, is_project. - GET /v1/fincaraiz/taxonomy: Taxonomy. 1 credit. ## FINN API https://perceptlayer.com/apis/finn - GET /v1/finn/torget-listing: Torget Listing. 1 credit. Params: ad_id*. - GET /v1/finn/torget-search: Torget Search. 1 credit. Params: q, page, rows, sort, category, price_from, price_to, condition, trade_type, dealer_segment, location, published. ## FINN Bil API https://perceptlayer.com/apis/finn-bil - GET /v1/finn-bil/dealer: Dealer. 1 credit. Params: dealer_id*, slug. - GET /v1/finn-bil/dealer-inventory: Dealer Inventory. 1 credit. Params: dealer_id*, page, rows. - GET /v1/finn-bil/listing: Listing. 1 credit. Params: ad_id*. - GET /v1/finn-bil/makes: Makes. 1 credit. - GET /v1/finn-bil/makes-models: Makes Models. 1 credit. Params: make*. - GET /v1/finn-bil/search: Search. 1 credit. Params: sort, rows, page, q, variant, location, price_from, price_to, year_from, year_to, mileage_from, mileage_to, fuel, body_type, transmission, dealer_segment, sales_form, wheel_drive, engine_effect_from, engine_effect_to, car_equipment, exterior_colour, seats_from, seats_to, registration_class, warranty_insurance, car_condition, wheel_sets, max_trailer_weight_from, max_trailer_weight_to, published, smooth_trade. ## Fiverr API https://perceptlayer.com/apis/fiverr - GET /v1/fiverr/gig: Gig. 1 credit. Params: id*. - GET /v1/fiverr/reviews: Reviews. 1 credit. Params: gig*, page. - GET /v1/fiverr/search: Search. 1 credit. Params: query, category, price, delivery, seller_level, page. ## Flatmates API https://perceptlayer.com/apis/flatmates - GET /v1/flatmates/listing: Listing. 1 credit. Params: url, id, slug. - GET /v1/flatmates/location-autocomplete: Location Autocomplete. 1 credit. Params: query*, type, limit. - GET /v1/flatmates/search: Search. 1 credit. Params: location*, page, sort, property_type, bathroom_type, min_budget, max_budget, stay_length, room_type, gender, furnishings, parking, bills_included, preferences. ## Flickr API https://perceptlayer.com/apis/flickr - GET /v1/flickr/group: Group. 1 credit. Params: group_id*, page, per_page, tags. - GET /v1/flickr/photo: Photo. 1 credit. Params: photo_id*. - GET /v1/flickr/search: Search. 1 credit. Params: text*, page, per_page, sort, tags, user_id, group_id, license, safe_search, content_type. - GET /v1/flickr/user: User. 1 credit. Params: user_id*, page, per_page. ## FlightAware API https://perceptlayer.com/apis/flightaware - GET /v1/flightaware/airport: Airport. 1 credit. Params: code*, mode. - GET /v1/flightaware/flight: Flight. 2–10 credits. 2 credits for a flight from the last 14 days, 10 for an older one. A flight that isn't found costs nothing. Params: ident*, date*, fetch_by, origin, destination, time, track. - GET /v1/flightaware/flight-history: Flight History. 1 credit. Params: ident*, fetch_by. ## Flightradar24 API https://perceptlayer.com/apis/flightradar24 - GET /v1/flightradar24/airport: Airport. 1 credit. Params: code*, mode, limit, page, timestamp. - GET /v1/flightradar24/disruptions: Disruptions. 1 credit. - GET /v1/flightradar24/flight: Flight. 1 credit. Params: flight_id*, trail. - GET /v1/flightradar24/flight-history: Flight History. 1 credit. Params: query*, fetch_by, limit, page, date. - GET /v1/flightradar24/flights: Flights. 1 credit. Params: bounds, bounds_order, zone, airline, type, reg, callsign, flight, airport, limit, include_ground. - GET /v1/flightradar24/search: Search. 1 credit. Params: query*, limit. ## FlightStats API https://perceptlayer.com/apis/flightstats - GET /v1/flightstats/airport: Airport. 2–12 credits. 2 credits for a board with flights, plus 1 for each row completed with detail=true, at most 10. Params: iata*, mode, date, hour, hours, carrier, limit, detail. - GET /v1/flightstats/flight: Flight. 1 credit. Params: carrier*, flight_number*, date*, include. - GET /v1/flightstats/search: Search. 1 credit. Params: query*, type*. ## Flipkart API https://perceptlayer.com/apis/flipkart - GET /v1/flipkart/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/flipkart/delivery: Delivery. 1 credit. Params: pid, url, pincode*. - GET /v1/flipkart/offers: Offers. 1 credit. Params: pid, url. - GET /v1/flipkart/product: Product. 1 credit. Params: pid, url. - GET /v1/flipkart/reviews: Reviews. 1 credit. Params: pid, url, sort, page, per_page. - GET /v1/flipkart/search: Search. 1 credit. Params: query, category, brand, min_price, max_price, sort, page. ## FlixBus API https://perceptlayer.com/apis/flixbus - GET /v1/flixbus/calendar: Calendar. 1 credit. Params: from_city_id*, to_city_id*, adults, currency, start_date*, days. - GET /v1/flixbus/cities: Cities. 1 credit. Params: query*. - GET /v1/flixbus/city: City. 1 credit. Params: city_id*. - GET /v1/flixbus/city-catalog: City Catalog. 1 credit. Params: limit, offset. - GET /v1/flixbus/routes: Routes. 1 credit. Params: city_id*, limit. - GET /v1/flixbus/search: Search. 1 credit. Params: from_city_id*, to_city_id*, adults, currency, departure_date*, return_date, sort, max_price, max_transfers, departure_after, departure_before. - GET /v1/flixbus/station: Station. 1 credit. Params: station_id*. - GET /v1/flixbus/stations: Stations. 1 credit. Params: query*. - GET /v1/flixbus/trip: Trip. 1 credit. Params: trip_id*. ## Fotocasa API https://perceptlayer.com/apis/fotocasa - GET /v1/fotocasa/agency: Agency. 1 credit. Params: client_id, slug, property_type, transaction_type, location[], page, size. - GET /v1/fotocasa/listing: Listing. 1 credit. Params: path*. - GET /v1/fotocasa/locations: Locations. 1 credit. Params: query*, variant, property_type, transaction_type. - GET /v1/fotocasa/map-search: Map Search. 1 credit. Params: property_type, transaction_type, location[], page, size, sort, sort_order_desc, new_construction, latitude*, longitude*. - GET /v1/fotocasa/polygons: Polygons. 1 credit. Params: level*, code*. - GET /v1/fotocasa/price-index: Price Index. 1 credit. - GET /v1/fotocasa/search: Search. 1 credit. Params: property_type, transaction_type, location[], page, size, sort, sort_order_desc, new_construction, latitude, longitude. ## Fresha API https://perceptlayer.com/apis/fresha - GET /v1/fresha/reviews: Reviews. 1 credit. Params: id*, page. - GET /v1/fresha/search: Search. 1 credit. Params: treatment*, location*, page. - GET /v1/fresha/venue: Venue. 1 credit. Params: id*. ## Funda API https://perceptlayer.com/apis/funda - GET /v1/funda/broker: Broker. 1 credit. Params: broker_id*. - GET /v1/funda/broker-listings: Broker Listings. 1 credit. Params: broker_id*, type, page, limit. - GET /v1/funda/broker-reviews: Broker Reviews. 1 credit. Params: broker_id*. - GET /v1/funda/listing: Listing. 1 credit. Params: id, id_type, url. - GET /v1/funda/listing-similar: Listing Similar. 1 credit. Params: id*. - GET /v1/funda/listings-index: Listings Index. 1 credit. Params: offering*, page, limit. ## G2 API https://perceptlayer.com/apis/g2 - GET /v1/g2/categories: Categories. 1 credit. - GET /v1/g2/categories-grid: Categories Grid. 1 credit. Params: slug*, company_size. - GET /v1/g2/compare: Compare. 1 credit. Params: a*, b*. - GET /v1/g2/products: Products. 1 credit. Params: slug*, include[]. - GET /v1/g2/products-alternatives: Products Alternatives. 1 credit. Params: slug*. - GET /v1/g2/products-features: Products Features. 1 credit. Params: slug*. - GET /v1/g2/products-pricing: Products Pricing. 1 credit. Params: slug*. - GET /v1/g2/reviews: Reviews. 1 credit. Params: slug*, stars[], company_size[], coverage, page, sort, role[], industry[], region[], category_id[]. - GET /v1/g2/search: Search. 1 credit. Params: query*, page, order, star_rating[], category_id[]. - GET /v1/g2/sellers: Sellers. 1 credit. Params: slug*. - GET /v1/g2/suggest: Suggest. 1 credit. Params: query*, limit. ## GasBuddy API https://perceptlayer.com/apis/gasbuddy - GET /v1/gasbuddy/station: Station. 1 credit. Params: id*. - GET /v1/gasbuddy/stations: Stations. 1 credit. Params: search, lat, lng, fuel, brand_id, maxAge, cursor. ## Geizhals API https://perceptlayer.com/apis/geizhals - GET /v1/geizhals/price-history: Price History. 1 credit. Params: product_id*, days, loc. - GET /v1/geizhals/product: Product. 1 credit. Params: product_id*, loc, lang, offers, merchant_details, reviews, videos. - GET /v1/geizhals/search: Search. 1 credit. Params: query*, loc, lang, page, pagesize, sort, category, manufacturer. ## Gelbe Seiten API https://perceptlayer.com/apis/gelbeseiten - GET /v1/gelbeseiten/business: Business. 1 credit. Params: id*. - GET /v1/gelbeseiten/search: Search. 1 credit. Params: query*, location*, page, radius, sort. ## Genius API https://perceptlayer.com/apis/genius - GET /v1/genius/album: Album. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/album-autocomplete: Album Autocomplete. 1 credit. Params: q*. - GET /v1/genius/album-leaderboard: Album Leaderboard. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/album-page: Album Page. 1 credit. Params: path*. - GET /v1/genius/album-tracks: Album Tracks. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/annotation: Annotation. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/annotation-edits: Annotation Edits. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/annotation-versions: Annotation Versions. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/artist: Artist. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/artist-albums: Artist Albums. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/artist-autocomplete: Artist Autocomplete. 1 credit. Params: q*. - GET /v1/genius/artist-leaderboard: Artist Leaderboard. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/artist-songs: Artist Songs. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/chart: Chart. 1 credit. Params: type, chart_genre, time_period, page, per_page. - GET /v1/genius/chart-state: Chart State. 1 credit. Params: model*, id*. - GET /v1/genius/hot: Hot. 1 credit. Params: page, per_page. - GET /v1/genius/lookup: Lookup. 1 credit. Params: url*. - GET /v1/genius/referent: Referent. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/referents: Referents. 1 credit. Params: song_id*, page, per_page. - GET /v1/genius/referents-multi: Referents Multi. 1 credit. Params: ids*. - GET /v1/genius/search: Search. 1 credit. Params: q*, type, page, per_page. - GET /v1/genius/song: Song. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/song-contributors: Song Contributors. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/song-page: Song Page. 1 credit. Params: path*. - GET /v1/genius/song-recommendations: Song Recommendations. 1 credit. Params: id*, q, sort, page, per_page. - GET /v1/genius/videos: Videos. 1 credit. Params: artist_id, album_id, page. ## Getaround API https://perceptlayer.com/apis/getaround - GET /v1/getaround/car: Car. 1 credit. Params: path*, domain*, id. - GET /v1/getaround/search: Search. 1 credit. Params: domain*, latitude, longitude, address, poi_id, start_date*, end_date*, start_time, end_time, price_min, page*. ## GetYourGuide API https://perceptlayer.com/apis/getyourguide - GET /v1/getyourguide/activity: Activity. 1 credit. Params: activity_id*, currency*, language*. - GET /v1/getyourguide/reviews: Reviews. 1 credit. Params: activity_id*, offset*, limit*, language*. - GET /v1/getyourguide/search: Search. 1 credit. Params: q*, page*, sort*, location_id, currency*, language*. ## GitHub API https://perceptlayer.com/apis/github - GET /v1/github/repository: Repository. 1 credit. Params: owner*, repo*. - GET /v1/github/repository-activity: Repository Activity. 1 credit. Params: owner*, repo*. - GET /v1/github/repository-branches: Repository Branches. 1 credit. Params: owner*, repo*, page, per_page. - GET /v1/github/repository-commits: Repository Commits. 1 credit. Params: owner*, repo*, page, per_page, sha, path, author, since, until. - GET /v1/github/repository-compare-commits: Repository Compare Commits. 1 credit. Params: owner*, repo*, base*, head*. - GET /v1/github/repository-compare-files: Repository Compare Files. 1 credit. Params: owner*, repo*, base*, head*. - GET /v1/github/repository-compare-patch: Repository Compare Patch. 1 credit. Params: owner*, repo*, base*, head*. - GET /v1/github/repository-contributors: Repository Contributors. 1 credit. Params: owner*, repo*, page, per_page, anon. - GET /v1/github/repository-files: Repository Files. 1 credit. Params: owner*, repo*, path, ref. - GET /v1/github/repository-files-at-ref: Repository Files At Ref. 1 credit. Params: owner*, repo*, ref*. - GET /v1/github/repository-issues: Repository Issues. 1 credit. Params: owner*, repo*, page, per_page, state, sort, direction, labels, since. - GET /v1/github/repository-issues-comments: Repository Issues Comments. 1 credit. Params: number*, owner*, repo*, page, per_page. - GET /v1/github/repository-languages: Repository Languages. 1 credit. Params: owner*, repo*. - GET /v1/github/repository-pulls: Repository Pulls. 1 credit. Params: number*, owner*, repo*. - GET /v1/github/repository-raw-file: Repository Raw File. 1 credit. Params: owner*, repo*, path*, ref*. - GET /v1/github/repository-readme: Repository Readme. 1 credit. Params: owner*, repo*, ref. - GET /v1/github/repository-releases: Repository Releases. 1 credit. Params: owner*, repo*, page, per_page. - GET /v1/github/repository-tags: Repository Tags. 1 credit. Params: owner*, repo*, page, per_page. - GET /v1/github/repository-tree: Repository Tree. 1 credit. Params: owner*, repo*, ref, recursive. - GET /v1/github/search-repositories: Search Repositories. 1 credit. Params: q*, sort, order, page, per_page. - GET /v1/github/trending-developers: Trending Developers. 1 credit. Params: language, since, spoken_language_code. - GET /v1/github/trending-repositories: Trending Repositories. 1 credit. Params: language, since, spoken_language_code. - GET /v1/github/user: User. 1 credit. Params: username*. - GET /v1/github/user-activity: User Activity. 1 credit. Params: username*. - GET /v1/github/user-contributions: User Contributions. 1 credit. Params: username*, to. - GET /v1/github/user-counts: User Counts. 1 credit. Params: username*. - GET /v1/github/user-events: User Events. 1 credit. Params: username*, page, per_page. - GET /v1/github/user-followers: User Followers. 1 credit. Params: username*, page, per_page. - GET /v1/github/user-following: User Following. 1 credit. Params: username*, page, per_page. - GET /v1/github/user-repositories: User Repositories. 1 credit. Params: username*, page, per_page, sort, direction, type. - GET /v1/github/user-starred: User Starred. 1 credit. Params: username*, page, per_page. - GET /v1/github/user-tabs: User Tabs. 1 credit. Params: username*, tab, page. ## Glassdoor API https://perceptlayer.com/apis/glassdoor - GET /v1/glassdoor/companies-autocomplete: Companies Autocomplete. 1 credit. Params: query*. - GET /v1/glassdoor/companies-benefits: Companies Benefits. 1 credit. Params: employer_id*. - GET /v1/glassdoor/companies-interviews: Companies Interviews. 1 credit. Params: employer_id*, page, job_title, experience. - GET /v1/glassdoor/companies-jobs: Companies Jobs. 1 credit. Params: employer_id*, keyword, cursor, location_id, location_type, from_age, remote_only, easy_apply_only, min_salary, max_salary. - GET /v1/glassdoor/companies-overview: Companies Overview. 1 credit. Params: employer_id*. - GET /v1/glassdoor/companies-photos: Companies Photos. 1 credit. Params: employer_id*, page, limit. - GET /v1/glassdoor/companies-reviews: Companies Reviews. 1 credit. Params: employer_id*, page, limit. - GET /v1/glassdoor/companies-search: Companies Search. 1 credit. Params: query*, page, limit. - GET /v1/glassdoor/jobs-details: Jobs Details. 1 credit. Params: listing_id*. - GET /v1/glassdoor/jobs-search: Jobs Search. 1 credit. Params: keyword*, cursor. - GET /v1/glassdoor/locations-search: Locations Search. 1 credit. Params: query*. - GET /v1/glassdoor/salaries: Salaries. 1 credit. Params: job_title*, employer_id, page, limit. - GET /v1/glassdoor/salaries-estimate: Salaries Estimate. 1 credit. Params: job_title*, country_id, state_id, metro_id, city_id, years_of_experience. ## Gmarket API https://perceptlayer.com/apis/gmarket - GET /v1/gmarket/product: Product. 1 credit. Params: id, url. - GET /v1/gmarket/search: Search. 1 credit. Params: query*, min_price, max_price, sort, page, oversea, big_smile. ## GOAT API https://perceptlayer.com/apis/goat - GET /v1/goat/product: Product. 1 credit. Params: url, slug, id, market. - GET /v1/goat/search: Search. 1 credit. Params: query, brand, category, gender, size, condition, price_min, price_max, instant_ship, under_retail, sale, sort, page, market, include_facets. ## GoodFirms API https://perceptlayer.com/apis/goodfirms - GET /v1/goodfirms/company: Company. 1 credit. Params: slug*. - GET /v1/goodfirms/reviews: Reviews. 1 credit. Params: slug*, page. - GET /v1/goodfirms/search: Search. 1 credit. Params: country, page. ## Goodreads API https://perceptlayer.com/apis/goodreads - GET /v1/goodreads/author: Author. 1 credit. Params: id*. - GET /v1/goodreads/book: Book. 1 credit. Params: id*. - GET /v1/goodreads/reviews: Reviews. 1 credit. Params: id*, limit, after. - GET /v1/goodreads/search: Search. 1 credit. Params: query*, page. ## Google Ads Transparency API https://perceptlayer.com/apis/google-ads-transparency - GET /v1/google-ads-transparency/ad: Ad. 1 credit. Params: advertiser_id*, creative_id*. - GET /v1/google-ads-transparency/ads: Ads. 1 credit. Params: advertiser_id, domain, format, region, date_from, date_to, page_size, page_token. - GET /v1/google-ads-transparency/advertisers: Advertisers. 1 credit. Params: q*, query, limit, resolve_domain. ## Google Books API https://perceptlayer.com/apis/google-books - GET /v1/google-books/isbn: Isbn. 1 credit. Params: isbn*. - GET /v1/google-books/search: Search. 1 credit. Params: q, author, title, publisher, subject, isbn, free_only, page, limit, language, lang, lr, langRestrict, print_type, printType, ebooks, filter, sort, orderby, country. - GET /v1/google-books/volume: Volume. 1 credit. Params: id*. ## Google Events API https://perceptlayer.com/apis/google-events - GET /v1/google-events/details: Details. 1 credit. Params: event_token*. - GET /v1/google-events/search: Search. 1 credit. Params: q*, hl, gl, location, uule, htichips, start. ## Google Finance API https://perceptlayer.com/apis/google-finance - GET /v1/google-finance/historical: Historical. 1 credit. Params: symbol*, exchange, range, start_date, end_date, interval, hl, gl. - GET /v1/google-finance/indices: Indices. 1 credit. Params: indices, hl, gl. - GET /v1/google-finance/intraday: Intraday. 1 credit. Params: symbol*, exchange, hl, gl. - GET /v1/google-finance/markets: Markets. 1 credit. Params: hl, gl, trend, index_market. - GET /v1/google-finance/quote: Quote. 1 credit. Params: symbol*, exchange, period_type, hl, gl. - GET /v1/google-finance/search: Search. 1 credit. Params: q*, hl, gl. ## Google Flights API https://perceptlayer.com/apis/google-flights - GET /v1/google-flights/airlines: Airlines. 1 credit. - GET /v1/google-flights/airports: Airports. 1 credit. - GET /v1/google-flights/autocomplete: Autocomplete. 1 credit. Params: q*, hl, gl. - GET /v1/google-flights/booking-details: Booking Details. 1 credit. Params: booking_token*, origin*, destination*, departure_date*, airline*, flight_number*, adults, children, infants_in_seat, infants_on_lap, cabin_class, hl, gl, currency. - GET /v1/google-flights/calendar: Calendar. 1 credit. Params: origin*, destination*, outbound_date_start*, outbound_date_end*, return_date, trip_length, travel_class, adults, currency, gl, hl. - GET /v1/google-flights/date-range: Date Range. 1 credit. Params: origin*, destination*, adults, children, infants_in_seat, infants_on_lap, cabin_class, exclude_basic, max_stops, hl, gl, currency, outbound_times, bags, api_version, from_date*, to_date*, trip_duration. - GET /v1/google-flights/deals: Deals. 1 credit. Params: departure_id*, arrival_area, travel_class, currency, gl, hl. - GET /v1/google-flights/one-way: One Way. 1 credit. Params: origin*, destination*, adults, children, infants_in_seat, infants_on_lap, cabin_class, exclude_basic, max_stops, hl, gl, currency, outbound_times, bags, departure_date*, sort_by, airlines[], include_baggage, departure_time_min, departure_time_max, arrival_time_min, arrival_time_max, max_duration_minutes, max_price. - GET /v1/google-flights/round-trip: Round Trip. 1 credit. Params: origin*, destination*, adults, children, infants_in_seat, infants_on_lap, cabin_class, exclude_basic, max_stops, hl, gl, currency, bags, api_version, departure_date*, return_date*, sort_by, airlines[], include_baggage, departure_token, departure_time_min, departure_time_max, arrival_time_min, arrival_time_max, max_duration_minutes, max_price. ## Google Forums API https://perceptlayer.com/apis/google-forums - GET /v1/google-forums/search: Search. 1 credit. Params: query*, hl, gl, google_domain, start, page, num. ## Google Hotels API https://perceptlayer.com/apis/google-hotels - GET /v1/google-hotels/autocomplete: Autocomplete. 1 credit. Params: q*, hl, gl, currency, type. - GET /v1/google-hotels/photos: Photos. 1 credit. Params: property_token*, category, next_page_token, hl, gl. - GET /v1/google-hotels/price-calendar: Price Calendar. 1 credit. Params: property_token*, check_in_start*, check_in_end*, nights, adults, currency, hl, gl. - GET /v1/google-hotels/reviews: Reviews. 1 credit. Params: property_token*, hl, gl, category_token, next_page_token. - GET /v1/google-hotels/search: Search. 1 credit. Params: engine, q*, check_in_date*, check_out_date*, adults, children, currency, gl, hl, sort_by, min_price, max_price, hotel_class, free_cancellation, children_ages[], rating, amenities[], vacation_rentals, eco_certified, special_offers, property_types[], brands[], bedrooms, bathrooms, next_page_token, property_token. ## Google Images API https://perceptlayer.com/apis/google-images - GET /v1/google-images/images: Images. 1 credit. Params: q*, hl, gl, imgsz, imgtype, imgcolor, imgar, tbs, safe, page. ## Google Jobs API https://perceptlayer.com/apis/google-jobs - GET /v1/google-jobs/search: Search. 1 credit. Params: q, next_page_token, uule, lrad, uds, date_posted, job_type, hl, gl, google_domain. ## Google Lens API https://perceptlayer.com/apis/google-lens - GET /v1/google-lens/lens: Lens. 1 credit. Params: url*, q, type. - POST /v1/google-lens/upload: Upload. 1 credit. Params: image, image_base64, q, type. ## Google Local API https://perceptlayer.com/apis/google-local - GET /v1/google-local/search: Search. 1 credit. Params: query*, hl*, gl*, location, google_domain, start. ## Google Local Services API https://perceptlayer.com/apis/google-local-services - GET /v1/google-local-services/search: Search. 1 credit. Params: q*, hl, gl. ## Google Maps API https://perceptlayer.com/apis/google-maps - GET /v1/google-maps/advanced-search: Advanced Search. 1 credit. Params: query*, lon, lat, zoom*, limit, page, hl, gl, google_domain, fields. - GET /v1/google-maps/autocomplete: Autocomplete. 1 credit. Params: query, q, hl, gl, ll, google_domain. - GET /v1/google-maps/business-details: Business Details. 1 credit. Params: business_id*, hl, gl. - GET /v1/google-maps/contributor-reviews: Contributor Reviews. 1 credit. Params: contributor_id*, hl, gl. - GET /v1/google-maps/directions: Directions. 1 credit. Params: origin*, destination*, mode, hl, gl. - GET /v1/google-maps/photo-meta: Photo Meta. 1 credit. Params: data_id*, business_id, hl, gl. - GET /v1/google-maps/photos: Photos. 1 credit. Params: business_id*, page, limit. - GET /v1/google-maps/popular-times: Popular Times. 1 credit. Params: business_id, place_id, q. - GET /v1/google-maps/posts: Posts. 1 credit. Params: data_id*, next_page_token, hl, gl. - GET /v1/google-maps/review: Review. 1 credit. Params: review_id*, business_id*. - GET /v1/google-maps/reviews: Reviews. 1–50 credits. 1 credit per page of reviews fetched; pages sets how many, up to 50. Params: business_id*, page, pages, search, sort, limit, hl, gl. - GET /v1/google-maps/simple-search: Simple Search. 1 credit. Params: query*, hl, gl, google_domain, limit, page, fields. ## Google News API https://perceptlayer.com/apis/google-news - GET /v1/google-news/decode: Decode. 1 credit. Params: article_id, url, hl, gl. - GET /v1/google-news/headlines: Headlines. 1 credit. Params: hl, gl. - GET /v1/google-news/local: Local. 1 credit. Params: city*, hl, gl. - GET /v1/google-news/news: News. 1 credit. Params: q, gl, hl, topic_token, kgmid, publication_token, section_token, story_token, so, start, page. - GET /v1/google-news/publication: Publication. 1 credit. Params: domain, publication_token, hl, gl. - GET /v1/google-news/search: Search. 1 credit. Params: q*, when, after, before, hl, gl. - GET /v1/google-news/stories: Stories. 1 credit. Params: topic, topic_token, hl, gl. - GET /v1/google-news/story: Story. 1 credit. Params: story_token*, hl*, gl*. - GET /v1/google-news/topic: Topic. 1 credit. Params: topic, topic_token, hl, gl. ## Google Patents API https://perceptlayer.com/apis/google-patents - GET /v1/google-patents/details: Details. 1 credit. Params: patent_id*. - GET /v1/google-patents/search: Search. 1 credit. Params: q*, page, num, sort, before, after, country, language, status, type, inventor, assignee. ## Google Play API https://perceptlayer.com/apis/google-play - GET /v1/google-play/apps-product: Apps Product. 1 credit. Params: id, product_id, url, hl, gl, store, season_id, all_reviews, platform, rating, sort_by, num, next_page_token. - GET /v1/google-play/audiobooks-product: Audiobooks Product. 1 credit. Params: id, product_id, url, hl, gl, store, season_id, all_reviews, platform, rating, sort_by, num, next_page_token. - GET /v1/google-play/books: Books. 1 credit. Params: cluster, hl, gl. - GET /v1/google-play/books-product: Books Product. 1 credit. Params: id, product_id, url, hl, gl, store, season_id, all_reviews, platform, rating, sort_by, num, next_page_token. - GET /v1/google-play/charts: Charts. 1 credit. Params: chart, category, num, hl, gl. - GET /v1/google-play/details: Details. 1 credit. Params: id, product_id, url, hl, gl, store, season_id, all_reviews, platform, rating, sort_by, num, next_page_token. - GET /v1/google-play/developer: Developer. 1 credit. Params: developer_id*, page_token, hl, gl. - GET /v1/google-play/movies: Movies. 1 credit. Params: cluster, hl, gl. - GET /v1/google-play/movies-product: Movies Product. 1 credit. Params: id, product_id, url, hl, gl, store, season_id, all_reviews, platform, rating, sort_by, num, next_page_token. - GET /v1/google-play/product: Product. 1 credit. Params: id, product_id, url, hl, gl, store, season_id, all_reviews, platform, rating, sort_by, num, next_page_token. - GET /v1/google-play/product-reviews: Product Reviews. 1 credit. Params: id, product_id, url, hl, gl, store, season_id, all_reviews, platform, rating, sort_by, num, next_page_token. - GET /v1/google-play/search: Search. 1 credit. Params: q*, store, hl, gl, price. - GET /v1/google-play/similar: Similar. 1 credit. Params: product_id*, page_token, hl, gl. - GET /v1/google-play/tv-product: Tv Product. 1 credit. Params: id, product_id, url, hl, gl, store, season_id, all_reviews, platform, rating, sort_by, num, next_page_token. ## Google Related Questions API https://perceptlayer.com/apis/google-related-questions - GET /v1/google-related-questions/related-questions: Related Questions. 1 credit. Params: q, next_page_token, hl, gl. ## Google Scholar API https://perceptlayer.com/apis/google-scholar - GET /v1/google-scholar/author: Author. 1 credit. Params: user*, hl, num, start, sort. - GET /v1/google-scholar/author-citation: Author Citation. 1 credit. Params: user*, citation_id*, hl. - GET /v1/google-scholar/author-co-authors: Author Co Authors. 1 credit. Params: user*, hl. - GET /v1/google-scholar/cite: Cite. 1 credit. Params: q*, hl. - GET /v1/google-scholar/search: Search. 1 credit. Params: q, hl, start, num, as_ylo, as_yhi, scisbd, cites, cluster. ## Google Search API https://perceptlayer.com/apis/google-search - GET /v1/google-search/google-ai-mode-search: Google Ai Mode Search. 1 credit. Params: q*, hl, gl, google_domain, uule, follow_up_token. - GET /v1/google-search/search: Search. 1–2 credits. 1 credit, plus 1 with proxy_country. Params: query*, location, uule, google_domain, gl, cr, hl, lr, ludocid, lsig, kgmid, si, ibp, uds, oq, sclient, gs_lp, tbs, as_qdr, safe, nfpr, filter, tbm, udm, start, include_thumbnails, page, amount, device, proxy_country. - GET /v1/google-search/search-advanced: Search Advanced. 1–3 credits. 1 credit, plus 1 with proxy_country and 1 with fetch_ai_overview. Params: query*, location, uule, google_domain, gl, cr, hl, lr, ludocid, lsig, kgmid, si, ibp, uds, oq, sclient, gs_lp, tbs, as_qdr, safe, nfpr, filter, tbm, udm, start, include_thumbnails, page, amount, device, proxy_country, fetch_ai_overview. - GET /v1/google-search/search-advanced-place: Search Advanced Place. 1 credit. Params: detail_url, svid, hl, gl. - GET /v1/google-search/search-ai-overview: Search Ai Overview. 1 credit. Params: query*, hl, gl, google_domain, uule. - GET /v1/google-search/search-light: Search Light. 1 credit. Params: query*, num, start, page, hl, lr, gl, cr, safe, dateRestrict, sort, filter, rights. - GET /v1/google-search/search-light-autocomplete: Search Light Autocomplete. 1 credit. Params: query*, hl, limit. ## Google Shopping API https://perceptlayer.com/apis/google-shopping - GET /v1/google-shopping/filters: Filters. 2 credits. Params: q*, gl, hl, shoprs. - GET /v1/google-shopping/merchant-urls: Merchant Urls. 2 credits. Params: product_id, catalog_id, gpcid, headline_offer_docid, gl, hl, offer_ids. - GET /v1/google-shopping/product: Product. 2 credits. Params: product_id, catalog_id, gpcid, headline_offer_docid, gl, hl. - GET /v1/google-shopping/search: Search. 1 credit. Params: q*, gl, hl, location, uule, start, device, small_business, shoprs. ## Google Short Videos API https://perceptlayer.com/apis/google-short-videos - GET /v1/google-short-videos/search: Search. 1 credit. Params: query*, hl, gl, google_domain, start, page. ## Google Sports API https://perceptlayer.com/apis/google-sports - GET /v1/google-sports/search: Search. 1 credit. Params: q*, hl, gl. ## Google Translate API https://perceptlayer.com/apis/google-translate - GET /v1/google-translate/translate: Translate. 1 credit. Params: source*, text*, target*. ## Google Travel Explore API https://perceptlayer.com/apis/google-travel-explore - GET /v1/google-travel-explore/flights-explore: Flights Explore. 1 credit. Params: departure_id*, type, travel_class, adults, children, infants, gl, hl, max_price. ## Google Trends API https://perceptlayer.com/apis/google-trends - GET /v1/google-trends/autocomplete: Autocomplete. 1 credit. Params: q*, geo, hl. - GET /v1/google-trends/interest: Interest. 1 credit. Params: q*, geo, time_range, hl, search_type. - GET /v1/google-trends/interest-by-region: Interest By Region. 1 credit. Params: q*, geo, region, date, cat, gprop, tz, hl. - GET /v1/google-trends/related: Related. 1 credit. Params: q*, geo, time_range, hl, search_type. - GET /v1/google-trends/trending-now: Trending Now. 1 credit. Params: geo*, hl, hours, num_news, only_active, sort, category_id. ## Google Videos API https://perceptlayer.com/apis/google-video - GET /v1/google-video/videos: Videos. 1 credit. Params: q*, location, uule, google_domain, gl, hl, lr, tbs, safe, nfpr, filter, start, page. ## Goplaceit API https://perceptlayer.com/apis/goplaceit - GET /v1/goplaceit/agency: Agency. 1 credit. Params: id*. - GET /v1/goplaceit/agency-listings: Agency Listings. 1 credit. Params: id*, page, per_page. - GET /v1/goplaceit/currencies: Currencies. 1 credit. - GET /v1/goplaceit/listing: Listing. 1 credit. Params: id*, entity_type. - GET /v1/goplaceit/location-autocomplete: Location Autocomplete. 1 credit. Params: q*, country*, region, limit. - GET /v1/goplaceit/locations: Locations. 1 credit. Params: country, region, province, commune, children. - GET /v1/goplaceit/search: Search. 1 credit. Params: country*, mode*, property_type, entity_type, region, commune, neighborhood, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max, area_min, area_max, price_min, price_max, currency, sort, page, per_page. ## Grailed API https://perceptlayer.com/apis/grailed - GET /v1/grailed/designers: Designers. 1 credit. Params: query*, limit. - GET /v1/grailed/listing: Listing. 1 credit. Params: id, url. - GET /v1/grailed/search: Search. 1 credit. Params: query, designer[], category[], department, size[], condition[], price_min, price_max, location[], status, sort, page. - GET /v1/grailed/user: User. 1 credit. Params: username*, status, page, include[]. ## Gratka API https://perceptlayer.com/apis/gratka - GET /v1/gratka/location-autocomplete: Location Autocomplete. 1 credit. Params: query*. - GET /v1/gratka/search: Search. 1 credit. Params: type, transaction, location, district, price_min, price_max, area_min, area_max, rooms, sort, page. ## Green-Acres API https://perceptlayer.com/apis/green-acres - GET /v1/green-acres/agency: Agency. 1 credit. Params: agency_key, slug, url. - GET /v1/green-acres/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/green-acres/listing: Listing. 1 credit. Params: url, id, city_slug. - GET /v1/green-acres/search: Search. 1 credit. Params: location*, property_type, sort, page, price_min, price_max, living_area_min, living_area_max, land_area_min, land_area_max, rooms_min, rooms_max, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max. ## Greenhouse API https://perceptlayer.com/apis/greenhouse - GET /v1/greenhouse/job: Job. 1 credit. Params: board*, job_id*. - GET /v1/greenhouse/jobs: Jobs. 1 credit. Params: board*, q, location, page, limit, include_content. ## Gumtree API https://perceptlayer.com/apis/gumtree - GET /v1/gumtree/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/gumtree/categories: Categories. 1 credit. - GET /v1/gumtree/listing: Listing. 1 credit. Params: id*. - GET /v1/gumtree/location: Location. 1 credit. Params: latitude*, longitude*. - GET /v1/gumtree/search: Search. 1 credit. Params: query, category_id, page, size, min_price, max_price, location_id, location_type, distance, sort. ## H&M API https://perceptlayer.com/apis/hm - GET /v1/hm/product: Product. 1 credit. Params: article_id, url, locale. - GET /v1/hm/search: Search. 1 credit. Params: query, category, locale, page, sort, filters. ## Habitaclia API https://perceptlayer.com/apis/habitaclia - GET /v1/habitaclia/listing: Listing. 1 credit. Params: id*. - GET /v1/habitaclia/locations: Locations. 1 credit. Params: query*, property_type*, transaction_type. - GET /v1/habitaclia/publisher: Publisher. 1 credit. Params: publisher_id*, page, page_size. - GET /v1/habitaclia/search: Search. 1 credit. Params: transaction_type*, property_type*, code*, layer_id*, page, page_size, sort_by, min_price, max_price, min_rooms, min_bathrooms, features[], is_private. ## Hacker News API https://perceptlayer.com/apis/hacker-news - GET /v1/hacker-news/item: Item. 1 credit. Params: id*, comments. - GET /v1/hacker-news/search: Search. 1 credit. Params: query*, type, sort, page, per_page, date_from, date_to. - GET /v1/hacker-news/stories: Stories. 1 credit. Params: type, page, per_page. - GET /v1/hacker-news/user: User. 1 credit. Params: id*, submissions. ## Halo Oglasi API https://perceptlayer.com/apis/halo-oglasi - GET /v1/halo-oglasi/agency: Agency. 1 credit. Params: route*. - GET /v1/halo-oglasi/agency-ads: Agency Ads. 1 credit. Params: advertiser_id*, listing_type, property_type, min_price, max_price, min_area, max_area, min_rooms, max_rooms, advertiser_type, building_type, location_ids[], sort, page, condition_ids[], furnishing_ids[], heating_ids[], feature_ids[]. - GET /v1/halo-oglasi/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/halo-oglasi/listing: Listing. 1 credit. Params: url*. - GET /v1/halo-oglasi/search: Search. 1 credit. Params: listing_type, property_type, min_price, max_price, min_area, max_area, min_rooms, max_rooms, advertiser_type, building_type, location_ids[], sort, page, condition_ids[], furnishing_ids[], heating_ids[], feature_ids[]. ## Hemnet API https://perceptlayer.com/apis/hemnet - GET /v1/hemnet/address-search: Address Search. 1 credit. Params: query*. - GET /v1/hemnet/agencies: Agencies. 1 credit. Params: location_ids, sort, limit, offset. - GET /v1/hemnet/agency: Agency. 1 credit. Params: id*, months. - GET /v1/hemnet/brf: Brf. 1 credit. Params: id*. - GET /v1/hemnet/broker: Broker. 1 credit. Params: id*, months. - GET /v1/hemnet/brokers: Brokers. 1 credit. Params: query, location_ids, sort, limit, offset. - GET /v1/hemnet/cards: Cards. 1 credit. Params: ids[]*. - GET /v1/hemnet/counts: Counts. 1 credit. Params: for_sale_location_ids, upcoming_location_ids, sold_location_ids. - GET /v1/hemnet/listing: Listing. 1 credit. Params: id*, images_limit. - GET /v1/hemnet/locations: Locations. 1 credit. Params: query*, limit, types. - GET /v1/hemnet/map: Map. 1 credit. Params: mode, family, location_ids, expand_locations, geometries, limit. - GET /v1/hemnet/media: Media. 1 credit. Params: id*, limit, offset. - GET /v1/hemnet/price-history: Price History. 1 credit. Params: id*, similar_limit. - GET /v1/hemnet/project-units: Project Units. 1 credit. Params: id*, limit, offset, featured. - GET /v1/hemnet/sale-timeline: Sale Timeline. 1 credit. Params: id*, similar_limit. - GET /v1/hemnet/search: Search. 1 credit. Params: q, location_ids, location_slugs, housing_form_groups, price_min, price_max, fee_min, fee_max, living_area_min, living_area_max, rooms_min, rooms_max, land_area_min, land_area_max, square_meter_price_min, square_meter_price_max, tags, construction_year_min, construction_year_max, new_construction, expand_locations, sort, offset, limit. - GET /v1/hemnet/similar: Similar. 1 credit. Params: id*, limit. - GET /v1/hemnet/sold: Sold. 1 credit. Params: location_ids, location_slugs, housing_form_groups, price_min, price_max, fee_min, fee_max, living_area_min, living_area_max, rooms_min, rooms_max, land_area_min, land_area_max, square_meter_price_min, square_meter_price_max, expand_locations, sort, offset, limit. - GET /v1/hemnet/sold-property: Sold Property. 1 credit. Params: id*, images_limit. - GET /v1/hemnet/toplist: Toplist. 1 credit. Params: categories. - GET /v1/hemnet/upcoming: Upcoming. 1 credit. Params: q, location_ids, location_slugs, housing_form_groups, price_min, price_max, fee_min, fee_max, living_area_min, living_area_max, rooms_min, rooms_max, land_area_min, land_area_max, square_meter_price_min, square_meter_price_max, tags, construction_year_min, construction_year_max, new_construction, expand_locations, offset, limit. ## Hepsiburada API https://perceptlayer.com/apis/hepsiburada - GET /v1/hepsiburada/categories: Categories. 1 credit. Params: query*, brand. - GET /v1/hepsiburada/offers: Offers. 1 credit. Params: id*. - GET /v1/hepsiburada/product: Product. 1 credit. Params: id, url. - GET /v1/hepsiburada/reviews: Reviews. 1 credit. Params: id*, page, stars, sort, direction. - GET /v1/hepsiburada/search: Search. 1 credit. Params: query*, page, brand, category. ## Hepsiemlak API https://perceptlayer.com/apis/hepsiemlak - GET /v1/hepsiemlak/agency: Agency. 1 credit. Params: agency_id*, property_class, listing_type, page, per_page. - GET /v1/hepsiemlak/agency-licence: Agency Licence. 1 credit. Params: agency_id*. - GET /v1/hepsiemlak/autocomplete: Autocomplete. 1 credit. Params: query*, types[], limit. - GET /v1/hepsiemlak/filters: Filters. 1 credit. Params: property_class, listing_type, city, county[]. - GET /v1/hepsiemlak/listing: Listing. 1 credit. Params: id*. - GET /v1/hepsiemlak/listings: Listings. 1 credit. Params: ids[], with_description. - GET /v1/hepsiemlak/locations: Locations. 1 credit. Params: city_id, county_id. - GET /v1/hepsiemlak/map: Map. 1 credit. Params: property_class, listing_type, property_type[], city, county[], district[], area[], rooms[], bathrooms[], building_age[], floors[], heating[], owner_type[], usage_status[], media[], listing_date, furnish_status, keyword, agency_id, page, per_page, furnished, balcony, elevator, garden, parking, within_complex, loan_eligible, barter, has_campaign, price_min, price_max, area_min, area_max, net_area_min, net_area_max, top_left*, bottom_right*. - GET /v1/hepsiemlak/price-index: Price Index. 1 credit. Params: city_id*, county_id, district_id. - GET /v1/hepsiemlak/project: Project. 1 credit. Params: id*. - GET /v1/hepsiemlak/projects: Projects. 1 credit. Params: city, county[], page, per_page. - GET /v1/hepsiemlak/search: Search. 1 credit. Params: property_class, listing_type, property_type[], city, county[], district[], area[], rooms[], bathrooms[], building_age[], floors[], heating[], owner_type[], usage_status[], media[], listing_date, furnish_status, keyword, agency_id, sort, page, per_page, furnished, balcony, elevator, garden, parking, within_complex, loan_eligible, barter, has_campaign, price_min, price_max, area_min, area_max, net_area_min, net_area_max. - GET /v1/hepsiemlak/similar: Similar. 1 credit. Params: id*. ## heycar API https://perceptlayer.com/apis/heycar - GET /v1/heycar/dealer: Dealer. 1 credit. Params: dealer_id*, page, size, sort. - GET /v1/heycar/listing: Listing. 1 credit. Params: id, heycar_id. - GET /v1/heycar/search: Search. 1 credit. Params: page, size, sort, make, model, price_min, price_max, mileage_max, fuel_type, body_type, gearbox, lat, lon. ## HolidayCheck API https://perceptlayer.com/apis/holidaycheck - GET /v1/holidaycheck/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/holidaycheck/hotel: Hotel. 1 credit. Params: hotel_id*. - GET /v1/holidaycheck/hotels: Hotels. 1 credit. Params: destination_id*, limit, offset. - GET /v1/holidaycheck/reviews: Reviews. 1 credit. Params: hotel_id*, limit, offset. ## Holidu API https://perceptlayer.com/apis/holidu - GET /v1/holidu/autocomplete: Autocomplete. 1 credit. Params: query*, market. - GET /v1/holidu/availability-bulk: Availability Bulk. 1 credit. Params: offer_ids[], check_in*, check_out*, adults, children_ages[], market. - GET /v1/holidu/filters: Filters. 1 credit. Params: query*, market. - GET /v1/holidu/property: Property. 1 credit. Params: offer_id*, market. - GET /v1/holidu/property-audience-highlights: Property Audience Highlights. 1 credit. Params: offer_id*, market. - GET /v1/holidu/property-availability: Property Availability. 1 credit. Params: offer_id*, market. - GET /v1/holidu/property-description: Property Description. 1 credit. Params: offer_id*, market. - GET /v1/holidu/property-holidu-check: Property Holidu Check. 1 credit. Params: offer_id*, market. - GET /v1/holidu/property-multiunit: Property Multiunit. 1 credit. Params: offer_id*, market. - GET /v1/holidu/property-offers: Property Offers. 1 credit. Params: group_id*, query*, check_in, check_out, adults, children_ages[], market. - GET /v1/holidu/property-pois: Property Pois. 1 credit. Params: offer_id*, market. - GET /v1/holidu/property-prices: Property Prices. 1 credit. Params: offer_id*, check_in*, check_out*, adults, children_ages[], market. - GET /v1/holidu/property-review: Property Review. 1 credit. Params: review_id*, offer_id*, market. - GET /v1/holidu/property-review-extracts: Property Review Extracts. 1 credit. Params: offer_id*, market. - GET /v1/holidu/property-reviews: Property Reviews. 1 credit. Params: page, page_size, offer_id*, market. - GET /v1/holidu/recommendations: Recommendations. 1 credit. Params: offer_id*, market. - GET /v1/holidu/regions-themes: Regions Themes. 1 credit. Params: region_id*, market. - GET /v1/holidu/route-meta: Route Meta. 1 credit. Params: href*, market. - GET /v1/holidu/search: Search. 1 credit. Params: query, ne_lat, ne_lng, sw_lat, sw_lng, property_type[], bedrooms, rating, amenities[], min_price, max_price, page, sort, order, check_in, check_out, adults, children_ages[], market. - GET /v1/holidu/smart-filters: Smart Filters. 1 credit. Params: query*, market. ## Homegate API https://perceptlayer.com/apis/homegate - GET /v1/homegate/listing: Listing. 1 credit. Params: id*. - GET /v1/homegate/locations: Locations. 1 credit. Params: name, ids, lang, from, size. - GET /v1/homegate/search: Search. 1 credit. Params: offer_type, location*, page, size. ## Homely API https://perceptlayer.com/apis/homely - GET /v1/homely/listing: Listing. 1 credit. Params: id*. - GET /v1/homely/location-autocomplete: Location Autocomplete. 1 credit. Params: q*. - GET /v1/homely/office: Office. 1 credit. Params: id*. - GET /v1/homely/search: Search. 1 credit. Params: mode*, location, postcode, property_types[], beds_min, baths_min, cars_min, price_min, price_max, land_size_min, land_size_max, sort, page, per_page. ## homes.co.nz API https://perceptlayer.com/apis/homes-co-nz - GET /v1/homes-co-nz/agency: Agency. 1 credit. Params: id*. - GET /v1/homes-co-nz/agent: Agent. 1 credit. Params: id*. - GET /v1/homes-co-nz/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/homes-co-nz/listing: Listing. 1 credit. Params: id, url. - GET /v1/homes-co-nz/property: Property. 1 credit. Params: property_id*, month_limit. - GET /v1/homes-co-nz/search: Search. 1 credit. Params: type*, q, bbox, polyline, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max, price_min, price_max, date_min, date_max, sort, page, per_page. ## Homes.com API https://perceptlayer.com/apis/homes-com - GET /v1/homes-com/agent: Agent. 1 credit. Params: id*. - GET /v1/homes-com/agent-autocomplete: Agent Autocomplete. 1 credit. Params: query*, limit. - GET /v1/homes-com/autocomplete: Autocomplete. 1 credit. Params: query*, limit, type, listing_type. - GET /v1/homes-com/listing: Listing. 1 credit. Params: id, url. - GET /v1/homes-com/neighborhood: Neighborhood. 1 credit. Params: id*. - GET /v1/homes-com/school: School. 1 credit. Params: id*. - GET /v1/homes-com/search: Search. 1 credit. Params: location, location_id, bounding_box, listing_type, status, open_houses, min_price, max_price, min_beds, max_beds, min_baths, max_baths, min_sqft, max_sqft, min_year_built, max_year_built, property_type[], sort, page, per_page, facets. ## HomeToGo API https://perceptlayer.com/apis/hometogo - GET /v1/hometogo/filters: Filters. 1 credit. Params: location_id, destination. - GET /v1/hometogo/nearby: Nearby. 1 credit. Params: offer_id*. - GET /v1/hometogo/offer: Offer. 1 credit. Params: check_in, check_out, adults, children, currency, offer_id*. - GET /v1/hometogo/price-histogram: Price Histogram. 1 credit. Params: location_id, destination, check_in*, check_out*, adults, children, currency. - GET /v1/hometogo/providers: Providers. 1 credit. Params: check_in, check_out, adults, children, currency, offer_id*. - GET /v1/hometogo/reviews: Reviews. 1 credit. Params: offer_id*, limit, offset. - GET /v1/hometogo/search: Search. 1 credit. Params: location_id, destination, check_in*, check_out*, adults, children, currency, limit, offset, page, sort, min_price, max_price, type[], bedrooms, bathrooms, amenities[], rating, sale_type. - GET /v1/hometogo/suggest: Suggest. 1 credit. Params: query*. ## Hostelworld API https://perceptlayer.com/apis/hostelworld - GET /v1/hostelworld/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/hostelworld/availability: Availability. 1 credit. Params: property_id*, check_in*, nights, guests, currency. - GET /v1/hostelworld/property: Property. 1 credit. Params: property_id*, currency. - GET /v1/hostelworld/reviews: Reviews. 1 credit. Params: property_id*, page, per_page, sort. - GET /v1/hostelworld/search: Search. 1 credit. Params: city_id*, check_in, nights, guests, currency, sort, page, per_page. ## HotPads API https://perceptlayer.com/apis/hotpads - GET /v1/hotpads/listing: Listing. 1 credit. Params: id*. - GET /v1/hotpads/search: Search. 1 credit. Params: area*, type, beds, min_price, max_price, page. ## HouseSigma API https://perceptlayer.com/apis/housesigma - GET /v1/housesigma/listing: Listing. 1 credit. Params: id*. - GET /v1/housesigma/locations: Locations. 1 credit. Params: q*, province. - GET /v1/housesigma/market: Market. 1 credit. Params: municipality_id*, province. - GET /v1/housesigma/nearby: Nearby. 1 credit. Params: id*. - GET /v1/housesigma/search: Search. 1 credit. Params: municipality_id*, community_id, operation, province, type, price_min, price_max, bedrooms, bathrooms, garage, area_min, area_max, lot_min, lot_max, listing_days, keyword, sort, page. ## Housing.com API https://perceptlayer.com/apis/housing-com - GET /v1/housing-com/agent: Agent. 1 credit. Params: id*. - GET /v1/housing-com/agent-listings: Agent Listings. 1 credit. Params: listings_hash*, service, page. - GET /v1/housing-com/autocomplete: Autocomplete. 1 credit. Params: query*, city*, limit. - GET /v1/housing-com/cities: Cities. 1 credit. Params: service, query. - GET /v1/housing-com/listing: Listing. 1 credit. Params: id*, type*. - GET /v1/housing-com/search: Search. 1 credit. Params: service*, city*, location, canonical, price_min, price_max, area_min, area_max, bedrooms[], property_type[], furnishing[], listed_by[], added_within_days, sort, order, page. ## Houzz API https://perceptlayer.com/apis/houzz - GET /v1/houzz/pro: Pro. 1 credit. Params: id, profile_id, url. - GET /v1/houzz/reviews: Reviews. 1 credit. Params: user_id*, pro_id*, page, limit, sort, search. ## Hybel API https://perceptlayer.com/apis/hybel - GET /v1/hybel/listing: Listing. 1 credit. Params: id*. - GET /v1/hybel/location-autocomplete: Location Autocomplete. 1 credit. Params: q*, include_districts. - GET /v1/hybel/search: Search. 1 credit. Params: place*, min_rent, max_rent, home_type, rooms, rent_period, available_from, available_to, district, sort, page, student_housing, balcony, pets_allowed, parking, elevator, internet_included, furnished. ## IAAI API https://perceptlayer.com/apis/iaai - GET /v1/iaai/search: Search. 1 credit. Params: query, make, model, year, year_from, year_to, odometer_from, odometer_to, damage, sort, order, page, per_page. - GET /v1/iaai/vehicle: Vehicle. 1 credit. Params: id*. ## Idealista API https://perceptlayer.com/apis/idealista - GET /v1/idealista/agency: Agency. 1 credit. Params: country*, microsite_short_name*. - POST /v1/idealista/deeplink-build: Deeplink Build. 1 credit. Params: country*, location_id*, operation, property_type, locale. - GET /v1/idealista/deeplink-parse: Deeplink Parse. 1 credit. Params: country*, url*, locale. - GET /v1/idealista/filters: Filters. 1 credit. Params: country*, operation*, property_type*, location_id*, locale, quality, gallery. - GET /v1/idealista/home: Home. 1 credit. Params: country*, locale, quality. - GET /v1/idealista/listing: Listing. 1 credit. Params: country*, ad_id*, include[], typology, from_date, to_date, guests, quality, locale, language, max_items. - GET /v1/idealista/listing-multimedia: Listing Multimedia. 1 credit. Params: country*, ad_id*, quality, language. - GET /v1/idealista/listing-stats: Listing Stats. 1 credit. Params: country*, ad_id*, language. - GET /v1/idealista/location: Location. 1 credit. Params: country*, location_id*. - GET /v1/idealista/locations: Locations. 1 credit. Params: country*, mode*, prefix, coordinates, property_type, operation, locale, language, filter, location_id. - GET /v1/idealista/map-georeach: Map Georeach. 1 credit. Params: country*, operation*, property_type*, location_id, center, distance, max_items, num_page, order, sort, quality, gallery, locale, microsite_short_name, chalet, current_occupation_type, auction, home_type, bank_offer, advertiser_type, min_price, max_price, min_size, max_size, min_rooms, max_rooms, shape. - GET /v1/idealista/map-multizone: Map Multizone. 1 credit. Params: country*. - GET /v1/idealista/map-search: Map Search. 1 credit. Params: country*, operation*, property_type*, location_id, center, distance, max_items, num_page, order, sort, quality, gallery, locale, microsite_short_name, chalet, current_occupation_type, auction, home_type, bank_offer, advertiser_type, min_price, max_price, min_size, max_size, min_rooms, max_rooms, shape, mode*. - POST /v1/idealista/map-simplify: Map Simplify. 1 credit. Params: country*, shape*. - GET /v1/idealista/map-static: Map Static. 1 credit. Params: country*, location_id*, aspect_ratio. - GET /v1/idealista/map-tiles: Map Tiles. 1 credit. Params: country*, operation*, property_type*, location_id, center, distance, max_items, num_page, order, sort, quality, gallery, locale, microsite_short_name, chalet, current_occupation_type, auction, home_type, bank_offer, advertiser_type, min_price, max_price, min_size, max_size, min_rooms, max_rooms, shape, z*, x*, y*. - GET /v1/idealista/map-zoi: Map Zoi. 1 credit. Params: country*, slug*, language. - GET /v1/idealista/news: News. 1 credit. Params: country*. - GET /v1/idealista/phones-prefixes: Phones Prefixes. 1 credit. Params: country*, language*. - GET /v1/idealista/search: Search. 1 credit. Params: country*, operation*, property_type*, location_id, center, distance, max_items, num_page, order, sort, quality, gallery, locale, microsite_short_name, chalet, current_occupation_type, auction, home_type, bank_offer, advertiser_type, min_price, max_price, min_size, max_size, min_rooms, max_rooms, shape. - POST /v1/idealista/shorturis: Shorturis. 1 credit. Params: country*, direction*, location_id, operation, property_type, locale, short_uris. - GET /v1/idealista/vacation-calendar: Vacation Calendar. 1 credit. Params: country*, ad_id*, include[], from_date, to_date, guests. ## Idealo API https://perceptlayer.com/apis/idealo - GET /v1/idealo/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/idealo/brand-products: Brand Products. 1 credit. Params: brand_id, brand, page, sort, filters[], item_states[], price_min, price_max. - GET /v1/idealo/categories: Categories. 1 credit. - GET /v1/idealo/deals: Deals. 1 credit. Params: category_id*, deal_type, page, sort, filters[], price_min, price_max. - GET /v1/idealo/international-prices: International Prices. 1 credit. Params: product_id*. - GET /v1/idealo/offers: Offers. 1 credit. Params: product_id*, page, all, include_shop_ratings. - GET /v1/idealo/product: Product. 1 credit. Params: product_id*. - GET /v1/idealo/products: Products. 1 credit. Params: ids[]. - GET /v1/idealo/reviews: Reviews. 1 credit. Params: product_id*, page. - GET /v1/idealo/search: Search. 1 credit. Params: query, category_id, page, sort, filters[], item_states[], price_min, price_max. - GET /v1/idealo/shop: Shop. 1 credit. Params: shop_id*. - GET /v1/idealo/shop-products: Shop Products. 1 credit. Params: shop_id*, category_id*, page, sort, filters[], item_states[], price_min, price_max. - GET /v1/idealo/trending: Trending. 1 credit. ## IKEA API https://perceptlayer.com/apis/ikea - GET /v1/ikea/product: Product. 1 credit. Params: item_number, url, country, store_id. - GET /v1/ikea/search: Search. 1 credit. Params: query*, page, country, store_id, sort. - GET /v1/ikea/stores: Stores. 1 credit. Params: country. ## Imgur API https://perceptlayer.com/apis/imgur - GET /v1/imgur/post: Post. 1 credit. Params: id*. - GET /v1/imgur/search: Search. 1 credit. Params: q*, page, sort. - GET /v1/imgur/tag: Tag. 1 credit. Params: tag*, page, window. - GET /v1/imgur/user: User. 1 credit. Params: username*, page. - GET /v1/imgur/viral: Viral. 1 credit. Params: page, sort. ## ImmobilienScout24 API https://perceptlayer.com/apis/immobilienscout24 - GET /v1/immobilienscout24/locations: Locations. 1 credit. Params: query*, limit. - GET /v1/immobilienscout24/price-insights: Price Insights. 1 credit. Params: location*. - GET /v1/immobilienscout24/property: Property. 1 credit. Params: id*. - GET /v1/immobilienscout24/search: Search. 1 credit. Params: location*, type, price_min, price_max, rooms_min, rooms_max, size_min, size_max, page, per_page. ## ImmobilienScout24 Austria API https://perceptlayer.com/apis/immobilienscout24-at - GET /v1/immobilienscout24-at/immoscout24-at-agency: Immoscout24 At Agency. 1 credit. Params: cwid*, path. - GET /v1/immobilienscout24-at/immoscout24-at-agency-directory: Immoscout24 At Agency Directory. 1 credit. Params: region, page. - GET /v1/immobilienscout24-at/immoscout24-at-agency-listings: Immoscout24 At Agency Listings. 1 credit. Params: cwid*, type, size, from. - GET /v1/immobilienscout24-at/immoscout24-at-autocomplete: Immoscout24 At Autocomplete. 1 credit. Params: term*, level. - GET /v1/immobilienscout24-at/immoscout24-at-facets: Immoscout24 At Facets. 1 credit. Params: region, keywords, zip_code, shape_id, sort, transfer_type, use_type, estate_type, estate_detail_type, condition_type, condition_age, outdoor_spaces, accessibility, bathroom, construction_method, facilities, lift, furnishing, transit_line_types, price_from, price_to, rooms_from, rooms_to, area_from, area_to, plot_area_from, plot_area_to, price_per_sqm_from, price_per_sqm_to, parking_spaces, has_commission, is_developer_project, is_forced_sale, is_investment_property, is_private_insertion, is_shortterm_rentable, is_social_housing, is_suitable_as_holiday_home, requires_financial_contribution. - GET /v1/immobilienscout24-at/immoscout24-at-locations: Immoscout24 At Locations. 1 credit. Params: id. - GET /v1/immobilienscout24-at/immoscout24-at-map-markers: Immoscout24 At Map Markers. 1 credit. Params: region, keywords, zip_code, shape_id, sort, transfer_type, use_type, estate_type, estate_detail_type, condition_type, condition_age, outdoor_spaces, accessibility, bathroom, construction_method, facilities, lift, furnishing, transit_line_types, price_from, price_to, rooms_from, rooms_to, area_from, area_to, plot_area_from, plot_area_to, price_per_sqm_from, price_per_sqm_to, parking_spaces, has_commission, is_developer_project, is_forced_sale, is_investment_property, is_private_insertion, is_shortterm_rentable, is_social_housing, is_suitable_as_holiday_home, requires_financial_contribution, bottom_left_lat*, bottom_left_lon*, top_right_lat*, top_right_lon*, zoom. - GET /v1/immobilienscout24-at/immoscout24-at-price-insights: Immoscout24 At Price Insights. 1 credit. Params: id*. - GET /v1/immobilienscout24-at/immoscout24-at-properties: Immoscout24 At Properties. 1 credit. Params: ids[], ids*. - GET /v1/immobilienscout24-at/immoscout24-at-property: Immoscout24 At Property. 1 credit. Params: id*. - GET /v1/immobilienscout24-at/immoscout24-at-search: Immoscout24 At Search. 1 credit. Params: region, keywords, zip_code, shape_id, sort, transfer_type, use_type, estate_type, estate_detail_type, condition_type, condition_age, outdoor_spaces, accessibility, bathroom, construction_method, facilities, lift, furnishing, transit_line_types, price_from, price_to, rooms_from, rooms_to, area_from, area_to, plot_area_from, plot_area_to, price_per_sqm_from, price_per_sqm_to, parking_spaces, has_commission, is_developer_project, is_forced_sale, is_investment_property, is_private_insertion, is_shortterm_rentable, is_social_housing, is_suitable_as_holiday_home, requires_financial_contribution, size, from. - GET /v1/immobilienscout24-at/immoscout24-at-search-parse: Immoscout24 At Search Parse. 1 credit. Params: query*. - GET /v1/immobilienscout24-at/immoscout24-at-search-relax: Immoscout24 At Search Relax. 1 credit. Params: region, keywords, zip_code, shape_id, sort, transfer_type, use_type, estate_type, estate_detail_type, condition_type, condition_age, outdoor_spaces, accessibility, bathroom, construction_method, facilities, lift, furnishing, transit_line_types, price_from, price_to, rooms_from, rooms_to, area_from, area_to, plot_area_from, plot_area_to, price_per_sqm_from, price_per_sqm_to, parking_spaces, has_commission, is_developer_project, is_forced_sale, is_investment_property, is_private_insertion, is_shortterm_rentable, is_social_housing, is_suitable_as_holiday_home, requires_financial_contribution. - GET /v1/immobilienscout24-at/immoscout24-at-search-url: Immoscout24 At Search Url. 1 credit. Params: region, keywords, zip_code, shape_id, sort, transfer_type, use_type, estate_type, estate_detail_type, condition_type, condition_age, outdoor_spaces, accessibility, bathroom, construction_method, facilities, lift, furnishing, transit_line_types, price_from, price_to, rooms_from, rooms_to, area_from, area_to, plot_area_from, plot_area_to, price_per_sqm_from, price_per_sqm_to, parking_spaces, has_commission, is_developer_project, is_forced_sale, is_investment_property, is_private_insertion, is_shortterm_rentable, is_social_housing, is_suitable_as_holiday_home, requires_financial_contribution. - GET /v1/immobilienscout24-at/immoscout24-at-similar: Immoscout24 At Similar. 1 credit. Params: id*, size. ## immobilier.notaires.fr API https://perceptlayer.com/apis/notaires-immo - GET /v1/notaires-immo/agency: Agency. 1 credit. Params: crpcen*. - GET /v1/notaires-immo/autocomplete: Autocomplete. 1 credit. Params: q*, kind, size. - GET /v1/notaires-immo/listing: Listing. 1 credit. Params: annonce_id*. - GET /v1/notaires-immo/listing-contact: Listing Contact. 1 credit. Params: annonce_id*. - GET /v1/notaires-immo/locality: Locality. 1 credit. Params: id*. - GET /v1/notaires-immo/locality-group: Locality Group. 1 credit. Params: id*. - GET /v1/notaires-immo/search: Search. 1 credit. Params: transaction, locality, department, radius_km, min_price, max_price, min_surface, max_surface, rooms, min_rooms, max_rooms, bedrooms, min_bedrooms, max_bedrooms, property_type, viager, crpcen, reference, sort, page, per_page. ## ImmoScout24 Switzerland API https://perceptlayer.com/apis/immoscout24-ch - GET /v1/immoscout24-ch/flatfox-listing: Flatfox Listing. 1 credit. Params: pk[], organization, limit, offset. - GET /v1/immoscout24-ch/flatfox-search: Flatfox Search. 1 credit. Params: north*, south*, east*, west*, offer_type, object_category, min_price, max_price, min_rooms, organization, max_count. - GET /v1/immoscout24-ch/listing: Listing. 1 credit. Params: id*, lang. - GET /v1/immoscout24-ch/locations: Locations. 1 credit. Params: name, ids, house_pk, lang, from, size. - GET /v1/immoscout24-ch/price-statistics: Price Statistics. 1 credit. Params: level_id*, level, operation, kpi_type, category, years. - GET /v1/immoscout24-ch/search: Search. 1 credit. Params: offer_type, property_type, geo_tags[], min_price, max_price, min_rooms, max_rooms, min_area, balcony, elevator, lister_id, semantic_query, sort_by, sort_direction, lang, page, size. ## Immovlan API https://perceptlayer.com/apis/immovlan - GET /v1/immovlan/agency: Agency. 1 credit. Params: id*. - GET /v1/immovlan/agency-listings: Agency Listings. 1 credit. Params: transaction, agency_id*, sort, order, page, property_type[], property_subtype[], epc_rating[], tag[], facade[], state[], seller_type[], municipal[], town[], province[], region[], price_min, price_max, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max, area_min, area_max, plot_area_min, plot_area_max. - GET /v1/immovlan/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/immovlan/listing: Listing. 1 credit. Params: id*. - GET /v1/immovlan/search: Search. 1 credit. Params: transaction*, agency_id, sort, order, page, property_type[], property_subtype[], epc_rating[], tag[], facade[], state[], seller_type[], municipal[], town[], province[], region[], price_min, price_max, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max, area_min, area_max, plot_area_min, plot_area_max. ## Immoweb API https://perceptlayer.com/apis/immoweb - GET /v1/immoweb/agencies: Agencies. 1 credit. Params: byGroup, language. - GET /v1/immoweb/count: Count. 1 credit. Params: transactionTypes*, propertyTypes, constructionTypes, buildingConditions, gardenOrientations, epcScores, priceType, sort, language, minPrice, maxPrice, minSurface, maxBedroomCount, minConstructionYear, minParkingPlaces, maxDaysSinceActivation, customerIds, postalCodes, provinces, districts, hasGarden, hasLift, hasSwimmingPool, hasPictures, hasVirtualTourOr360, isNewlyBuilt, isSoldOrRented, isFurnished, isImmediatelyAvailable, isAPublicSale, isALifeAnnuitySale, isAnInvestmentProperty, isUnderOption, isAWorkSpaceProperty, areBigPetsAllowed, isConstructionPermitObtained. - GET /v1/immoweb/discovery: Discovery. 1 credit. Params: module*, transactionTypes, language. - GET /v1/immoweb/geo: Geo. 1 credit. Params: level*, language. - GET /v1/immoweb/listing: Listing. 1 credit. Params: id*, language. - GET /v1/immoweb/locations: Locations. 1 credit. Params: input*, language, types, maxResults. - GET /v1/immoweb/search: Search. 1 credit. Params: transactionTypes*, propertyTypes, constructionTypes, buildingConditions, gardenOrientations, epcScores, priceType, sort, language, minPrice, maxPrice, minSurface, maxBedroomCount, minConstructionYear, minParkingPlaces, maxDaysSinceActivation, customerIds, postalCodes, provinces, districts, hasGarden, hasLift, hasSwimmingPool, hasPictures, hasVirtualTourOr360, isNewlyBuilt, isSoldOrRented, isFurnished, isImmediatelyAvailable, isAPublicSale, isALifeAnnuitySale, isAnInvestmentProperty, isUnderOption, isAWorkSpaceProperty, areBigPetsAllowed, isConstructionPermitObtained, range. - GET /v1/immoweb/stats: Stats. 1 credit. Params: id*. ## Immowelt API https://perceptlayer.com/apis/immowelt - GET /v1/immowelt/count: Count. 1 credit. Params: place_id*, distribution, estate_type. - GET /v1/immowelt/locations: Locations. 1 credit. Params: query*, limit. - GET /v1/immowelt/places-data: Places Data. 1 credit. Params: place_ids[]*, parent_types[]*. - GET /v1/immowelt/places-hierarchy: Places Hierarchy. 1 credit. Params: place_id*. - GET /v1/immowelt/property: Property. 1 credit. Params: id*. - GET /v1/immowelt/search: Search. 1 credit. Params: location*, type, price_min, price_max, rooms_min, rooms_max, size_min, size_max, page, per_page. ## Imobiliare.ro API https://perceptlayer.com/apis/imobiliare-ro - GET /v1/imobiliare-ro/agency: Agency. 1 credit. Params: url, slug, id, kind. - GET /v1/imobiliare-ro/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/imobiliare-ro/listing: Listing. 1 credit. Params: id, url. - GET /v1/imobiliare-ro/search: Search. 1 credit. Params: type*, property_type, page, location, price_min, price_max, currency, keyword, sort, rooms, bathrooms, amenities, building_stage, floor, partitioning, comfort, nearby, features. ## imot.bg API https://perceptlayer.com/apis/imot-bg - GET /v1/imot-bg/agencies: Agencies. 1 credit. Params: query, sort. - GET /v1/imot-bg/agency: Agency. 1 credit. Params: agency*, deal, page. - GET /v1/imot-bg/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/imot-bg/listing: Listing. 1 credit. Params: id, url. - GET /v1/imot-bg/search: Search. 1 credit. Params: location, location_id, deal, property_type, bedrooms, min_price, max_price, min_area, max_area, sort, page. ## Imovelweb API https://perceptlayer.com/apis/imovelweb - GET /v1/imovelweb/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/imovelweb/development: Development. 1 credit. Params: id*. - GET /v1/imovelweb/listing: Listing. 1 credit. Params: id*. - GET /v1/imovelweb/polygon: Polygon. 1 credit. Params: location*. - GET /v1/imovelweb/search: Search. 1 credit. Params: location, listing_type, property_type, property_subtype, seller_type, keyword, feature, age_min, age_max, published_within, development_only, sort, page, per_page, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max, garages_min, garages_max, price_min, price_max, area_min, area_max, covered_area_min, covered_area_max. - GET /v1/imovelweb/similar: Similar. 1 credit. Params: id*. ## Imovirtual API https://perceptlayer.com/apis/imovirtual - GET /v1/imovirtual/agency: Agency. 1 credit. Params: agency*. - GET /v1/imovirtual/agency-listings: Agency Listings. 1 credit. Params: agency*, page. - GET /v1/imovirtual/categories: Categories. 1 credit. - GET /v1/imovirtual/listing: Listing. 1 credit. Params: slug*. - GET /v1/imovirtual/locations: Locations. 1 credit. Params: query*. - GET /v1/imovirtual/search: Search. 1 credit. Params: transaction*, estate*, location, page, limit, priceMin, priceMax, areaMin, areaMax. ## Impressum Extraction API https://perceptlayer.com/apis/impressum-extraction - GET /v1/impressum-extraction/web-scraper-impressum: Web Scraper Impressum. 1 credit. Params: domain*, fields*, language. ## Indeed API https://perceptlayer.com/apis/indeed - GET /v1/indeed/autocomplete: Autocomplete. 1 credit. Params: q*, type, country*, language, count. - GET /v1/indeed/companies-jobs: Companies Jobs. 1 credit. Params: company, employer_key, country, limit, cursor. - GET /v1/indeed/companies-profile: Companies Profile. 1 credit. Params: company, employer_key, country. - GET /v1/indeed/companies-reviews: Companies Reviews. 1 credit. Params: company*, country, start, sort, fcountry, ftopic, fjobtitle. - GET /v1/indeed/companies-salaries: Companies Salaries. 1 credit. Params: company*, country, job_category. - GET /v1/indeed/companies-search: Companies Search. 1 credit. Params: q*, country. - GET /v1/indeed/jobs: Jobs. 1 credit. Params: query*, location, country, radius, radius_unit, job_type, sort, limit, cursor, hl, gl. - GET /v1/indeed/jobs-details: Jobs Details. 1 credit. Params: job_key*, country. - GET /v1/indeed/salaries-estimate: Salaries Estimate. 1 credit. Params: title*, location*, country. ## InfoCasas API https://perceptlayer.com/apis/infocasas - GET /v1/infocasas/agency: Agency. 1 credit. Params: id*, country. - GET /v1/infocasas/agency-properties: Agency Properties. 1 credit. Params: owner_id*, country, operation_type_id, property_type_id, minPrice, maxPrice, currencyID, m2Min, m2Max, bedrooms, bedroomsExact, bathrooms, bathroomsExact, order, rows, page, locations. - GET /v1/infocasas/location-autocomplete: Location Autocomplete. 1 credit. Params: term*, country. - GET /v1/infocasas/property: Property. 1 credit. Params: id, code, country. - GET /v1/infocasas/search: Search. 1 credit. Params: country, operation_type_id, property_type_id, minPrice, maxPrice, currencyID, m2Min, m2Max, bedrooms, bedroomsExact, bathrooms, bathroomsExact, order, rows, page, locations. ## InfoJobs API https://perceptlayer.com/apis/infojobs - GET /v1/infojobs/facets: Facets. 1 credit. Params: keyword, provinceIds, categoryIds, teleworkingIds, contractTypeIds, workdayIds. - GET /v1/infojobs/search: Search. 1 credit. Params: keyword, provinceIds, categoryIds, teleworkingIds, contractTypeIds, workdayIds, page, sortBy, sinceDate. ## Inmuebles24 API https://perceptlayer.com/apis/inmuebles24 - GET /v1/inmuebles24/developers: Developers. 1 credit. Params: operation, type, location, min_price, max_price, bathrooms, bedrooms, garages, seller_type, room_type, services, outside, general, keyword, sort, page. - GET /v1/inmuebles24/filters: Filters. 1 credit. - GET /v1/inmuebles24/locations: Locations. 1 credit. Params: query*, limit. - GET /v1/inmuebles24/property-types: Property Types. 1 credit. - GET /v1/inmuebles24/search: Search. 1 credit. Params: operation, type, location, min_price, max_price, bathrooms, bedrooms, garages, seller_type, room_type, services, outside, general, keyword, sort, page. ## Instacart API https://perceptlayer.com/apis/instacart - GET /v1/instacart/product: Product. 1 credit. Params: id*, retailer, zip. - GET /v1/instacart/search: Search. 1 credit. Params: query*, retailer, zip, page. - GET /v1/instacart/stores: Stores. 1 credit. Params: zip*. ## Instagram API https://perceptlayer.com/apis/instagram - GET /v1/instagram/audio-reels: Audio Reels. 1 credit. Params: audio_id*, max_id. - GET /v1/instagram/hashtags-search: Hashtags Search. 1 credit. Params: q*. - GET /v1/instagram/post: Post. 1 credit. Params: url, shortcode. - GET /v1/instagram/post-comments: Post Comments. 1 credit. Params: shortcode*, max_id. - GET /v1/instagram/search-popular: Search Popular. 1 credit. Params: q*. - GET /v1/instagram/user: User. 1 credit. Params: username*. - GET /v1/instagram/user-basic: User Basic. 1 credit. Params: user_id*. - GET /v1/instagram/user-embed: User Embed. 1 credit. Params: username*. - GET /v1/instagram/user-highlights: User Highlights. 1 credit. Params: highlight_id*. - GET /v1/instagram/user-posts: User Posts. 1 credit. Params: username*, max_id. - GET /v1/instagram/user-reels: User Reels. 1 credit. Params: username, user_id, max_id. - GET /v1/instagram/user-v2: User V2. 1 credit. Params: username*. ## Invaluable API https://perceptlayer.com/apis/invaluable - GET /v1/invaluable/auction: Auction. 1 credit. Params: id*, page, size. - GET /v1/invaluable/lot: Lot. 1 credit. Params: id*. - GET /v1/invaluable/search: Search. 1 credit. Params: query*, status, page, hitsPerPage, sort. ## iProperty API https://perceptlayer.com/apis/iproperty - GET /v1/iproperty/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/iproperty/listing: Listing. 1 credit. Params: id, url. - GET /v1/iproperty/search: Search. 1 credit. Params: listing_type, location, page, bedrooms, bathrooms, car_park, min_price, max_price, min_size, max_size, property_type, commercial, furnishing, room_type, tenure, floor_level, keyword, posted_within, agent_id, sort, order. ## Jameda API https://perceptlayer.com/apis/jameda - GET /v1/jameda/autocomplete-location: Autocomplete Location. 1 credit. Params: q, query. - GET /v1/jameda/autocomplete-service: Autocomplete Service. 1 credit. Params: q, query. - GET /v1/jameda/doctor-details: Doctor Details. 1 credit. Params: doctor_url*. - GET /v1/jameda/reviews: Reviews. 1 credit. Params: doctor_url*, page, sort, rating, sentiment, per_page. - GET /v1/jameda/search: Search. 1 credit. Params: q*, loc, page, per_page. ## Just Eat Takeaway.com API https://perceptlayer.com/apis/just-eat-takeaway - GET /v1/just-eat-takeaway/allergens: Allergens. 1 credit. Params: country*, restaurant_id*, product_id*. - GET /v1/just-eat-takeaway/menu: Menu. 1 credit. Params: country*, slug*. - GET /v1/just-eat-takeaway/restaurants: Restaurants. 1 credit. Params: country*, lat, lon, postcode, query, cuisine, sort, open_now, page, per_page. - GET /v1/just-eat-takeaway/reviews: Reviews. 1 credit. Params: country*, restaurant_id*, limit, cursor. ## Kakaku API https://perceptlayer.com/apis/kakaku - GET /v1/kakaku/history: History. 1 credit. Params: id*. - GET /v1/kakaku/product: Product. 1 credit. Params: id*. - GET /v1/kakaku/search: Search. 1 credit. Params: query, category, page. ## Kamernet API https://perceptlayer.com/apis/kamernet - GET /v1/kamernet/listing: Listing. 1 credit. Params: id*. - GET /v1/kamernet/location-autocomplete: Location Autocomplete. 1 credit. Params: q*. - GET /v1/kamernet/search: Search. 1 credit. Params: city*, page, sort, max_rent, min_size, radius_km, persons, age, listing_type, furnishing, availability, gender, work_status, owner_type, pets_allowed, smoking_allowed, internet, private_bathroom, private_kitchen, private_toilet. ## Kavak API https://perceptlayer.com/apis/kavak - GET /v1/kavak/car: Car. 1 credit. Params: market*, id*, include_financing. - GET /v1/kavak/markets: Markets. 1 credit. - GET /v1/kavak/search: Search. 1 credit. Params: market*, make, model, year, body_type, transmission, fuel_type, color, traction, passengers, status, region, location, keyword, min_price, max_price, min_km, max_km, sort, page. - GET /v1/kavak/taxonomy: Taxonomy. 1 credit. Params: market*, make. ## Kayak API https://perceptlayer.com/apis/kayak-platform - GET /v1/kayak-platform/best-time-flight-price-predictions: Best Time Flight Price Predictions. 1 credit. Params: origin*, destination*. - GET /v1/kayak-platform/cars-insights: Cars Insights. 1 credit. Params: path*. - GET /v1/kayak-platform/cars-search: Cars Search. 1 credit. Params: pickup*, pickup_date*, dropoff_date*, pickup_hour, dropoff_hour, sort, price_mode. - GET /v1/kayak-platform/cruises-sailings: Cruises Sailings. 1 credit. Params: min_nights, adults, children, page, sort, sort_order, product_type, include_deals, include_unavailable. - GET /v1/kayak-platform/direct-routes: Direct Routes. 1 credit. - GET /v1/kayak-platform/explore-destinations: Explore Destinations. 1 credit. Params: origin*, departure_from*, departure_to*, return_from*, return_to*, min_days, max_days, stops, north_east_lat*, north_east_lng*, south_west_lat*, south_west_lng*. - GET /v1/kayak-platform/flight-tracker-airport: Flight Tracker Airport. 1 credit. Params: origin*, date_time*, arrivals. - GET /v1/kayak-platform/flights-route-intelligence: Flights Route Intelligence. 1 credit. Params: path*. - GET /v1/kayak-platform/guides-city: Guides City. 1 credit. Params: path*. - GET /v1/kayak-platform/packages-search: Packages Search. 1 credit. Params: destination*, origin*, departure_date*, return_date*, adults, child_ages[], duration, price_mode, sort. - GET /v1/kayak-platform/reference-airlines: Reference Airlines. 1 credit. - GET /v1/kayak-platform/reference-countries: Reference Countries. 1 credit. - GET /v1/kayak-platform/reference-currencies: Reference Currencies. 1 credit. - GET /v1/kayak-platform/reference-fees: Reference Fees. 1 credit. - GET /v1/kayak-platform/stays-media: Stays Media. 1 credit. Params: hotel_ids[]*, width, height. - GET /v1/kayak-platform/stays-property: Stays Property. 1 credit. Params: path*. - GET /v1/kayak-platform/stays-rates: Stays Rates. 1 credit. Params: hotel_id*, checkin*, checkout*, adults, rooms, child_ages[], price_mode. - GET /v1/kayak-platform/stays-reviews: Stays Reviews. 1 credit. Params: hotel_id*, sort, amount. - GET /v1/kayak-platform/stays-search: Stays Search. 1 credit. Params: location_id*, location_type, checkin*, checkout*, adults, rooms, child_ages[], sort. - GET /v1/kayak-platform/stays-vacation-rentals: Stays Vacation Rentals. 1 credit. Params: path*, location_id*, location_type, checkin*, checkout*, adults, rooms, child_ages[], sort. ## Kayak Flights API https://perceptlayer.com/apis/kayak-flights - GET /v1/kayak-flights/airports: Airports. 1 credit. Params: query*, locale. - GET /v1/kayak-flights/one-way: One Way. 1 credit. Params: origin*, destination*, departure_date*, adults, children, infants_in_seat, infants_on_lap, cabin, sort, page, currency, locale, include_price_prediction, include_display_metadata. - GET /v1/kayak-flights/round-trip: Round Trip. 1 credit. Params: origin*, destination*, departure_date*, adults, children, infants_in_seat, infants_on_lap, cabin, sort, page, currency, locale, include_price_prediction, include_display_metadata, return_date*. ## Kelley Blue Book API https://perceptlayer.com/apis/kbb - GET /v1/kbb/taxonomy: Taxonomy. 1 credit. Params: year, makeId, modelId, vehicleListingType*. ## Kick API https://perceptlayer.com/apis/kick - GET /v1/kick/categories: Categories. 1 credit. - GET /v1/kick/categories-clips: Categories Clips. 1 credit. Params: subcategory_slug*, slug, sort, time, cursor. - GET /v1/kick/categories-top: Categories Top. 1 credit. - GET /v1/kick/channels: Channels. 1 credit. Params: slug*. - GET /v1/kick/channels-clips: Channels Clips. 1 credit. Params: slug*, sort, time, cursor. - GET /v1/kick/channels-featured-livestreams: Channels Featured Livestreams. 1 credit. Params: slug*, page. - GET /v1/kick/channels-livestream: Channels Livestream. 1 credit. Params: slug*. - GET /v1/kick/channels-playback-url: Channels Playback Url. 1 credit. Params: slug*. - GET /v1/kick/channels-videos: Channels Videos. 1 credit. Params: slug*, page, sort, paginated, limit. - GET /v1/kick/clips: Clips. 1 credit. Params: slug, sort, time, cursor. - GET /v1/kick/clips-detail: Clips Detail. 1 credit. Params: clip_id*. - GET /v1/kick/languages: Languages. 1 credit. - GET /v1/kick/leaderboard: Leaderboard. 1 credit. Params: type, start_time*, limit. - GET /v1/kick/livestreams: Livestreams. 1 credit. Params: feed, sort, limit, language, category_id, after, before. - GET /v1/kick/search: Search. 1 credit. Params: query*, mode. - GET /v1/kick/subcategories: Subcategories. 1 credit. - GET /v1/kick/subcategories-detail: Subcategories Detail. 1 credit. Params: subcategory_slug*. - GET /v1/kick/tags-trending: Tags Trending. 1 credit. - GET /v1/kick/video: Video. 1 credit. Params: video_uuid*. ## Kijiji API https://perceptlayer.com/apis/kijiji - GET /v1/kijiji/category: Category. 1 credit. Params: id*. - GET /v1/kijiji/listing: Listing. 1 credit. Params: id*. - GET /v1/kijiji/location: Location. 1 credit. Params: id*. - GET /v1/kijiji/search: Search. 1 credit. Params: q, category_id, location_id, page, sort, min_price, max_price. ## Kiwi.com API https://perceptlayer.com/apis/kiwi - GET /v1/kiwi/calendar-cheapest-dates: Calendar Cheapest Dates. 1 credit. Params: origin*, destination*, adults, children, infants, currency, locale, nights_min, nights_max, start_date*, end_date*. - GET /v1/kiwi/calendar-price-graph: Calendar Price Graph. 1 credit. Params: origin*, destination*, adults, children, infants, currency, locale, nights_min*, nights_max*, start_date*, end_date*. - GET /v1/kiwi/explore-price-map: Explore Price Map. 1 credit. Params: origin*, adults, children, infants, currency, locale, start_date*, end_date*, south_west_lat, south_west_lng, north_east_lat, north_east_lng, limit. - GET /v1/kiwi/flights-detail: Flights Detail. 1 credit. Params: origin*, destination*, adults, children, infants, currency, locale, cabin, departure_date*, return_date, max_stops, min_price, max_price, sort, limit, carriers[], exclude_carriers[], itinerary_id*. - GET /v1/kiwi/flights-one-per-city: Flights One Per City. 1 credit. Params: origin*, adults, children, infants, currency, locale, cabin, departure_date*, max_stops, min_price, max_price, limit, destination, nights_min, nights_max. - GET /v1/kiwi/flights-search: Flights Search. 1 credit. Params: origin*, destination*, adults, children, infants, currency, locale, cabin, departure_date*, return_date, max_stops, min_price, max_price, sort, limit, carriers[], exclude_carriers[]. - GET /v1/kiwi/locations: Locations. 1 credit. Params: query*, limit, cursor, locale. ## Kleinanzeigen API https://perceptlayer.com/apis/kleinanzeigen - GET /v1/kleinanzeigen/details: Details. 1 credit. Params: ad_id*. - GET /v1/kleinanzeigen/search: Search. 1 credit. Params: query*, page, location, category, price_min, price_max. - GET /v1/kleinanzeigen/shipping-options: Shipping Options. 1 credit. ## Kroger API https://perceptlayer.com/apis/kroger - GET /v1/kroger/product: Product. 1 credit. Params: upc, url. - GET /v1/kroger/search: Search. 1 credit. Params: query*, page. ## kununu API https://perceptlayer.com/apis/kununu - GET /v1/kununu/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/kununu/closest-cities: Closest Cities. 1 credit. Params: country, latitude*, longitude*. - GET /v1/kununu/company-details: Company Details. 1 credit. Params: country*, company_slug*, slug, countryCode. - GET /v1/kununu/company-salary: Company Salary. 1 credit. Params: country*, company_slug*. - GET /v1/kununu/industries: Industries. 1 credit. - GET /v1/kununu/job: Job. 1 credit. Params: url*. - GET /v1/kununu/job-locations: Job Locations. 1 credit. Params: query*. - GET /v1/kununu/job-titles: Job Titles. 1 credit. Params: query*, country. - GET /v1/kununu/jobs: Jobs. 1 credit. Params: query, location, country, page, radius, sort, is_top_company, workplace[][], employment_types[][], career_level[][], kununu_score[][], industry[][], discipline[][], benefits[][], workplace[]. - GET /v1/kununu/profiles: Profiles. 1 credit. Params: page, countries[], industry. - GET /v1/kununu/recommended-local: Recommended Local. 1 credit. Params: country, latitude*, longitude*. - GET /v1/kununu/related-job-searches: Related Job Searches. 1 credit. Params: country. - GET /v1/kununu/review: Review. 1 credit. Params: url*. - GET /v1/kununu/reviews: Reviews. 1 credit. Params: country*, company_slug*, company_id, uuid, slug, countryCode, page, review_type, sort, recovery, score_filters[], recommended_filters[], jobstatus_filters[], position_filters[], department_filters[], response_filters[], result_filters[], date_filters[], fetch_factor_scores. - GET /v1/kununu/salaries: Salaries. 1 credit. Params: country. - GET /v1/kununu/salary: Salary. 1 credit. Params: country, job_title*. - GET /v1/kununu/search: Search. 1 credit. Params: query*, limit, offset, countries[], industry. - GET /v1/kununu/similar-jobs: Similar Jobs. 1 credit. Params: job_id*, country*. - GET /v1/kununu/sitemap: Sitemap. 1 credit. Params: country, letter, page. - GET /v1/kununu/top-companies: Top Companies. 1 credit. Params: country, year, page, sort. - GET /v1/kununu/top-company-jobs: Top Company Jobs. 1 credit. Params: country, limit. ## Kwai API https://perceptlayer.com/apis/kwai - GET /v1/kwai/album: Album. 1 credit. Params: albumId*, pcursor, count. - GET /v1/kwai/profile: Profile. 1 credit. Params: user*. - GET /v1/kwai/search: Search. 1 credit. Params: q*, page. - GET /v1/kwai/search-suggest: Search Suggest. 1 credit. Params: q*, count. - GET /v1/kwai/topic: Topic. 1 credit. Params: name*, pcursor, count. - GET /v1/kwai/user-posts: User Posts. 1 credit. Params: user*, pcursor, count. - GET /v1/kwai/video: Video. 1 credit. Params: photo_id*. - GET /v1/kwai/video-related: Video Related. 1 credit. Params: photo_id*. ## Kyero API https://perceptlayer.com/apis/kyero - GET /v1/kyero/agent: Agent. 1 credit. Params: path, id, slug, country. - GET /v1/kyero/agents: Agents. 1 credit. Params: country*, location_id*, location_slug*, page. - GET /v1/kyero/autocomplete: Autocomplete. 1 credit. Params: q*, country. - GET /v1/kyero/property: Property. 1 credit. Params: path*. - GET /v1/kyero/search: Search. 1 credit. Params: location_id*, location_slug*, operation, property_type, min_price, max_price, min_beds, max_beds, min_baths, max_baths, min_build_size, max_build_size, features, new_build, resale_only, sort, page. ## La Centrale API https://perceptlayer.com/apis/lacentrale - GET /v1/lacentrale/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/lacentrale/dealers: Dealers. 1 credit. Params: latitude, longitude, geopoint, distance, page, page_size. - GET /v1/lacentrale/facets: Facets. 1 credit. Params: families, facets[], make_model, zip_code, zip_code_distance, price_min, price_max, mileage_min, mileage_max, year_min, year_max, energies[], gearbox, categories[], regions[], customer_family_codes[], good_deal_badges[], crit_air[], page_size. - GET /v1/lacentrale/geo: Geo. 1 credit. Params: zip_code, latitude, longitude. - GET /v1/lacentrale/taxonomy: Taxonomy. 1 credit. Params: families, facets[], make_model, zip_code, zip_code_distance, price_min, price_max, mileage_min, mileage_max, year_min, year_max, energies[], gearbox, categories[], regions[], customer_family_codes[], good_deal_badges[], crit_air[], page_size. ## Lamudi API https://perceptlayer.com/apis/lamudi - GET /v1/lamudi/agency: Agency. 1 credit. Params: id*, url, page. - GET /v1/lamudi/autocomplete: Autocomplete. 1 credit. Params: query*. ## LandSearch API https://perceptlayer.com/apis/landsearch - GET /v1/landsearch/autocomplete: Autocomplete. 1 credit. Params: q*, type, limit. - GET /v1/landsearch/listing: Listing. 1 credit. Params: listing_id*. - GET /v1/landsearch/location: Location. 1 credit. Params: slug*. - GET /v1/landsearch/profile: Profile. 1 credit. Params: profile_id*. - GET /v1/landsearch/profile-listings: Profile Listings. 1 credit. Params: profile_id*, sort, page, limit. - GET /v1/landsearch/profile-members: Profile Members. 1 credit. Params: profile_id*, sort, page, limit. - GET /v1/landsearch/profiles: Profiles. 1 credit. Params: type, location, keywords, sort, page, limit. - GET /v1/landsearch/search: Search. 1 credit. Params: location, format, type, tag, status, keywords, structure, price_min, price_max, size_min, size_max, ppa_min, ppa_max, bedrooms_min, bedrooms_max, bathrooms_min, space_min, space_max, sort, page, limit. ## LandWatch API https://perceptlayer.com/apis/landwatch - GET /v1/landwatch/agent: Agent. 1 credit. Params: agent_id*, page. - GET /v1/landwatch/agent-autocomplete: Agent Autocomplete. 1 credit. Params: q*. - GET /v1/landwatch/agents: Agents. 1 credit. Params: name, state, county, city, page. - GET /v1/landwatch/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/landwatch/listing: Listing. 1 credit. Params: listing_id*. - GET /v1/landwatch/search: Search. 1 credit. Params: state, county, city, postal_code, listing_type, property_type, status, residence, price_min, price_max, acres_min, acres_max, beds_min, baths_min, sort, page. ## LankaPropertyWeb API https://perceptlayer.com/apis/lankapropertyweb - GET /v1/lankapropertyweb/agent: Agent. 1 credit. Params: slug*, page. - GET /v1/lankapropertyweb/agents: Agents. 1 credit. Params: agent_type, page. - GET /v1/lankapropertyweb/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/lankapropertyweb/listing: Listing. 1 credit. Params: id*, type*. - GET /v1/lankapropertyweb/search: Search. 1 credit. Params: type*, location, property_type, min_price, max_price, min_bedrooms, min_land, max_land, min_floor_area, max_floor_area, keywords, page. ## Lazada API https://perceptlayer.com/apis/lazada - GET /v1/lazada/product: Product. 1–2 credits. 2 credits, or 1 when only part of the product could be read (partial is true). Params: item_id, url, country. - GET /v1/lazada/reviews: Reviews. 1–3 credits. 1 credit, or 3 when the reviews page needs the slower fetch. Params: item_id*, country, page, rating, sort. - GET /v1/lazada/search: Search. 2 credits. Params: query, country, page, category, sort, min_price, max_price, min_rating, local_only, lazmall_only. - GET /v1/lazada/shop: Shop. 2 credits. Params: shop_id*, country. - GET /v1/lazada/shop-products: Shop Products. 2 credits. Params: shop_id*, country, query, page, sort, min_price, max_price. ## Leboncoin Autos API https://perceptlayer.com/apis/leboncoin-autos - GET /v1/leboncoin-autos/listing: Listing. 1 credit. Params: list_id*. - GET /v1/leboncoin-autos/nearby: Nearby. 1 credit. Params: lat*, lng*, radius*, owner_type, sort_by, sort_order, page, limit. - GET /v1/leboncoin-autos/search: Search. 1 credit. Params: brand[], model[], fuel[], gearbox[], vehicle_type[], price_min, price_max, mileage_min, mileage_max, regdate_min, regdate_max, keywords, location[city], location[zipcode], location[department_id], location[region_id], owner_type, sort_by, sort_order, page, limit. - GET /v1/leboncoin-autos/seller: Seller. 1 credit. Params: user_id*. ## Leboncoin Immo API https://perceptlayer.com/apis/leboncoin-immo - GET /v1/leboncoin-immo/agency: Agency. 1 credit. Params: user_id*, include*. - GET /v1/leboncoin-immo/categories: Categories. 1 credit. - GET /v1/leboncoin-immo/district: District. 1 credit. Params: district_id*. - GET /v1/leboncoin-immo/geocode: Geocode. 1 credit. Params: zipcode*. - GET /v1/leboncoin-immo/listing: Listing. 1 credit. Params: id*. - GET /v1/leboncoin-immo/locations: Locations. 1 credit. Params: q*. - GET /v1/leboncoin-immo/nearby: Nearby. 1 credit. Params: lat*, lng*, radius_km*, vertical, page, limit, seller, sort, order. - GET /v1/leboncoin-immo/search: Search. 1 credit. Params: vertical*, page, limit, price_min, price_max, surface_min, surface_max, property_type, furnished, rooms_min, rooms_max, query, query_scope, location, seller, sort, order. ## Lemmy API https://perceptlayer.com/apis/lemmy - GET /v1/lemmy/community: Community. 1 credit. Params: name*, instance. - GET /v1/lemmy/post: Post. 1 credit. Params: id*, comment_sort, comment_limit, max_depth, instance. - GET /v1/lemmy/posts: Posts. 1 credit. Params: community*, sort, type_, limit, page_cursor, instance. - GET /v1/lemmy/search: Search. 1 credit. Params: q*, type_, sort, limit, page, instance. - GET /v1/lemmy/user: User. 1 credit. Params: username*, sort, limit, page, instance. ## Letterboxd API https://perceptlayer.com/apis/letterboxd - GET /v1/letterboxd/diary: Diary. 1 credit. Params: user*, page. - GET /v1/letterboxd/film: Film. 1 credit. Params: slug*. - GET /v1/letterboxd/reviews: Reviews. 1 credit. Params: slug*, page. ## Levels.fyi API https://perceptlayer.com/apis/levels - GET /v1/levels/job: Job. 1 credit. Params: job_id*. - GET /v1/levels/jobs: Jobs. 1 credit. Params: q, company, location, work_arrangement, min_base_compensation, posted_within_days, sort, page, limit, jobs_per_company. ## Lever API https://perceptlayer.com/apis/lever - GET /v1/lever/job: Job. 1 credit. Params: company*, job_id*. - GET /v1/lever/jobs: Jobs. 1 credit. Params: company*, skip, limit, location, team, department, commitment. ## LIFULL HOME'S API https://perceptlayer.com/apis/lifull-homes - GET /v1/lifull-homes/agency: Agency. 1 credit. Params: id*. - GET /v1/lifull-homes/areas: Areas. 1 credit. Params: prefecture*, query. - GET /v1/lifull-homes/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/lifull-homes/rent-listing: Rent Listing. 1 credit. Params: id*. - GET /v1/lifull-homes/rent-search: Rent Search. 1 credit. Params: prefecture*, city, rent_min, rent_max, area_min, area_max, walk_max, age_max, layouts, sort, page. - GET /v1/lifull-homes/sale-listing: Sale Listing. 1 credit. Params: id*, vertical*. - GET /v1/lifull-homes/sale-search: Sale Search. 1 credit. Params: prefecture*, property_type, city, price_min, price_max, area_min, area_max, land_area_min, land_area_max, walk_max, age_max, layouts, sort, page. ## Link in Bio API https://perceptlayer.com/apis/link-in-bio - GET /v1/link-in-bio/komi: Komi. 1 credit. Params: url, handle. - GET /v1/link-in-bio/linkbio: Linkbio. 1 credit. Params: url, handle. - GET /v1/link-in-bio/linkme: Linkme. 1 credit. Params: url, handle. - GET /v1/link-in-bio/linkme-social-grid: Linkme Social Grid. 1 credit. Params: url, handle, limit, cursor. - GET /v1/link-in-bio/linkme-social-grid-go: Linkme Social Grid Go. 1 credit. Params: item_id*. - GET /v1/link-in-bio/linktree: Linktree. 1 credit. Params: url, handle. - GET /v1/link-in-bio/pillar: Pillar. 1 credit. Params: url, handle. ## LinkedIn API https://perceptlayer.com/apis/linkedin - GET /v1/linkedin/ads-detail: Ads Detail. 1 credit. Params: ad_id*. - GET /v1/linkedin/ads-search: Ads Search. 1 credit. Params: keyword*, countries[], dateOption, startdate, enddate, accountOwner, pagination_token. - GET /v1/linkedin/company: Company. 1 credit. Params: url, company_id, use_cache, maximum_cache_age. - GET /v1/linkedin/company-posts: Company Posts. 1 credit. Params: slug*. - GET /v1/linkedin/job: Job. 1 credit. Params: url*, use_cache, maximum_cache_age. - GET /v1/linkedin/jobs-search: Jobs Search. 1 credit. Params: query*, num, start, page, hl, lr, gl, cr, safe, dateRestrict, sort, filter, rights. - GET /v1/linkedin/post: Post. 1 credit. Params: url*, use_cache, maximum_cache_age. - GET /v1/linkedin/post-transcript: Post Transcript. 1 credit. Params: url, activity_id. - GET /v1/linkedin/posts-search: Posts Search. 1 credit. Params: query*, num, start, page, hl, lr, gl, cr, safe, dateRestrict, sort, filter, rights. - GET /v1/linkedin/profile: Profile. 1 credit. Params: url, profile_id, use_cache, maximum_cache_age. - GET /v1/linkedin/search: Search. 1 credit. Params: query*, num, start, page, hl, lr, gl, cr, safe, dateRestrict, sort, filter, rights. ## Linktree API https://perceptlayer.com/apis/linktree - GET /v1/linktree/profile: Profile. 1 credit. Params: username*. - GET /v1/linktree/profiles: Profiles. 1 credit. Params: usernames*. ## LiveAuctioneers API https://perceptlayer.com/apis/liveauctioneers - GET /v1/liveauctioneers/auction: Auction. 1 credit. Params: id*. - GET /v1/liveauctioneers/lot: Lot. 1 credit. Params: id*. - GET /v1/liveauctioneers/search: Search. 1 credit. Params: searchTerm*, page, pageSize, sort. ## LLM Answers API https://perceptlayer.com/apis/llm-answers - GET /v1/llm-answers/answer: Answer. 1 credit. Params: prompt*, q, engine, model, timezone, locale, country, language, safesearch, continuation_token, device, history. - GET /v1/llm-answers/models: Models. 1 credit. Params: engine. - GET /v1/llm-answers/multi: Multi. 1–6 credits. 1 credit per engine that answers; engines lists up to 6, 2 by default. Params: prompt*, q, engines, timezone, locale, hl, gl. - GET /v1/llm-answers/perplexity-feed: Perplexity Feed. 1 credit. Params: limit, offset, topic, topics. - GET /v1/llm-answers/prompt-library: Prompt Library. 1 credit. - GET /v1/llm-answers/trending: Trending. 1 credit. ## Local Rank Tracker API https://perceptlayer.com/apis/local-rank-tracker - GET /v1/local-rank-tracker/grid: Grid. 1–81 credits. 1 credit per grid point searched: grid_size × grid_size points, from 9 to 81. Params: q*, place_id, data_id, cid, business_name, lat*, lon*, grid_size, spacing, unit, hl, gl. ## Loft API https://perceptlayer.com/apis/loft - GET /v1/loft/agency: Agency. 1 credit. Params: id*, listing_type, city, property_type[], sort, per_page, page. - GET /v1/loft/autocomplete: Autocomplete. 1 credit. Params: term*, city. - GET /v1/loft/listing: Listing. 1 credit. Params: id*. - GET /v1/loft/search: Search. 1 credit. Params: listing_type, city, neighborhood, query, property_type[], price_min, price_max, area_min, area_max, bedrooms, suites, bathrooms, parking_spots, exact_rooms, condo_fee_max, monthly_expenses_max, tags[], has_virtual_tour, has_decorated_photos, usage_type, product_type, agency_id, sort, per_page, page. ## Logic-Immo API https://perceptlayer.com/apis/logic-immo - GET /v1/logic-immo/agency: Agency. 1 credit. Params: id*. - GET /v1/logic-immo/autocomplete: Autocomplete. 1 credit. Params: q*, limit. - GET /v1/logic-immo/listing: Listing. 1 credit. Params: id, url. - GET /v1/logic-immo/places: Places. 1 credit. Params: ids*. - GET /v1/logic-immo/search: Search. 1 credit. Params: place_id*, distribution, estate_types[], new_build, year_built_min, order, page, per_page, price_min, price_max, size_min, size_max, rooms_min, rooms_max, bedrooms_min, bedrooms_max. ## LoopNet API https://perceptlayer.com/apis/loopnet - GET /v1/loopnet/locations: Locations. 1 credit. Params: query*. - GET /v1/loopnet/search: Search. 1 credit. Params: location*, listing_type, page. ## Macy's API https://perceptlayer.com/apis/macys - GET /v1/macys/categories: Categories. 1 credit. - GET /v1/macys/product: Product. 1 credit. Params: id, url. - GET /v1/macys/search: Search. 1 credit. Params: query, page, sort, category, category_url, brand, min_price, max_price. - GET /v1/macys/suggest: Suggest. 1 credit. Params: query*. ## Madlan API https://perceptlayer.com/apis/madlan - GET /v1/madlan/agent: Agent. 1 credit. Params: id*. - GET /v1/madlan/agents: Agents. 1 credit. Params: ids[]*. - GET /v1/madlan/agents-index: Agents Index. 1 credit. Params: city, role, offset, limit. - GET /v1/madlan/analytics-market-stats: Analytics Market Stats. 1 credit. - GET /v1/madlan/analytics-sales-history: Analytics Sales History. 1 credit. Params: period_years. - GET /v1/madlan/autocomplete: Autocomplete. 1 credit. Params: query*, types[]*, limit. - GET /v1/madlan/developer: Developer. 1 credit. Params: id*. - GET /v1/madlan/developer-history: Developer History. 1 credit. Params: id*. - GET /v1/madlan/developers: Developers. 1 credit. Params: city_doc_id, neighborhood_doc_id, publish_status, integration_level, offset, limit. - GET /v1/madlan/geo-addresses: Geo Addresses. 1 credit. Params: doc_ids[]*. - GET /v1/madlan/geo-doc-info: Geo Doc Info. 1 credit. Params: doc_ids[]*. - GET /v1/madlan/listings: Listings. 1 credit. Params: ids[]*. - GET /v1/madlan/listings-ids: Listings Ids. 1 credit. Params: offset, limit. - GET /v1/madlan/mortgage-offices: Mortgage Offices. 1 credit. Params: city_doc_ids[]*, limit, offset. - GET /v1/madlan/mortgage-offices-by-ids: Mortgage Offices By Ids. 1 credit. Params: office_ids[]*, limit, offset. - GET /v1/madlan/neighborhood-average-building-year: Neighborhood Average Building Year. 1 credit. Params: doc_id*. - GET /v1/madlan/neighborhood-data: Neighborhood Data. 1 credit. Params: doc_id*. - GET /v1/madlan/neighborhood-doc-insights: Neighborhood Doc Insights. 1 credit. Params: doc_id*. - GET /v1/madlan/neighborhood-insights: Neighborhood Insights. 1 credit. Params: doc_id*. - GET /v1/madlan/neighborhood-investor-summary: Neighborhood Investor Summary. 1 credit. Params: doc_id*. - GET /v1/madlan/neighborhood-permits-trend: Neighborhood Permits Trend. 1 credit. Params: doc_id*. - GET /v1/madlan/neighborhood-price-change: Neighborhood Price Change. 1 credit. Params: doc_id*, period_years. - GET /v1/madlan/neighborhood-projects: Neighborhood Projects. 1 credit. Params: doc_id*, limit. - GET /v1/madlan/neighborhoods: Neighborhoods. 1 credit. Params: city_doc_id*. - GET /v1/madlan/office-agents: Office Agents. 1 credit. Params: office_id*, shuffle. - GET /v1/madlan/office-listings: Office Listings. 1 credit. Params: office_id*, limit. - GET /v1/madlan/project: Project. 1 credit. Params: id*. - GET /v1/madlan/project-history: Project History. 1 credit. Params: id*. - GET /v1/madlan/projects: Projects. 1 credit. Params: offset, limit. - GET /v1/madlan/projects-browse: Projects Browse. 1 credit. Params: offset, limit. - GET /v1/madlan/school: School. 1 credit. Params: school_id*. - GET /v1/madlan/schools: Schools. 1 credit. Params: doc_id*, location_type, source. - GET /v1/madlan/search: Search. 1 credit. Params: query, deal_type, price_min, price_max, beds, floor, offset, limit. - GET /v1/madlan/search-popular-listings: Search Popular Listings. 1 credit. - GET /v1/madlan/search-report: Search Report. 1 credit. - GET /v1/madlan/valuation-gross-price: Valuation Gross Price. 1 credit. Params: net_price*. ## MagicBricks API https://perceptlayer.com/apis/magicbricks - GET /v1/magicbricks/autocomplete: Autocomplete. 1 credit. Params: query*, city, type. - GET /v1/magicbricks/cities: Cities. 1 credit. Params: group. - GET /v1/magicbricks/filters: Filters. 1 credit. Params: city*, category, property_type. - GET /v1/magicbricks/listing: Listing. 1 credit. Params: id*, slug. - GET /v1/magicbricks/localities: Localities. 1 credit. Params: city*, type, limit. - GET /v1/magicbricks/locality: Locality. 1 credit. Params: city*, locality. - GET /v1/magicbricks/price-trends: Price Trends. 1 credit. Params: city*, locality, project, property_type. - GET /v1/magicbricks/project: Project. 1 credit. Params: id*, slug. - GET /v1/magicbricks/projects: Projects. 1 credit. Params: city*, property_type*, page. - GET /v1/magicbricks/search: Search. 1 credit. Params: city*, category, property_type*, locality, keyword, page, limit. ## Marktplaats API https://perceptlayer.com/apis/marktplaats - GET /v1/marktplaats/categories: Categories. 1 credit. Params: category_id. - GET /v1/marktplaats/listing: Listing. 1 credit. Params: id*. - GET /v1/marktplaats/search: Search. 1 credit. Params: query, category_id, subcategory_ids[], limit, offset, sort_by, sort_order, min_price, max_price, postcode, distance_meters. ## Marktplaats Autos API https://perceptlayer.com/apis/marktplaats-autos - GET /v1/marktplaats-autos/facets: Facets. 1 credit. Params: domain*. - GET /v1/marktplaats-autos/listing: Listing. 1 credit. Params: itemId*, domain*, make, slug. - GET /v1/marktplaats-autos/search: Search. 1 credit. Params: domain*, l1CategoryId*, l2CategoryIds[], offset, limit, query, sortBy, sortOrder, sortAttribute, attributesById[], attributeRanges[], postcode, distanceMeters, searchInTitleAndDescription, viewOptions. - GET /v1/marktplaats-autos/seller: Seller. 1 credit. Params: sellerId*, domain*, sellerName. - GET /v1/marktplaats-autos/seller-listings: Seller Listings. 1 credit. Params: sellerId*, domain*, itemId*, l2CategoryId*. - GET /v1/marktplaats-autos/seller-response-rate: Seller Response Rate. 1 credit. Params: sellerId*, domain*. - GET /v1/marktplaats-autos/taxonomy: Taxonomy. 1 credit. Params: domain*. ## Mastodon API https://perceptlayer.com/apis/mastodon - GET /v1/mastodon/hashtag: Hashtag. 1 credit. Params: instance, tag*, limit, max_id, min_id, since_id, only_media, any[], all[], none[], local, remote. - GET /v1/mastodon/profile: Profile. 1 credit. Params: instance, acct*. - GET /v1/mastodon/search: Search. 1 credit. Params: instance, q*, type, resolve, limit, offset, exclude_unreviewed. - GET /v1/mastodon/status: Status. 1 credit. Params: instance, id*. - GET /v1/mastodon/statuses: Statuses. 1 credit. Params: instance, id*, limit, max_id, min_id, since_id, exclude_replies, exclude_reblogs, only_media, pinned, tagged. ## MediaMarkt API https://perceptlayer.com/apis/mediamarkt - GET /v1/mediamarkt/product: Product. 9 credits. Params: site, id, url. - GET /v1/mediamarkt/reviews: Reviews. 9 credits. Params: site, id, url, page. - GET /v1/mediamarkt/search: Search. 11 credits. Params: site, query, category, sort, price, min_price, max_price, brand, page. ## Medium API https://perceptlayer.com/apis/medium - GET /v1/medium/post: Post. 1 credit. Params: post_id*. - GET /v1/medium/search: Search. 1 credit. Params: query*, limit, page. - GET /v1/medium/tag: Tag. 1 credit. Params: tag*, limit, after. - GET /v1/medium/user: User. 1 credit. Params: username*, limit, from. ## Mercado Libre API https://perceptlayer.com/apis/mercadolibre - GET /v1/mercadolibre/categories: Categories. 1 credit. Params: site, category_id. - GET /v1/mercadolibre/category-attributes: Category Attributes. 1 credit. Params: category_id*. - GET /v1/mercadolibre/category-discovery: Category Discovery. 1 credit. Params: site*, q*, limit. - GET /v1/mercadolibre/category-products: Category Products. 1 credit. Params: site*, category_id*. - GET /v1/mercadolibre/related-products: Related Products. 1 credit. Params: site*, item_id, product_id, limit. - GET /v1/mercadolibre/review-summary: Review Summary. 1 credit. Params: site*, id*, id_type. - GET /v1/mercadolibre/reviews: Reviews. 1 credit. Params: site*, id*, id_type, limit, offset, rating, order. - GET /v1/mercadolibre/shipping-options: Shipping Options. 1 credit. Params: item_id*, zip_code*. - GET /v1/mercadolibre/store: Store. 1 credit. Params: site*, slug*, storefront_id*. - GET /v1/mercadolibre/stores: Stores. 1 credit. Params: site*, offset, limit. - GET /v1/mercadolibre/suggestions: Suggestions. 1 credit. Params: site*, q*, limit. ## Mercari API https://perceptlayer.com/apis/mercari - GET /v1/mercari/item: Item. 1 credit. Params: market*, id, url. - GET /v1/mercari/search: Search. 1 credit. Params: market*, query, category, brand, size, color, condition, min_price, max_price, status*, sort, shipping_payer, seller, page*. - GET /v1/mercari/seller: Seller. 1 credit. Params: market*, id*, status*, page*. ## Metrocuadrado API https://perceptlayer.com/apis/metrocuadrado - GET /v1/metrocuadrado/locations: Locations. 1 credit. Params: q*, mode, level. - GET /v1/metrocuadrado/project: Project. 1 credit. Params: project_code*. - GET /v1/metrocuadrado/property: Property. 1 credit. Params: id*. - GET /v1/metrocuadrado/search: Search. 1 credit. Params: business_type, property_type, status, city, zone, neighborhood, bedrooms, bathrooms, stratum, keyword, company_id, area_min, area_max, price_min, price_max, latitude, longitude, distance, sort, page, per_page, rich, ids. - GET /v1/metrocuadrado/types: Types. 1 credit. Params: type. ## Milanuncios API https://perceptlayer.com/apis/milanuncios - GET /v1/milanuncios/car-makes: Car Makes. 1 credit. - GET /v1/milanuncios/car-models: Car Models. 1 credit. Params: make_id*. - GET /v1/milanuncios/categories: Categories. 1 credit. - GET /v1/milanuncios/listing: Listing. 1 credit. Params: id*. - GET /v1/milanuncios/locations: Locations. 1 credit. Params: query*. - GET /v1/milanuncios/search: Search. 1 credit. Params: category*, query, province, min_price, max_price, seller_type, bedrooms_from, surface_from, brand_id, model_id, fuel, year_from, sort*, limit*, offset*. ## Mixcloud API https://perceptlayer.com/apis/mixcloud - GET /v1/mixcloud/cloudcast: Cloudcast. 1 credit. Params: key*. - GET /v1/mixcloud/search: Search. 1 credit. Params: q*, type, limit, offset. - GET /v1/mixcloud/tag: Tag. 1 credit. Params: tag*, sort, limit, offset. - GET /v1/mixcloud/user: User. 1 credit. Params: username*. - GET /v1/mixcloud/user-uploads: User Uploads. 1 credit. Params: username*, limit, until, offset. ## mobile.de API https://perceptlayer.com/apis/mobile-de - GET /v1/mobile-de/dealer-inventory: Dealer Inventory. 1 credit. Params: vehicle_type, offset, limit, query, price_min, price_max, registration_year_min, registration_year_max, mileage_min, mileage_max, fuel[], transmission[], price_rating[], make_id, model_id, sort, dealer_id*. - GET /v1/mobile-de/dealer-rating: Dealer Rating. 1 credit. Params: dealer_id*. - GET /v1/mobile-de/listing: Listing. 1 credit. Params: listing_id*. - GET /v1/mobile-de/recommendations: Recommendations. 1 credit. Params: listing_id*. - GET /v1/mobile-de/search: Search. 1 credit. Params: vehicle_type, offset, limit, query, price_min, price_max, registration_year_min, registration_year_max, mileage_min, mileage_max, fuel[], transmission[], price_rating[], make_id, model_id, sort, include[]. ## Monster API https://perceptlayer.com/apis/monster - GET /v1/monster/autocomplete-location: Autocomplete Location. 1 credit. Params: q*, limit. - GET /v1/monster/autocomplete-title: Autocomplete Title. 1 credit. Params: q*, limit. - GET /v1/monster/job: Job. 1 credit. Params: job_id*, site. - GET /v1/monster/search: Search. 1 credit. Params: q, location, radius, date_posted, job_type, remote, site, page. ## Morizon API https://perceptlayer.com/apis/morizon - GET /v1/morizon/agency: Agency. 1 credit. Params: company_id*, company_name, transaction, type, sort, page. - GET /v1/morizon/listing: Listing. 1 credit. Params: id, url. - GET /v1/morizon/locations: Locations. 1 credit. Params: q*, limit, cursor, type, transaction. - GET /v1/morizon/search: Search. 1 credit. Params: transaction, type, location, price_min, price_max, area_min, area_max, rooms_min, rooms_max, market, owner_type, floor_min, floor_max, build_year_min, build_year_max, price_m2_min, price_m2_max, plot_area_min, plot_area_max, balcony, garden, terrace, elevator, basement, parking, last_floor, with_photo, with_3d_view, added_since, agency_id, agency_name, sort, page. ## Motors.co.uk API https://perceptlayer.com/apis/motors-co-uk - GET /v1/motors-co-uk/dealer: Dealer. 1 credit. Params: dealer_id*, postcode, radius, sort, page, page_size. - GET /v1/motors-co-uk/listing: Listing. 1 credit. Params: id*. - GET /v1/motors-co-uk/makes: Makes. 1 credit. Params: vehicle_type. - GET /v1/motors-co-uk/models: Models. 1 credit. Params: make*, vehicle_type. - GET /v1/motors-co-uk/search: Search. 1 credit. Params: postcode*, radius, vehicle_type, make, model, min_price, max_price, max_mileage, max_age, fuel_type, body_type, transmission, sort, page, page_size. ## Movoto API https://perceptlayer.com/apis/movoto - GET /v1/movoto/amenity-tags: Amenity Tags. 1 credit. Params: query*, postal_code, limit. - GET /v1/movoto/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/movoto/listing: Listing. 1 credit. Params: url*. - GET /v1/movoto/search: Search. 1 credit. Params: location*, listing_type, property_type, min_price, max_price, min_beds, max_beds, min_baths, max_baths, page. ## Mubawab API https://perceptlayer.com/apis/mubawab - GET /v1/mubawab/agency: Agency. 1 credit. Params: id*, country, language. - GET /v1/mubawab/autocomplete: Autocomplete. 1 credit. Params: query*, country, limit. - GET /v1/mubawab/filters: Filters. 1 credit. - GET /v1/mubawab/listing: Listing. 1 credit. Params: url, id, kind, country, language. - GET /v1/mubawab/search: Search. 1 credit. Params: country, language, transaction, property_type, location, sort, page, min_price, max_price, min_area, max_area, min_rooms, min_bedrooms, min_bathrooms, promotion, second_hand, pool, elevator, garden. ## Mudah.my Property API https://perceptlayer.com/apis/mudah-my-property - GET /v1/mudah-my-property/agent: Agent. 1 credit. Params: slug*. - GET /v1/mudah-my-property/autocomplete: Autocomplete. 1 credit. Params: keyword*, type, listing_type. - GET /v1/mudah-my-property/building: Building. 1 credit. Params: prop_id*. - GET /v1/mudah-my-property/buildings: Buildings. 1 credit. Params: keyword*, page. - GET /v1/mudah-my-property/count: Count. 1 credit. Params: listing_type, category, region, subarea, building_id, q, bedrooms, bathrooms, property_type_id, furnished_id, min_price, max_price, min_size, max_size, store, user_id. - GET /v1/mudah-my-property/listing: Listing. 1 credit. Params: list_id*. - GET /v1/mudah-my-property/reference: Reference. 1 credit. - GET /v1/mudah-my-property/search: Search. 1 credit. Params: listing_type, category, region, subarea, building_id, q, bedrooms, bathrooms, property_type_id, furnished_id, min_price, max_price, min_size, max_size, store, user_id, sort, page. - GET /v1/mudah-my-property/seller-listings: Seller Listings. 1 credit. Params: listing_type, category, region, subarea, building_id, q, bedrooms, bathrooms, property_type_id, furnished_id, min_price, max_price, min_size, max_size, store, user_id, sort, page. ## MyAnimeList API https://perceptlayer.com/apis/myanimelist - GET /v1/myanimelist/anime: Anime. 1 credit. Params: id*. - GET /v1/myanimelist/manga: Manga. 1 credit. Params: id*. - GET /v1/myanimelist/search: Search. 1 credit. Params: q*, type. - GET /v1/myanimelist/season: Season. 1 credit. Params: year*, season*. - GET /v1/myanimelist/top: Top. 1 credit. Params: type*, limit, media. - GET /v1/myanimelist/user: User. 1 credit. Params: username*. ## MyHome.ie API https://perceptlayer.com/apis/myhome-ie - GET /v1/myhome-ie/agencies: Agencies. 1 credit. Params: name, region_id, page, page_size. - GET /v1/myhome-ie/agency: Agency. 1 credit. Params: id*. - GET /v1/myhome-ie/agency-listings: Agency Listings. 1 credit. Params: id*, listing_type, page, page_size. - GET /v1/myhome-ie/listing: Listing. 1 credit. Params: id*. - GET /v1/myhome-ie/locations: Locations. 1 credit. Params: region_id, q. - GET /v1/myhome-ie/search: Search. 1 credit. Params: listing_type, location, locality_ids, property_type_ids, min_price, max_price, min_beds, max_beds, min_baths, min_size, max_size, sort, page, page_size. ## Myntra API https://perceptlayer.com/apis/myntra - GET /v1/myntra/product: Product. 1 credit. Params: id, url. - GET /v1/myntra/reviews: Reviews. 1 credit. Params: id*, page, per_page, sort, rating. - GET /v1/myntra/search: Search. 1 credit. Params: query*, page, per_page, sort, brand, color, size, min_price, max_price. ## Mytheresa API https://perceptlayer.com/apis/mytheresa - GET /v1/mytheresa/designers: Designers. 1 credit. Params: country, gender. - GET /v1/mytheresa/product: Product. 1 credit. Params: url, slug, country, gender. - GET /v1/mytheresa/search: Search. 1 credit. Params: designer, category, sale_only, size, color, sort, page, size_per_page, country, gender. ## Naukri API https://perceptlayer.com/apis/naukri - GET /v1/naukri/job: Job. 1 credit. Params: id*. - GET /v1/naukri/search: Search. 1 credit. Params: keyword*, location, experience, salary[], posted_within_days, sort, work_mode, page, per_page. ## Naver API https://perceptlayer.com/apis/naver - GET /v1/naver/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/naver/maps: Maps. 1 credit. Params: query*, category, limit, page. - GET /v1/naver/search: Search. 1 credit. Params: query*, where, start, sort. ## Naver Shopping API https://perceptlayer.com/apis/naver-shopping - GET /v1/naver-shopping/search: Search. 1 credit. Params: query*, sort, price, page, free_delivery, review_score_low_limit, fast_delivery, arrive_guarantee, allow_ads. ## Nehnutelnosti.sk API https://perceptlayer.com/apis/nehnutelnosti - GET /v1/nehnutelnosti/agency: Agency. 1 credit. Params: slug*, id, page. - GET /v1/nehnutelnosti/agent: Agent. 1 credit. Params: slug*, id*, page. - GET /v1/nehnutelnosti/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/nehnutelnosti/listing: Listing. 1 credit. Params: id*, slug, url. - GET /v1/nehnutelnosti/search: Search. 1 credit. Params: location*, listing_type, property_type, rooms, min_price, max_price, min_area, max_area, sort, page. ## Nepremičnine.net API https://perceptlayer.com/apis/nepremicnine - GET /v1/nepremicnine/administrative-units: Administrative Units. 1 credit. - GET /v1/nepremicnine/agency: Agency. 1 credit. Params: agency_id*, deal_type, page. - GET /v1/nepremicnine/listing: Listing. 1 credit. Params: id*. - GET /v1/nepremicnine/location-autocomplete: Location Autocomplete. 1 credit. Params: query*, unit_id. - GET /v1/nepremicnine/property-types: Property Types. 1 credit. - GET /v1/nepremicnine/search: Search. 1 credit. Params: deal_type, property_type, rooms_type, region, unit_id, min_price, max_price, min_area, max_area, min_year, last_24h, page. - GET /v1/nepremicnine/settlements: Settlements. 1 credit. Params: unit_id*. ## Newegg API https://perceptlayer.com/apis/newegg - GET /v1/newegg/deals: Deals. 5 credits. Params: day, site. - GET /v1/newegg/product: Product. 2 credits. Params: item_number, url, site. - GET /v1/newegg/reviews: Reviews. 2 credits. Params: item_number*, sort, rating, page, per_page, site. - GET /v1/newegg/search: Search. 1 credit. Params: query*, min_price, max_price, sort, page, site. ## Nhà Tốt API https://perceptlayer.com/apis/nha-tot - GET /v1/nha-tot/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/nha-tot/listing: Listing. 1 credit. Params: id*. - GET /v1/nha-tot/projects: Projects. 1 credit. Params: q*. - GET /v1/nha-tot/regions: Regions. 1 credit. Params: region_id. - GET /v1/nha-tot/search: Search. 1 credit. Params: for*, category, region_id, district_id, ward_id, min_price, max_price, min_area, max_area, bedrooms, bathrooms, direction, legal_document, apartment_type, keyword, account_id, project_oid, sort, page, per_page. - GET /v1/nha-tot/seller: Seller. 1 credit. Params: oid*. - GET /v1/nha-tot/wards: Wards. 1 credit. Params: district_id*. ## Nike API https://perceptlayer.com/apis/nike - GET /v1/nike/launches: Launches. 1 credit. Params: country. - GET /v1/nike/product: Product. 1–3 credits. 1 credit, or 3 with include_details. Params: style_code, url, country, include_details. - GET /v1/nike/search: Search. 1 credit. Params: query, category, gender, size, color, price_min, price_max, sale_only, sort, page, country. ## Nintendo eShop API https://perceptlayer.com/apis/nintendo - GET /v1/nintendo/deals: Deals. 1 credit. Params: region, page. - GET /v1/nintendo/game: Game. 1 credit. Params: id*, region, page. - GET /v1/nintendo/search: Search. 1 credit. Params: query*, region, page. ## Njuškalo API https://perceptlayer.com/apis/njuskalo - GET /v1/njuskalo/agency: Agency. 1 credit. Params: slug*, page. - GET /v1/njuskalo/listing: Listing. 1 credit. Params: url, id, slug. - GET /v1/njuskalo/locations: Locations. 1 credit. Params: query*. - GET /v1/njuskalo/search: Search. 1 credit. Params: category*, location, price_min, price_max, area_min, area_max, rooms_min, rooms_max, sort, page. ## NoBroker API https://perceptlayer.com/apis/nobroker - GET /v1/nobroker/autocomplete: Autocomplete. 1 credit. Params: query*, city*, service, limit. - GET /v1/nobroker/listing: Listing. 1 credit. Params: id*, service*. - GET /v1/nobroker/search: Search. 1 credit. Params: service*, city*, place_id, location, lat, lon, radius, bedrooms, price_min, price_max, rent_min, rent_max, furnishing, property_type, bathrooms_min, area_min, area_max, sort, order, page. ## Noon API https://perceptlayer.com/apis/noon - GET /v1/noon/product: Product. 1–9 credits. 1 credit for most calls, 9 when the store can only be reached by a costlier route. Params: id*, url, country*. - GET /v1/noon/reviews: Reviews. 1–9 credits. 1 credit for most calls, 9 when the store can only be reached by a costlier route. Params: id*, country*, page*. - GET /v1/noon/search: Search. 1–9 credits. 1 credit for most calls, 9 when the store can only be reached by a costlier route. Params: query*, country*, category, sort, dir, price, min_price, max_price, brand, deal_tag, page*. ## North Data API https://perceptlayer.com/apis/north-data - GET /v1/north-data/changes: Changes. 1 credit. Params: country*, min_date*, max_date*. - GET /v1/north-data/company: Company. 1 credit. Params: uri*. - GET /v1/north-data/event: Event. 1 credit. Params: id*. - GET /v1/north-data/feed: Feed. 1 credit. Params: company_id, limit*. - GET /v1/north-data/nearby: Nearby. 1 credit. Params: lat*, lng*, max_distance, offset*. - GET /v1/north-data/person: Person. 1 credit. Params: uri*. - GET /v1/north-data/person-search: Person Search. 1 credit. Params: query*, offset*. - GET /v1/north-data/search: Search. 1 credit. Params: query*, offset*. - GET /v1/north-data/segments: Segments. 1 credit. Params: standard*. - GET /v1/north-data/sources: Sources. 1 credit. - GET /v1/north-data/suggest: Suggest. 1 credit. Params: query*, countries[]. ## Notino API https://perceptlayer.com/apis/notino - GET /v1/notino/product: Product. 1 credit. Params: id, url. - GET /v1/notino/reviews: Reviews. 1 credit. Params: id, url, slug. - GET /v1/notino/search: Search. 1 credit. Params: query*. ## npm API https://perceptlayer.com/apis/npm - GET /v1/npm/package: Package. 1 credit. Params: package*, version, include_versions, include_readme. - GET /v1/npm/search: Search. 1 credit. Params: q*, size, page. ## Odysee API https://perceptlayer.com/apis/odysee - GET /v1/odysee/channel: Channel. 1 credit. Params: name*, page, page_size. - GET /v1/odysee/search: Search. 1 credit. Params: q*, page, page_size, order_by. - GET /v1/odysee/trending: Trending. 1 credit. Params: page, page_size. - GET /v1/odysee/video: Video. 1 credit. Params: url*. ## OfferUp API https://perceptlayer.com/apis/offerup - GET /v1/offerup/categories: Categories. 1 credit. Params: exclude_l3. - GET /v1/offerup/geocode: Geocode. 1 credit. Params: zipcode, query. - GET /v1/offerup/item-details: Item Details. 1 credit. Params: listing_id*. - GET /v1/offerup/search: Search. 1 credit. Params: q, cid, category_id, zipcode, lat, lon, radius, price_min, price_max, condition, sort, page_cursor, search_session_id. - GET /v1/offerup/seller-listings: Seller Listings. 1 credit. Params: user_id*, page_cursor, limit. - GET /v1/offerup/seller-profile: Seller Profile. 1 credit. Params: user_id*. - GET /v1/offerup/suggestions: Suggestions. 1 credit. Params: prefix*. ## Ohne-Makler API https://perceptlayer.com/apis/ohnemakler - GET /v1/ohnemakler/listing: Listing. 1 credit. Params: id*. - GET /v1/ohnemakler/locations: Locations. 1 credit. Params: term, type, limit. - GET /v1/ohnemakler/market-immobilienpreise: Market Immobilienpreise. 1 credit. Params: state*, city. - GET /v1/ohnemakler/market-mietspiegel: Market Mietspiegel. 1 credit. Params: state*, city*. - GET /v1/ohnemakler/search: Search. 1 credit. Params: q, type, transaction, state, city, page, sort, price_min, price_max, area_min, area_max, radius. ## Oikotie API https://perceptlayer.com/apis/oikotie - GET /v1/oikotie/agency: Agency. 1 credit. Params: company_id, card_id, include_brokers. - GET /v1/oikotie/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/oikotie/listing: Listing. 1 credit. Params: card_id*. - GET /v1/oikotie/search: Search. 1 credit. Params: listing_type, location_id, location_type, location_name, price_min, price_max, size_min, size_max, rooms[], building_type[], habitation_type[], new_development, construction_year_min, construction_year_max, lot_size_min, sort, page, limit. ## OLX Poland API https://perceptlayer.com/apis/olx-pl - GET /v1/olx-pl/cities: Cities. 1 credit. Params: region_id*, limit. - GET /v1/olx-pl/districts: Districts. 1 credit. Params: city_id*. - GET /v1/olx-pl/listing: Listing. 1 credit. Params: id*. - GET /v1/olx-pl/locations: Locations. 1 credit. Params: query*. - GET /v1/olx-pl/regions: Regions. 1 credit. - GET /v1/olx-pl/search: Search. 1 credit. Params: query, category_id, region_id, city_id, district_id, distance, price_from, price_to, owner_type, sort_by, offset, limit. ## Omio API https://perceptlayer.com/apis/omio - GET /v1/omio/places: Places. 1 credit. Params: query, id, departure_id, locale. - GET /v1/omio/providers: Providers. 1 credit. Params: search_id, lang. - GET /v1/omio/route-page: Route Page. 1 credit. Params: origin*, destination*, mode. - GET /v1/omio/search: Search. 1 credit. Params: origin_id*, destination_id*, adults, children, infants, travel_mode[], currency, date*, return_date, sort, limit, page. - GET /v1/omio/search-summary: Search Summary. 1 credit. Params: origin_id*, destination_id*, adults, children, infants, travel_mode[], currency, date_start*, date_end*, calendar. - GET /v1/omio/trip: Trip. 1 credit. Params: search_id*, trip_id*. ## OneRoof API https://perceptlayer.com/apis/oneroof - GET /v1/oneroof/agency: Agency. 1 credit. Params: id*. - GET /v1/oneroof/agent: Agent. 1 credit. Params: id*. - GET /v1/oneroof/autocomplete: Autocomplete. 1 credit. Params: q*, type. - GET /v1/oneroof/listing: Listing. 1 credit. Params: id*. - GET /v1/oneroof/search: Search. 1 credit. Params: type*, region_id, district_id, suburb_id, bedrooms[], bathrooms, carparks, category, price_min, price_max, land_area_min, land_area_max, floor_area_min, floor_area_max, office_id, agent_id, new_homes, sort, page, per_page. ## OnTheMarket API https://perceptlayer.com/apis/onthemarket - GET /v1/onthemarket/agent: Agent. 1 credit. Params: slug*. - GET /v1/onthemarket/agent-listings: Agent Listings. 1 credit. Params: slug*, search_type*, page, under_offer, let_agreed. - GET /v1/onthemarket/listing: Listing. 1 credit. Params: id*. - GET /v1/onthemarket/search: Search. 1 credit. Params: search_type*, location_id*, page, sort_field, direction, prop_types, min_price, max_price, min_bedrooms, max_bedrooms, radius, under_offer, let_agreed, exclusive_first, new_home_flag. ## OpenRent API https://perceptlayer.com/apis/openrent - GET /v1/openrent/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/openrent/landlord: Landlord. 1 credit. Params: id*, page, live_only. - GET /v1/openrent/property: Property. 1 credit. Params: id*. - GET /v1/openrent/search: Search. 1 credit. Params: location*, min_price, max_price, min_bedrooms, max_bedrooms, min_bathrooms, max_bathrooms, property_type, furnished, available_before, max_min_tenancy, sort, page, pets_allowed, students_allowed, families_allowed, dss_accepted, bills_included, has_garden, has_parking, has_fireplace, has_video, live_only. ## OpenTable API https://perceptlayer.com/apis/opentable - GET /v1/opentable/restaurant: Restaurant. 1 credit. Params: restaurant_id, url, country. - GET /v1/opentable/reviews: Reviews. 1 credit. Params: restaurant_id, url, country, sort, page, per_page, query. - GET /v1/opentable/search: Search. 1 credit. Params: query*, location, latitude, longitude, type. ## Otodom API https://perceptlayer.com/apis/otodom - GET /v1/otodom/count: Count. 1 credit. Params: transaction*, geo_path*, estate, market, use_types[], rooms_number[], owner_type, price_min, price_max, area_min, area_max, has_discount. - GET /v1/otodom/development: Development. 1 credit. Params: slug*. - GET /v1/otodom/locations: Locations. 1 credit. Params: query*, limit. - GET /v1/otodom/property: Property. 1 credit. Params: id*. - GET /v1/otodom/search: Search. 1 credit. Params: transaction*, estate_slug*, geo_path*, price_min, price_max, area_min, area_max, price_per_meter_min, build_year_min, floors_number_min, days_since_created, rooms_number[], extras[], owner_type, is_private_owner, has_discount, view_type, distance_radius, by, direction, page, limit. ## Otomoto API https://perceptlayer.com/apis/otomoto - GET /v1/otomoto/dealer: Dealer. 1 credit. Params: subdomain, url. - GET /v1/otomoto/listing: Listing. 1 credit. Params: listing_id, url. - GET /v1/otomoto/search: Search. 1 credit. Params: make_id, model_id, generation, price_min, price_max, year_min, year_max, mileage_min, mileage_max, engine_power_max, fuel[], transmission[], body_type[], city_id, dist, sort, page. - GET /v1/otomoto/taxonomy: Taxonomy. 1 credit. Params: make_id. ## OTTO API https://perceptlayer.com/apis/otto - GET /v1/otto/product: Product. 2 credits. Params: url, id, variation_id. - GET /v1/otto/reviews: Reviews. 1 credit. Params: id, url, page. - GET /v1/otto/search: Search. 1 credit. Params: query*, brand, color, min_price, max_price, on_sale, sort, page. - GET /v1/otto/suggest: Suggest. 1 credit. Params: query*, limit. ## Ouest-France Immo API https://perceptlayer.com/apis/ouest-france-immo - GET /v1/ouest-france-immo/agencies: Agencies. 1 credit. Params: place_id, query, page, limit. - GET /v1/ouest-france-immo/agency: Agency. 1 credit. Params: id*. - GET /v1/ouest-france-immo/agency-listings: Agency Listings. 1 credit. Params: id*, listing_type, property_type, page, limit. - GET /v1/ouest-france-immo/autocomplete: Autocomplete. 1 credit. Params: query*, type, limit. - GET /v1/ouest-france-immo/listing: Listing. 1 credit. Params: id*. - GET /v1/ouest-france-immo/listings: Listings. 1 credit. Params: ids*. - GET /v1/ouest-france-immo/place: Place. 1 credit. Params: id*. - GET /v1/ouest-france-immo/search: Search. 1 credit. Params: listing_type*, property_type, place_id, min_price, max_price, min_area, min_bedrooms, min_rooms, sort, page, limit. ## Owler API https://perceptlayer.com/apis/owler - GET /v1/owler/acquisitions: Acquisitions. 1 credit. Params: slug*, limit, offset. - GET /v1/owler/company: Company. 1 credit. Params: slug*. - GET /v1/owler/competitors: Competitors. 1 credit. Params: slug*. - GET /v1/owler/funding: Funding. 1 credit. Params: slug*. - GET /v1/owler/investments: Investments. 1 credit. Params: slug*, limit, offset. - GET /v1/owler/news: News. 1 credit. Params: slug*, start, limit, category. - GET /v1/owler/search: Search. 1 credit. Params: query*. - GET /v1/owler/similar: Similar. 1 credit. Params: slug*. ## PadMapper API https://perceptlayer.com/apis/padmapper - GET /v1/padmapper/agent: Agent. 1 credit. Params: agent_url*. - GET /v1/padmapper/autocomplete: Autocomplete. 1 credit. Params: query*, exclude_buildings. - GET /v1/padmapper/building: Building. 1 credit. Params: building_id*. - GET /v1/padmapper/building-additional: Building Additional. 1 credit. Params: building_id*. - GET /v1/padmapper/building-fees: Building Fees. 1 credit. Params: building_id*. - GET /v1/padmapper/building-pros-cons: Building Pros Cons. 1 credit. Params: building_id*. - GET /v1/padmapper/building-rating: Building Rating. 1 credit. Params: building_id*. - GET /v1/padmapper/building-resident-quotes: Building Resident Quotes. 1 credit. Params: building_id*. - GET /v1/padmapper/city: City. 1 credit. Params: city*. - GET /v1/padmapper/geos: Geos. 1 credit. Params: location*. - GET /v1/padmapper/geosearch: Geosearch. 1 credit. Params: query*. - GET /v1/padmapper/listing: Listing. 1 credit. Params: listing_id*. - GET /v1/padmapper/listing-fees: Listing Fees. 1 credit. Params: listing_id*. - GET /v1/padmapper/map-pins: Map Pins. 1 credit. Params: min_lat*, max_lat*, min_lng*, max_lng*, limit. - GET /v1/padmapper/neighborhoods: Neighborhoods. 1 credit. Params: min_lat*, max_lat*, min_lng*, max_lng*, hood_type. - GET /v1/padmapper/rent-report: Rent Report. 1 credit. Params: city*. - GET /v1/padmapper/search: Search. 1 credit. Params: location*, min_price, max_price, bedrooms, min_bathrooms, pets, categories, sort, page, limit. - GET /v1/padmapper/total: Total. 1 credit. Params: location*. ## ParuVendu Immobilier API https://perceptlayer.com/apis/paruvendu - GET /v1/paruvendu/agencies: Agencies. 1 credit. Params: area*, page. - GET /v1/paruvendu/agency: Agency. 1 credit. Params: slug*. - GET /v1/paruvendu/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/paruvendu/listing: Listing. 1 credit. Params: listing_id*. - GET /v1/paruvendu/listing-location: Listing Location. 1 credit. Params: listing_id*. - GET /v1/paruvendu/reference: Reference. 1 credit. - GET /v1/paruvendu/search: Search. 1 credit. Params: listing_type, property_type, place*, rooms, min_price, max_price, min_area, max_area, min_bedrooms, min_bathrooms, seller, with_photos, sort, page. ## Patreon API https://perceptlayer.com/apis/patreon - GET /v1/patreon/creator: Creator. 1 credit. Params: vanity*. - GET /v1/patreon/posts: Posts. 1 credit. Params: campaign_id*, cursor, page[count]. - GET /v1/patreon/search: Search. 1 credit. Params: q*, page[size]. ## Pinterest API https://perceptlayer.com/apis/pinterest - GET /v1/pinterest/board: Board. 1 credit. Params: board_id, username, slug. - GET /v1/pinterest/board-pins: Board Pins. 1 credit. Params: board_id, username, slug, limit, bookmark. - GET /v1/pinterest/pin: Pin. 1 credit. Params: pin_id*. - GET /v1/pinterest/search: Search. 1 credit. Params: query*, limit, bookmark. - GET /v1/pinterest/user-boards: User Boards. 1 credit. Params: username*, limit, bookmark. - GET /v1/pinterest/user-profile: User Profile. 1 credit. Params: username*. ## pisos.com API https://perceptlayer.com/apis/pisos-com - GET /v1/pisos-com/agency: Agency. 1 credit. Params: slug*. - GET /v1/pisos-com/agency-listings: Agency Listings. 1 credit. Params: slug*, operation, sort, page. - GET /v1/pisos-com/autocomplete: Autocomplete. 1 credit. Params: query*, operation. - GET /v1/pisos-com/listing: Listing. 1 credit. Params: url, id. - GET /v1/pisos-com/search: Search. 1 credit. Params: operation, location*, property_type, min_price, max_price, bedrooms, bathrooms, min_size, features[], has_photo, reduced_price, sort, page. ## PitchBook API https://perceptlayer.com/apis/pitchbook - GET /v1/pitchbook/advisor: Advisor. 1 credit. Params: id*. - GET /v1/pitchbook/company: Company. 1 credit. Params: id*. - GET /v1/pitchbook/fund: Fund. 1 credit. Params: id*. - GET /v1/pitchbook/investor: Investor. 1 credit. Params: id*. - GET /v1/pitchbook/limited-partner: Limited Partner. 1 credit. Params: id*. - GET /v1/pitchbook/news: News. 1 credit. Params: source*, tag, file, offset, limit. - GET /v1/pitchbook/sitemap: Sitemap. 1 credit. Params: family*, file, offset, limit. ## PlayStation Store API https://perceptlayer.com/apis/playstation - GET /v1/playstation/deals: Deals. 1 credit. Params: region, page. - GET /v1/playstation/game: Game. 1 credit. Params: id*, region, page. - GET /v1/playstation/search: Search. 1 credit. Params: query*, region, page. ## Plusvalía API https://perceptlayer.com/apis/plusvalia - GET /v1/plusvalia/agency: Agency. 1 credit. Params: url, id, page. - GET /v1/plusvalia/listing: Listing. 1 credit. Params: url, id. - GET /v1/plusvalia/locations: Locations. 1 credit. Params: query*, limit. - GET /v1/plusvalia/search: Search. 1 credit. Params: operation, type, location, min_price, max_price, min_bedrooms, max_bedrooms, min_bathrooms, min_garages, min_area, max_area, q, address, sort, page. ## Point2 API https://perceptlayer.com/apis/point2 - GET /v1/point2/autocomplete: Autocomplete. 1 credit. Params: query*, country*, limit. - GET /v1/point2/listing: Listing. 1 credit. Params: url*. - GET /v1/point2/search: Search. 1 credit. Params: country*, state*, city*, page, bedrooms[], bathrooms[], property_type[], pet_policy[], amenities[], price_min, price_max, square_feet_min, square_feet_max, available_now, sort. ## Poshmark API https://perceptlayer.com/apis/poshmark - GET /v1/poshmark/closet: Closet. 1 credit. Params: username*, availability, sort, cursor, page, country. - GET /v1/poshmark/listing: Listing. 1 credit. Params: id, url, country. - GET /v1/poshmark/search: Search. 1 credit. Params: query, brand[], category, category_feature, department, size[], condition[], color[], price_min, price_max, availability, sort, cursor, page, count, country. - GET /v1/poshmark/suggestions: Suggestions. 1 credit. Params: query*, country. ## PriceCharting API https://perceptlayer.com/apis/pricecharting - GET /v1/pricecharting/price-history: Price History. 1 credit. Params: url, id. - GET /v1/pricecharting/product: Product. 1 credit. Params: url, id. - GET /v1/pricecharting/search: Search. 1 credit. Params: query*, page*, size*. ## Private Property API https://perceptlayer.com/apis/private-property - GET /v1/private-property/developments-detail: Developments Detail. 1 credit. Params: development_id*. - GET /v1/private-property/developments-search: Developments Search. 1 credit. Params: location_id, location_name, location_descriptor, location_shape_type, min_price, max_price, page. - GET /v1/private-property/listings-search: Listings Search. 1 credit. Params: type, deal_type, location_id, location_name, location_descriptor, location_shape_type, min_price, max_price, min_bedrooms, min_baths, rental_price_type, page, has_pool, has_staff_quarters, has_flatlets, has_borehole, has_scenic_view, has_alarm, has_electric_fencing, has_security_post, has_access_gate, has_intercom, sub_category[]. - GET /v1/private-property/locations-autocomplete: Locations Autocomplete. 1 credit. Params: q*. - GET /v1/private-property/locations-children: Locations Children. 1 credit. Params: shape_id*. - GET /v1/private-property/locations-suggested: Locations Suggested. 1 credit. Params: shape_ids[]*. - GET /v1/private-property/reference-bond-rate: Reference Bond Rate. 1 credit. ## Product Hunt API https://perceptlayer.com/apis/producthunt - GET /v1/producthunt/categories: Categories. 1 credit. Params: query, first, after, page, filter, order. - GET /v1/producthunt/categories-detail: Categories Detail. 1 credit. Params: slug*, username, comment, first, after, order. - GET /v1/producthunt/collections: Collections. 1 credit. Params: query, first, after, page, filter, order. - GET /v1/producthunt/forums: Forums. 1 credit. Params: query, first, after, page, filter, order. - GET /v1/producthunt/forums-detail: Forums Detail. 1 credit. Params: slug*, username, comment, first, after, order. - GET /v1/producthunt/leaderboard-daily: Leaderboard Daily. 1 credit. Params: year*, order, featured, after, month*, day*. - GET /v1/producthunt/leaderboard-monthly: Leaderboard Monthly. 1 credit. Params: year*, order, featured, after, month*. - GET /v1/producthunt/leaderboard-weekly: Leaderboard Weekly. 1 credit. Params: year*, order, featured, after, week*. - GET /v1/producthunt/leaderboard-yearly: Leaderboard Yearly. 1 credit. Params: year*, order, featured, after. - GET /v1/producthunt/makers: Makers. 1 credit. Params: username*, slug, comment, first, after, order. - GET /v1/producthunt/posts: Posts. 1 credit. Params: slug*, username, comment, first, after, order. - GET /v1/producthunt/posts-comments: Posts Comments. 1 credit. Params: slug*, username, comment, first, after, order. - GET /v1/producthunt/posts-comments-replies: Posts Comments Replies. 1 credit. Params: slug*, comment*, username, first, after, order. - GET /v1/producthunt/posts-search: Posts Search. 1 credit. Params: query, first, after, page, filter, order. - GET /v1/producthunt/products: Products. 1 credit. Params: slug*, username, comment, first, after, order. - GET /v1/producthunt/products-launches: Products Launches. 1 credit. Params: slug*, username, comment, first, after, order. - GET /v1/producthunt/products-reviews: Products Reviews. 1 credit. Params: slug*, username, comment, first, after, order. - GET /v1/producthunt/products-search: Products Search. 1 credit. Params: query, first, after, page, filter, order. - GET /v1/producthunt/topics: Topics. 1 credit. Params: query, first, after, page, filter, order. - GET /v1/producthunt/topics-detail: Topics Detail. 1 credit. Params: slug*, username, comment, first, after, order. - GET /v1/producthunt/topics-posts: Topics Posts. 1 credit. Params: slug*, username, comment, first, after, order. ## Properati API https://perceptlayer.com/apis/properati - GET /v1/properati/agency: Agency. 1 credit. Params: id*, operation, page. - GET /v1/properati/autocomplete: Autocomplete. 1 credit. Params: q*, limit. - GET /v1/properati/listing: Listing. 1 credit. Params: id*. - GET /v1/properati/search: Search. 1 credit. Params: location*, operation, property_type, stratum, days_since_publication, sort, page, min_price, max_price, bedrooms, bathrooms, min_usable_area, max_usable_area, min_built_area, max_built_area. ## Property Finder API https://perceptlayer.com/apis/property-finder - GET /v1/property-finder/agent: Agent. 1 credit. Params: id*, locale, country. - GET /v1/property-finder/agents: Agents. 1 credit. Params: page, per_page, location_ids, broker_id, category_id, is_superagent, must_be_verified, sort, locale, country. - GET /v1/property-finder/brokerage: Brokerage. 1 credit. Params: id*, locale, country. - GET /v1/property-finder/brokerages: Brokerages. 1 credit. Params: page, per_page, q, text, location_id, parent_id, sort, locale, country. - GET /v1/property-finder/listing: Listing. 1 credit. Params: id*, locale, country. - GET /v1/property-finder/locations: Locations. 1 credit. Params: name, category_id, types, page, limit, sort, locale, country. - GET /v1/property-finder/project: Project. 1 credit. Params: slug*, locale, country. - GET /v1/property-finder/projects: Projects. 1 credit. Params: query, location_ids, developer_ids, property_type, min_price, max_price, construction_phase, slug, locale, country. - GET /v1/property-finder/search: Search. 1 credit. Params: category_id, location_ids, bedrooms, property_type_ids, keywords, price_type, min_price, max_price, sort, page, limit, locale, country. ## Property.com.au API https://perceptlayer.com/apis/property-com-au - GET /v1/property-com-au/autocomplete: Autocomplete. 1 credit. Params: query*, type, limit. - GET /v1/property-com-au/listing: Listing. 1 credit. Params: url, path. - GET /v1/property-com-au/search: Search. 1 credit. Params: location*, channel, sort, min_price, max_price, min_bedrooms, max_bedrooms, min_bathrooms, property_type, min_land_size, keywords, include_surrounding, page. ## Property24 API https://perceptlayer.com/apis/property24 - GET /v1/property24/agencies: Agencies. 1 credit. Params: location_id*, location_type*, page. - GET /v1/property24/agency: Agency. 1 credit. Params: agency_id*, slug*. - GET /v1/property24/agency-listings: Agency Listings. 1 credit. Params: agency_id*, slug*, deal_type, page. - GET /v1/property24/listing: Listing. 1 credit. Params: path*, listing_id. - GET /v1/property24/locations-autocomplete: Locations Autocomplete. 1 credit. Params: q*. - GET /v1/property24/search: Search. 1 credit. Params: deal_type, property_type, location_id*, location_type*, min_price, max_price, min_bedrooms, min_bathrooms, sort, page. ## PropertyGuru API https://perceptlayer.com/apis/propertyguru - GET /v1/propertyguru/autocomplete: Autocomplete. 1 credit. Params: market*, query*, limit. - GET /v1/propertyguru/listing: Listing. 1 credit. Params: market, id, url. - GET /v1/propertyguru/projects: Projects. 1 credit. Params: market*. - GET /v1/propertyguru/search: Search. 1 credit. Params: market*, listing_type, page, bedrooms, min_price, max_price, min_size, max_size, property_type, district_code, region_code, furnishing, sort, order. ## PropertyPro.ng API https://perceptlayer.com/apis/propertypro-ng - GET /v1/propertypro-ng/agent: Agent. 1 credit. Params: slug*. - GET /v1/propertypro-ng/agent-listings: Agent Listings. 1 credit. Params: slug*, mode, page. - GET /v1/propertypro-ng/agents: Agents. 1 credit. Params: state, page. - GET /v1/propertypro-ng/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/propertypro-ng/facets: Facets. 1 credit. - GET /v1/propertypro-ng/listing: Listing. 1 credit. Params: url, pid, slug. - GET /v1/propertypro-ng/search: Search. 1 credit. Params: category, type, location, min_price, max_price, bedrooms, sort, page. ## Propiedades.com API https://perceptlayer.com/apis/propiedades-com - GET /v1/propiedades-com/autocomplete: Autocomplete. 1 credit. Params: q*, purpose, type, subtype. - GET /v1/propiedades-com/listing: Listing. 1 credit. Params: url*. - GET /v1/propiedades-com/search: Search. 1 credit. Params: purpose, type, subtype, location_id*, price_min, price_max, size_min, size_max, bedrooms, bathrooms, auctions, amenities[], sort, page. ## PyPI API https://perceptlayer.com/apis/pypi - GET /v1/pypi/project: Project. 1 credit. Params: project*, version. ## Qasa API https://perceptlayer.com/apis/qasa - GET /v1/qasa/landlord: Landlord. 1 credit. Params: uid*. - GET /v1/qasa/listing: Listing. 1 credit. Params: id*. - GET /v1/qasa/location-autocomplete: Location Autocomplete. 1 credit. Params: q*, market. - GET /v1/qasa/search: Search. 1 credit. Params: market, area, min_rent, max_rent, min_rooms, max_rooms, min_size, max_size, household_size, min_rental_length, home_type, shared, furnished, pets, smoking, wheelchair_accessible, first_hand, student_home, senior_home, corporate_home, sort, direction, limit, page. ## QuintoAndar API https://perceptlayer.com/apis/quintoandar - GET /v1/quintoandar/autocomplete: Autocomplete. 1 credit. Params: q*, limit. - GET /v1/quintoandar/condominium: Condominium. 1 credit. Params: hash_id*. - GET /v1/quintoandar/filters: Filters. 1 credit. Params: business. - GET /v1/quintoandar/media: Media. 1 credit. Params: id*. - GET /v1/quintoandar/property: Property. 1 credit. Params: id*, origin. - GET /v1/quintoandar/search: Search. 1 credit. Params: business*, location*, price_min, price_max, bedrooms, bedrooms_max, bathrooms, bathrooms_max, parking_spaces, suites, area_min, area_max, property_type, furnished, amenities, installations, availability, origin, sort, rows, page. - GET /v1/quintoandar/similar: Similar. 1 credit. Params: id*, business*, type. ## RadarBox API https://perceptlayer.com/apis/radarbox - GET /v1/radarbox/airport: Airport. 8 credits. Params: airport*, direction, date, page. - GET /v1/radarbox/flight: Flight. 1–13 credits. 1 credit by fid, 4 by flight number and date, plus 9 with include_track. Params: fid, flight_number, date, include_track. - GET /v1/radarbox/flight-history: Flight History. 3 credits. Params: flight_number, registration, callsign, mode_s, airline, aircraft_type, date, page. ## Rakuten API https://perceptlayer.com/apis/rakuten - GET /v1/rakuten/item: Item. 1 credit. Params: url, shop_code, manage_number. - GET /v1/rakuten/ranking: Ranking. 1 credit. Params: period, genre_id, gender, page. - GET /v1/rakuten/reviews: Reviews. 1 credit. Params: id, shop_id, item_id, page, sort, rating, media_only. - GET /v1/rakuten/search: Search. 1 credit. Params: query, genre_id, min_price, max_price, sort, page, min_rating, include_sold_out. - GET /v1/rakuten/suggest: Suggest. 1 credit. Params: query*. ## realestate.co.nz API https://perceptlayer.com/apis/realestate-co-nz - GET /v1/realestate-co-nz/agent: Agent. 1 credit. Params: id*, include_listings, type, page, rows. - GET /v1/realestate-co-nz/autocomplete: Autocomplete. 1 credit. Params: q*, type. - GET /v1/realestate-co-nz/facets: Facets. 1 credit. Params: type*, region, district, suburb. - GET /v1/realestate-co-nz/listing: Listing. 1 credit. Params: id*. - GET /v1/realestate-co-nz/locations: Locations. 1 credit. - GET /v1/realestate-co-nz/office: Office. 1 credit. Params: id*. - GET /v1/realestate-co-nz/search: Search. 1 credit. Params: type*, page, rows, region, district, suburb, agent, office, school, price_min, price_max, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max, carparks, land_area_min, land_area_max, floor_area_min, floor_area_max, property_type, keyword, sort, open_home, new_construction, mortgagee_sale, swimming_pool, pets_allowed, floor_plans, videos, coastal_waterfront, include_nearby_suburbs. ## realestate.com.au API https://perceptlayer.com/apis/realestate-com-au - GET /v1/realestate-com-au/agency-profile: Agency Profile. 1 credit. Params: url*. - GET /v1/realestate-com-au/agent-profile: Agent Profile. 1 credit. Params: url*. - GET /v1/realestate-com-au/agents: Agents. 1 credit. Params: url, location, page. - GET /v1/realestate-com-au/autocomplete: Autocomplete. 1 credit. Params: query*, limit, types, source. - GET /v1/realestate-com-au/locations: Locations. 1 credit. Params: query*, limit. - GET /v1/realestate-com-au/property: Property. 1 credit. Params: url*. - GET /v1/realestate-com-au/sales-events: Sales Events. 1 credit. Params: state, url. - GET /v1/realestate-com-au/search: Search. 1 credit. Params: location*, channel, page, sort, min_price, max_price, min_bedrooms, max_bedrooms, min_bathrooms, min_carspaces, property_types, keywords. - GET /v1/realestate-com-au/suburb-profile: Suburb Profile. 1 credit. Params: url*. ## Realestateview API https://perceptlayer.com/apis/realestateview - GET /v1/realestateview/agency: Agency. 1 credit. Params: id*. - GET /v1/realestateview/agency-listings: Agency Listings. 1 credit. Params: id*, page. - GET /v1/realestateview/agent: Agent. 1 credit. Params: id*. - GET /v1/realestateview/agent-listings: Agent Listings. 1 credit. Params: id*, page. - GET /v1/realestateview/listing: Listing. 1 credit. Params: id*. - GET /v1/realestateview/location-autocomplete: Location Autocomplete. 1 credit. Params: q*. - GET /v1/realestateview/search: Search. 1 credit. Params: mode*, state*, suburb*, postcode*, property_types[], price_min, price_max, land_size_min, land_size_max, exclude_under_contract, sort, page, beds_min, beds_exact, baths_min, baths_exact, cars_min, cars_exact. ## Realitica API https://perceptlayer.com/apis/realitica - GET /v1/realitica/advertiser: Advertiser. 1 credit. Params: user_id*, page. - GET /v1/realitica/listing: Listing. 1 credit. Params: id*. - GET /v1/realitica/locations: Locations. 1 credit. Params: country, q. - GET /v1/realitica/reference: Reference. 1 credit. - GET /v1/realitica/search: Search. 1 credit. Params: listing_type, country, region, query, property_type[], min_price, max_price, bedrooms, min_area, max_area, sort, posted_within, page. ## Realtor.com API https://perceptlayer.com/apis/realtor-com - GET /v1/realtor-com/agent: Agent. 1 credit. Params: property_id*. - GET /v1/realtor-com/autocomplete: Autocomplete. 1 credit. Params: query*, limit, area_types[]. - GET /v1/realtor-com/listing: Listing. 1 credit. Params: property_id*. - GET /v1/realtor-com/schools: Schools. 1 credit. Params: property_id*, radius_mi, limit_per_level. - GET /v1/realtor-com/search: Search. 1 credit. Params: status*, location, latitude, longitude, radius_mi, type[], sort, order, sold_within_days, page, per_page, min_price, max_price, min_beds, max_beds, min_baths, max_baths, min_sqft, max_sqft. ## Reddit API https://perceptlayer.com/apis/reddit - GET /v1/reddit/autocomplete: Autocomplete. 1 credit. Params: query*, limit, nsfw. - GET /v1/reddit/domain: Domain. 1 credit. Params: domain*, sort, t, after, limit. - GET /v1/reddit/oembed: Oembed. 1 credit. Params: url*. - GET /v1/reddit/popular: Popular. 1 credit. Params: feed, sort, t, after, limit. - GET /v1/reddit/post: Post. 1 credit. Params: id*. - GET /v1/reddit/search-posts: Search Posts. 1 credit. Params: query*, sort, t, subreddit, nsfw, after, limit. - GET /v1/reddit/search-subreddits: Search Subreddits. 1 credit. Params: query*, after, limit. - GET /v1/reddit/search-users: Search Users. 1 credit. Params: query*, after, limit. - GET /v1/reddit/subreddit: Subreddit. 1 credit. Params: subreddit*, rules. - GET /v1/reddit/subreddit-posts: Subreddit Posts. 1 credit. Params: subreddit*, sort, t, after, limit. - GET /v1/reddit/user-comments: User Comments. 1 credit. Params: username*, sort, t, after, limit. - GET /v1/reddit/user-overview: User Overview. 1 credit. Params: username*, sort, t, after, limit. - GET /v1/reddit/user-posts: User Posts. 1 credit. Params: username*, sort, t, after, limit. - GET /v1/reddit/user-profile: User Profile. 1 credit. Params: username*. ## Redfin API https://perceptlayer.com/apis/redfin - GET /v1/redfin/agent: Agent. 1 credit. Params: slug*, country, deals_limit, reviews_limit. - GET /v1/redfin/agents: Agents. 1 credit. Params: region_id*, region_type*, country, min_rating, min_deals, language, serves, sort, page, per_page. - GET /v1/redfin/history: History. 1 credit. Params: property_id*, listing_id, country. - GET /v1/redfin/locations: Locations. 1 credit. Params: query*, country. - GET /v1/redfin/market-trends: Market Trends. 1 credit. Params: region_id*, region_type*, country. - GET /v1/redfin/nearby: Nearby. 1 credit. Params: property_id*, listing_id*, country. - GET /v1/redfin/open-houses: Open Houses. 1 credit. Params: region_id*, region_type*, market*, country, num_homes, page. - GET /v1/redfin/property: Property. 1 credit. Params: property_id*, listing_id. - GET /v1/redfin/schools: Schools. 1 credit. Params: property_id*, country. - GET /v1/redfin/scores: Scores. 1 credit. Params: property_id*, country. - GET /v1/redfin/search: Search. 1 credit. Params: region_id*, region_type*, country, market*, min_price, max_price, num_beds, num_baths, property_types, status, sold_within_days, num_homes, page. - GET /v1/redfin/similar: Similar. 1 credit. Params: property_id*, listing_id*, type, country. - GET /v1/redfin/sold: Sold. 1 credit. Params: region_id*, region_type*, market*, country, min_price, max_price, num_beds, property_types, sold_within_days, num_homes, page. - GET /v1/redfin/valuation: Valuation. 1 credit. Params: property_id*, listing_id. ## Reed API https://perceptlayer.com/apis/reed - GET /v1/reed/jobs-details: Jobs Details. 1 credit. Params: job_id*. - GET /v1/reed/jobs-search: Jobs Search. 1 credit. Params: keywords, location, proximity, salary_from, salary_to, job_type[], hours[], working_option, posted_within, page. ## Remote Jobs API https://perceptlayer.com/apis/remote-jobs - GET /v1/remote-jobs/categories: Categories. 1 credit. - GET /v1/remote-jobs/job: Job. 1 credit. Params: job_id*. - GET /v1/remote-jobs/search: Search. 1 credit. Params: q, category, job_type, seniority, country, region, timezone, salary_min, currency, date_posted, source, sort, page. - GET /v1/remote-jobs/sources: Sources. 1 credit. ## Rent.com API https://perceptlayer.com/apis/rent-com - GET /v1/rent-com/autocomplete: Autocomplete. 1 credit. Params: q*, limit. - GET /v1/rent-com/listing: Listing. 1 credit. Params: id, url. - GET /v1/rent-com/search: Search. 1 credit. Params: location*, property_types[], beds[], baths[], price_min, price_max, sqft_min, sqft_max, pet_friendly, amenities[], sort, page. ## Rentalcars.com API https://perceptlayer.com/apis/rentalcars - GET /v1/rentalcars/autocomplete: Autocomplete. 1 credit. Params: term*, language, cor. - GET /v1/rentalcars/brand: Brand. 1 credit. Params: brand*, locale. - GET /v1/rentalcars/brand-logos: Brand Logos. 1 credit. Params: destination*, count. - GET /v1/rentalcars/destination: Destination. 1 credit. Params: destination*, count. - GET /v1/rentalcars/destination-suppliers: Destination Suppliers. 1 credit. Params: destination*, count. - GET /v1/rentalcars/faqs: Faqs. 1 credit. Params: destination*, count. - GET /v1/rentalcars/flexible-prices: Flexible Prices. 1 credit. Params: iata*, start_date*, end_date*, rental_days, language, cor, currency. - GET /v1/rentalcars/offer: Offer. 1 credit. Params: pickup_location*, dropoff_location, pickup_date*, pickup_time, dropoff_date*, dropoff_time, drivers_age, cor, currency, car_category[], supplier[], transmission[], mileage[], depot_location_type[], fuel_type[], fuel_policy_type[], seat_capacity[], pay_when[], free_cancellation, minimum_supplier_rating, minimum_four_doors, has_deals, has_insurance_inclusive_pricing, price_min, price_max, sort, sort_ascending, filter_criteria, page, per_page, vehicle_id*. - GET /v1/rentalcars/review-summaries: Review Summaries. 1 credit. Params: supplier_id*, location_id*. - GET /v1/rentalcars/search: Search. 1 credit. Params: pickup_location*, dropoff_location, pickup_date*, pickup_time, dropoff_date*, dropoff_time, drivers_age, cor, currency, car_category[], supplier[], transmission[], mileage[], depot_location_type[], fuel_type[], fuel_policy_type[], seat_capacity[], pay_when[], free_cancellation, minimum_supplier_rating, minimum_four_doors, has_deals, has_insurance_inclusive_pricing, price_min, price_max, sort, sort_ascending, filter_criteria, page, per_page. - GET /v1/rentalcars/supplier-ratings: Supplier Ratings. 1 credit. Params: pickup_location*, dropoff_location, pickup_date*, pickup_time, dropoff_date*, dropoff_time, drivers_age, cor, currency, car_category[], supplier[], transmission[], mileage[], depot_location_type[], fuel_type[], fuel_policy_type[], seat_capacity[], pay_when[], free_cancellation, minimum_supplier_rating, minimum_four_doors, has_deals, has_insurance_inclusive_pricing, price_min, price_max, sort, sort_ascending, filter_criteria, page, per_page. - GET /v1/rentalcars/terms: Terms. 1 credit. Params: pickup_location*, dropoff_location, pickup_date*, pickup_time, dropoff_date*, dropoff_time, drivers_age, cor, currency, car_category[], supplier[], transmission[], mileage[], depot_location_type[], fuel_type[], fuel_policy_type[], seat_capacity[], pay_when[], free_cancellation, minimum_supplier_rating, minimum_four_doors, has_deals, has_insurance_inclusive_pricing, price_min, price_max, sort, sort_ascending, filter_criteria, page, per_page, supplier*, make_and_model*. ## Rentalia API https://perceptlayer.com/apis/rentalia - GET /v1/rentalia/house: House. 1 credit. Params: id*, lang. - GET /v1/rentalia/locations: Locations. 1 credit. Params: query*, lang. - GET /v1/rentalia/price: Price. 1 credit. Params: rental_unit_id*, check_in_date*, check_out_date*, capacity*. ## Rentals.ca API https://perceptlayer.com/apis/rentals-ca - GET /v1/rentals-ca/agency: Agency. 1 credit. Params: path, url, id. - GET /v1/rentals-ca/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/rentals-ca/cities: Cities. 1 credit. Params: region, page, per_page. - GET /v1/rentals-ca/facets: Facets. 1 credit. - GET /v1/rentals-ca/listing: Listing. 1 credit. Params: path, url, id. - GET /v1/rentals-ca/neighbourhoods: Neighbourhoods. 1 credit. Params: region, page, per_page, city*. - GET /v1/rentals-ca/search: Search. 1 credit. Params: city, region, location, min_price, max_price, min_beds, max_beds, min_baths, max_baths, min_size, max_size, property_type[], categories[], lease_terms[], furnished[], parking_types[], amenities[], pets, verified, has_images, sort, page, per_page. ## RentFaster API https://perceptlayer.com/apis/rentfaster - GET /v1/rentfaster/agency: Agency. 1 credit. Params: id*. - GET /v1/rentfaster/autocomplete: Autocomplete. 1 credit. Params: query, popular. - GET /v1/rentfaster/filters: Filters. 1 credit. Params: city_id*. - GET /v1/rentfaster/listing: Listing. 1 credit. Params: id*. - GET /v1/rentfaster/photos: Photos. 1 credit. Params: id*. - GET /v1/rentfaster/search: Search. 1 credit. Params: city_id*, price_min, price_max, area, zoom, page, beds[], baths[], type[], furnishing[], pets_cats[], pets_dogs[]. ## Resy API https://perceptlayer.com/apis/resy - GET /v1/resy/calendar: Calendar. 1 credit. Params: venue_id*, num_seats, start_date*, end_date*, time_zone. - GET /v1/resy/city-listings: City Listings. 1 credit. Params: location*, day, party_size, latitude, longitude. - GET /v1/resy/cuisines: Cuisines. 1 credit. Params: location*, maximum_num_cuisines. - GET /v1/resy/search: Search. 1 credit. Params: query*, day, party_size, latitude, longitude, radius, page, time_zone. - GET /v1/resy/slot: Slot. 1 credit. Params: config_id*, day, party_size, time_zone. - GET /v1/resy/venue: Venue. 1 credit. Params: id, url_slug, location. - GET /v1/resy/venue-config: Venue Config. 1 credit. Params: venue_id*. ## Reverb API https://perceptlayer.com/apis/reverb - GET /v1/reverb/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/reverb/categories: Categories. 1 credit. - GET /v1/reverb/conditions: Conditions. 1 credit. - GET /v1/reverb/currencies: Currencies. 1 credit. - GET /v1/reverb/listing: Listing. 1 credit. Params: id*. - GET /v1/reverb/listing-reviews: Listing Reviews. 1 credit. Params: id*. - GET /v1/reverb/search: Search. 1 credit. Params: query, category_uuid, price_min, price_max, sort, order, page, per_page. - GET /v1/reverb/shop: Shop. 1 credit. Params: slug*. - GET /v1/reverb/shop-feedback: Shop Feedback. 1 credit. Params: slug*. - GET /v1/reverb/shop-inventory: Shop Inventory. 1 credit. Params: shop_id*. - GET /v1/reverb/similar: Similar. 1 credit. Params: id*. ## Ricardo API https://perceptlayer.com/apis/ricardo - GET /v1/ricardo/categories: Categories. 1 credit. Params: parent_id, level, language*. - GET /v1/ricardo/category: Category. 1 credit. Params: category_id*, page*, limit*, auction_only*, price_min, price_max, language*. - GET /v1/ricardo/listing: Listing. 1 credit. Params: id*, language*. - GET /v1/ricardo/search: Search. 1 credit. Params: query*, category_id, page*, limit*, auction_only*, price_min, price_max, language*. ## Rightmove API https://perceptlayer.com/apis/rightmove - GET /v1/rightmove/address: Address. 1 credit. Params: postcode, term. - GET /v1/rightmove/agents: Agents. 1–2 credits. 1 credit, or 2 the first time a place name is looked up; location_identifier avoids it. Params: location, location_identifier, channel*. - GET /v1/rightmove/branch: Branch. 1 credit. Params: id*. - GET /v1/rightmove/locations-typeahead: Locations Typeahead. 1 credit. Params: query*, limit. - GET /v1/rightmove/property: Property. 1 credit. Params: id*. - GET /v1/rightmove/search: Search. 1–3 credits. 1 credit, plus 1 with enrich and 1 the first time a place name is looked up. Params: location, location_identifier, location_name, channel*, radius, page, sort, min_price, max_price, min_bedrooms, max_bedrooms, property_type, must_have, enrich. - GET /v1/rightmove/sold-properties: Sold Properties. 1–3 credits. 1 credit, or 3 the first time a postcode is looked up. Params: postcode, location_id, location_type, radius, page, page_size, property_type, tenure, sold_in. - GET /v1/rightmove/sold-property: Sold Property. 1 credit. Params: uuid*. ## RockAuto API https://perceptlayer.com/apis/rockauto - GET /v1/rockauto/product: Product. 1 credit. Params: id, url, cc, pt. - GET /v1/rockauto/search: Search. 1 credit. Params: query, part_number, make, year, model, carcode, language, page. ## Rumble API https://perceptlayer.com/apis/rumble - GET /v1/rumble/categories: Categories. 1 credit. Params: limit. - GET /v1/rumble/channels-profile: Channels Profile. 1 credit. Params: channel_id*. - GET /v1/rumble/channels-search: Channels Search. 1 credit. Params: query*, offset, limit. - GET /v1/rumble/channels-videos: Channels Videos. 1 credit. Params: channel_id*, offset, limit, sort. - GET /v1/rumble/search-autocomplete: Search Autocomplete. 1 credit. Params: query*, limit. - GET /v1/rumble/videos-comments: Videos Comments. 1 credit. Params: video_id, url, offset, limit. - GET /v1/rumble/videos-details: Videos Details. 1 credit. Params: video_id, url. - GET /v1/rumble/videos-related: Videos Related. 1 credit. Params: video_id, url. - GET /v1/rumble/videos-search: Videos Search. 1 credit. Params: query*, offset, limit, sort, date, duration, video_type. ## Ryanair API https://perceptlayer.com/apis/ryanair - GET /v1/ryanair/airports-active: Airports Active. 1 credit. - GET /v1/ryanair/airports-detail: Airports Detail. 1 credit. Params: code*. - GET /v1/ryanair/fares-cheapest-per-day: Fares Cheapest Per Day. 1 credit. Params: origin*, destination*, month*, currency, adults. - GET /v1/ryanair/fares-one-way: Fares One Way. 1 credit. Params: origin*, destination*, departure_date_from*, departure_date_to*, currency, adults, market, limit, inbound_date_from, inbound_date_to, nights_from, nights_to. - GET /v1/ryanair/fares-round-trip: Fares Round Trip. 1 credit. Params: origin*, destination*, departure_date_from*, departure_date_to*, currency, adults, market, limit, inbound_date_from, inbound_date_to, nights_from, nights_to. - GET /v1/ryanair/flights-active-dates: Flights Active Dates. 1 credit. Params: origin*, destination*. - GET /v1/ryanair/flights-availability: Flights Availability. 1 credit. Params: origin*, destination*, date*, adults, children, infants, teens, flex, market. - GET /v1/ryanair/flights-schedules: Flights Schedules. 1 credit. Params: origin*, destination*, year*, month*. - GET /v1/ryanair/reference-sitemap: Reference Sitemap. 1 credit. - GET /v1/ryanair/routes-from-airport: Routes From Airport. 1 credit. Params: code*. - GET /v1/ryanair/routes-served-period: Routes Served Period. 1 credit. Params: origin*, destination*. - GET /v1/ryanair/routes-served-periods: Routes Served Periods. 1 credit. Params: origin*. ## SEEK API https://perceptlayer.com/apis/seek - GET /v1/seek/job: Job. 1 credit. Params: job_id*, country. - GET /v1/seek/jobs: Jobs. 1 credit. Params: country, keywords, location, distance, classification, work_type, sort, days, page, limit. ## SeLoger API https://perceptlayer.com/apis/seloger - GET /v1/seloger/agencies: Agencies. 1 credit. Params: city*, page. - GET /v1/seloger/count: Count. 1 credit. Params: place_id, distribution, estate_types[], price_min, price_max, year_built_min, size_min, available_from_max, energy_certificate_class[]. - GET /v1/seloger/locations: Locations. 1 credit. Params: query*, limit. - GET /v1/seloger/place: Place. 2 credits. Params: place_id*, parent_types[]. - GET /v1/seloger/properties: Properties. 1 credit. Params: ids[]. - GET /v1/seloger/property: Property. 2 credits. Params: id*. - GET /v1/seloger/search: Search. 1–2 credits. 1 credit, or 2 with place_id. Params: place_id, distribution, estate_types[], new_build, price_min, price_max, rooms_min, rooms_max, size_min, year_built_min, available_from_max, keywords, order, page, per_page. ## Semrush API https://perceptlayer.com/apis/semrush - GET /v1/semrush/domain-competitors: Domain Competitors. 1 credit. Params: domain*. - GET /v1/semrush/domain-overview: Domain Overview. 1 credit. Params: domain*. - GET /v1/semrush/facets: Facets. 1 credit. - POST /v1/semrush/local-review-qr: Local Review Qr. 1 credit. Params: business_name*, place_id*. - GET /v1/semrush/sensor-movers: Sensor Movers. 1 credit. Params: db*, category*, date*. - GET /v1/semrush/sensor-ranks: Sensor Ranks. 1 credit. Params: db, category, date. - GET /v1/semrush/sensor-serp-features: Sensor Serp Features. 1 credit. Params: db*, category*, date*. - GET /v1/semrush/suggest: Suggest. 1 credit. Params: q*. - GET /v1/semrush/trending: Trending. 1 credit. Params: country, category. - GET /v1/semrush/website-traffic: Website Traffic. 1 credit. Params: domain*. ## Sephora API https://perceptlayer.com/apis/sephora - GET /v1/sephora/product: Product. 1 credit. Params: id, url. - GET /v1/sephora/search: Search. 1 credit. Params: query, category, brand, sort, page, price_min, price_max. ## Shopify API https://perceptlayer.com/apis/shopify - GET /v1/shopify/products: Products. 1 credit. Params: store*, page, limit, collection. ## Shopify App Store API https://perceptlayer.com/apis/shopify-app-store - GET /v1/shopify-app-store/app: App. 1 credit. Params: handle, id, locale. - GET /v1/shopify-app-store/reviews: Reviews. 1 credit. Params: handle, id, sort, locale, page. - GET /v1/shopify-app-store/search: Search. 1 credit. Params: q, category, locale, page. ## Similarweb API https://perceptlayer.com/apis/similarweb - POST /v1/similarweb/batches: Batches. 1–1,000 credits. 1 credit per domain in the batch. Params: domains*. - GET /v1/similarweb/batches-detail: Batches Detail. 1 credit. Params: batch*, after, limit. - POST /v1/similarweb/batches-retry: Batches Retry. 1 credit. Params: batch*, after, limit. - GET /v1/similarweb/traffic: Traffic. 1 credit. Params: domain*. ## Sinyi Realty API https://perceptlayer.com/apis/sinyi - GET /v1/sinyi/agency: Agency. 1 credit. Params: id*. - GET /v1/sinyi/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/sinyi/listing: Listing. 1 credit. Params: id*. - GET /v1/sinyi/locations: Locations. 1 credit. Params: city_id. - GET /v1/sinyi/search: Search. 1 credit. Params: trade*, location, type, min_price, max_price, min_rooms, max_rooms, min_area, max_area, min_age, max_age, sort, page, per_page. ## Sitejabber API https://perceptlayer.com/apis/sitejabber - GET /v1/sitejabber/company: Company. 1 credit. Params: slug*. - GET /v1/sitejabber/reviews: Reviews. 1 credit. Params: slug*, page. - GET /v1/sitejabber/search: Search. 1 credit. Params: query*, page. ## Skyscanner API https://perceptlayer.com/apis/skyscanner - GET /v1/skyscanner/autocomplete: Autocomplete. 1 credit. Params: query*, is_destination. - GET /v1/skyscanner/calendar: Calendar. 1 credit. Params: origin*, destination*, month*. ## Snapchat API https://perceptlayer.com/apis/snapchat - GET /v1/snapchat/discover: Discover. 1 credit. Params: country, locale, limit. - GET /v1/snapchat/profile: Profile. 1 credit. Params: username*, locale. - GET /v1/snapchat/spotlight: Spotlight. 1 credit. Params: username*, story_id*, locale. - GET /v1/snapchat/spotlight-feed: Spotlight Feed. 1 credit. Params: locale, limit. ## SoundCloud API https://perceptlayer.com/apis/soundcloud - GET /v1/soundcloud/comments: Comments. 1 credit. Params: id*, threaded, filter_replies, offset, limit. - GET /v1/soundcloud/playlists: Playlists. 1 credit. Params: id*. - GET /v1/soundcloud/playlists-tracks: Playlists Tracks. 1–11 credits. 1 credit, plus 1 per 50 tracks loaded, up to 500 tracks. Params: id*, max_members, offset. - GET /v1/soundcloud/playlists-trending: Playlists Trending. 1 credit. Params: limit, offset. - GET /v1/soundcloud/profiles: Profiles. 1 credit. Params: id*. - GET /v1/soundcloud/profiles-activity: Profiles Activity. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-albums: Profiles Albums. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-followers: Profiles Followers. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-followings: Profiles Followings. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-likes: Profiles Likes. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-links: Profiles Links. 1 credit. Params: user_urn*. - GET /v1/soundcloud/profiles-playlists: Profiles Playlists. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-playlists-without-albums: Profiles Playlists Without Albums. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-spotlight: Profiles Spotlight. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-top-tracks: Profiles Top Tracks. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/profiles-tracks: Profiles Tracks. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/recent-tracks: Recent Tracks. 1 credit. Params: tag*, limit. - GET /v1/soundcloud/resolve: Resolve. 1 credit. Params: url*. - GET /v1/soundcloud/search: Search. 1 credit. Params: query*, type, limit, offset. - GET /v1/soundcloud/search-suggestions: Search Suggestions. 1 credit. Params: query*, limit. - GET /v1/soundcloud/tracks: Tracks. 1 credit. Params: id*. - GET /v1/soundcloud/tracks-comments: Tracks Comments. 1 credit. Params: id*, threaded, filter_replies, offset, limit. - GET /v1/soundcloud/tracks-likers: Tracks Likers. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/tracks-related: Tracks Related. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/tracks-reposters: Tracks Reposters. 1 credit. Params: id*, limit, offset. - GET /v1/soundcloud/users-related-artists: Users Related Artists. 1 credit. Params: id*, limit, offset. ## Spacious API https://perceptlayer.com/apis/spacious - GET /v1/spacious/agencies-search: Agencies Search. 1 credit. Params: query*, limit. - GET /v1/spacious/agency: Agency. 1 credit. Params: id*, mode, page. - GET /v1/spacious/autocomplete: Autocomplete. 1 credit. Params: query*, type, limit. - GET /v1/spacious/building: Building. 1 credit. Params: id*. - GET /v1/spacious/listing: Listing. 1 credit. Params: path*. - GET /v1/spacious/search: Search. 1 credit. Params: mode*, page, locale, bedrooms, min_bedrooms, bathrooms, min_bathrooms, price_min, price_max, area_min, area_max, area_type, property_type, neighbourhood_id, building_id, sort. ## SpareRoom API https://perceptlayer.com/apis/spareroom - GET /v1/spareroom/areas: Areas. 1 credit. Params: city*. - GET /v1/spareroom/listing: Listing. 1 credit. Params: id*, ad_type. - GET /v1/spareroom/locations: Locations. 1 credit. Params: q*. - GET /v1/spareroom/search: Search. 1 credit. Params: where*, page, sort, min_rent, max_rent, rent_period, bills_included, available_from, types, room_types, ensuite, furnished, rooms_for, share_type, genderfilter, gayshare, vegetarians, disabled_access, living_room, parking, smoking, pets_req, days_of_wk_available, short_lets_considered, posted_by, landlord, photoadsonly, free_to_contact, no_deposit, verified_users, min_term, max_term, no_of_rooms, min_age_req, max_age_req, min_beds, max_beds. ## Spitogatos API https://perceptlayer.com/apis/spitogatos - GET /v1/spitogatos/agent: Agent. 1 credit. Params: id*, locale. - GET /v1/spitogatos/agent-properties: Agent Properties. 1 credit. Params: id*, page, locale. - GET /v1/spitogatos/agent-search: Agent Search. 1 credit. Params: query*, area_id, page, locale. - GET /v1/spitogatos/autocomplete: Autocomplete. 1 credit. Params: query*, limit, locale. - GET /v1/spitogatos/count: Count. 1 credit. Params: listing_type*, category, area_ids[], property_types[], locale, construction_year_min, construction_year_max, price_min, price_max, area_min, area_max, rooms_min, rooms_max, new_development, reductions, furnished, elevator, balcony, garden, air_conditioning, storage. - GET /v1/spitogatos/property: Property. 1 credit. Params: id*, locale. - GET /v1/spitogatos/search: Search. 1 credit. Params: listing_type*, category, area_ids[], property_types[], locale, construction_year_min, construction_year_max, price_min, price_max, area_min, area_max, rooms_min, rooms_max, new_development, reductions, furnished, elevator, balcony, garden, air_conditioning, storage, sort, order, page. - GET /v1/spitogatos/search-map: Search Map. 1 credit. Params: listing_type*, category, area_ids[], property_types[], locale, construction_year_min, construction_year_max, price_min, price_max, area_min, area_max, rooms_min, rooms_max, new_development, reductions, furnished, elevator, balcony, garden, air_conditioning, storage. ## Spotahome API https://perceptlayer.com/apis/spotahome - GET /v1/spotahome/listing: Listing. 1 credit. Params: id*, city*, property_type*. - GET /v1/spotahome/search: Search. 1 credit. Params: city*, country*, page, min_price, max_price, type, move_in. ## Spotify API https://perceptlayer.com/apis/spotify - GET /v1/spotify/album: Album. 1–2 credits. 1 credit, or 2 when a second lookup is needed. Params: id*. - GET /v1/spotify/album-tracks: Album Tracks. 1–20 credits. 1 credit per 50 tracks returned. Params: id*, limit, all. - GET /v1/spotify/artist: Artist. 1–2 credits. 1 credit, or 2 when a second lookup is needed. Params: id*. - GET /v1/spotify/artist-discography: Artist Discography. 1 credit. Params: id*, limit, offset. - GET /v1/spotify/artist-related: Artist Related. 1 credit. Params: id*. - GET /v1/spotify/artist-top-tracks: Artist Top Tracks. 1 credit. Params: id*. - GET /v1/spotify/charts: Charts. 1–10 credits. 1 credit per 100 tracks returned. Params: key*, limit, all. - GET /v1/spotify/discovery-audio-mix-seed: Discovery Audio Mix Seed. 1 credit. Params: track_id*. - GET /v1/spotify/episode: Episode. 1 credit. Params: id*. - GET /v1/spotify/get-many: Get Many. 1–100 credits. 1 credit per id found, 2 for an id that needs a second lookup; up to 50 ids. Params: ids[], type. - GET /v1/spotify/playlist: Playlist. 1 credit. Params: id*. - GET /v1/spotify/playlist-tracks: Playlist Tracks. 1–10 credits. 1 credit per 100 tracks returned. Params: id*, limit, all. - GET /v1/spotify/search: Search. 1 credit. Params: q*, limit, offset. - GET /v1/spotify/search-suggestions: Search Suggestions. 1 credit. Params: q*. - GET /v1/spotify/show: Show. 1 credit. Params: id*. - GET /v1/spotify/show-episodes: Show Episodes. 1–20 credits. 1 credit per 50 episodes returned. Params: id*, limit, all. - GET /v1/spotify/track: Track. 1 credit. Params: id*. - GET /v1/spotify/track-colors: Track Colors. 1 credit. Params: image_uri*. ## Sprouts Farmers Market API https://perceptlayer.com/apis/sprouts - GET /v1/sprouts/product: Product. 1 credit. Params: id, url, store_id, zip. - GET /v1/sprouts/search: Search. 1 credit. Params: query*, store_id, zip, page, per_page. ## Square Yards API https://perceptlayer.com/apis/square-yards - GET /v1/square-yards/agent: Agent. 1 credit. Params: id*, slug. - GET /v1/square-yards/autocomplete: Autocomplete. 1 credit. Params: q*, city*, category. - GET /v1/square-yards/cities: Cities. 1 credit. Params: q. - GET /v1/square-yards/filters: Filters. 1 credit. Params: category. - GET /v1/square-yards/listing: Listing. 1 credit. Params: url, id, category. - GET /v1/square-yards/search: Search. 1 credit. Params: city*, category, bedrooms, property_type, locality, min_price, max_price, min_area, max_area, sort, page. ## Sreality API https://perceptlayer.com/apis/sreality - GET /v1/sreality/brokers: Brokers. 1 credit. Params: agency_id*. - GET /v1/sreality/clusters: Clusters. 1 credit. Params: lat_min*, lat_max*, lon_min*, lon_max*, zoom*. - GET /v1/sreality/estate: Estate. 1 credit. Params: hash_id*. - GET /v1/sreality/facets: Facets. 1 credit. Params: property_type, deal_type, country_id. - GET /v1/sreality/geometries: Geometries. 1 credit. Params: entity_type*, entity_id*, no_children. - GET /v1/sreality/histogram: Histogram. 1 credit. Params: property_type*, deal_type*. - GET /v1/sreality/price-graph: Price Graph. 1 credit. Params: property_type*, date_from*, date_to*. - GET /v1/sreality/project-clusters: Project Clusters. 1 credit. Params: lat_min*, lat_max*, lon_min*, lon_max*, zoom*. - GET /v1/sreality/project-facets: Project Facets. 1 credit. - GET /v1/sreality/projects: Projects. 1 credit. Params: limit, offset. - GET /v1/sreality/resolve: Resolve. 1 credit. Params: entity_type*, entity_id*. - GET /v1/sreality/search: Search. 1 credit. Params: property_type, deal_type, category_sub, country_id, region_id, entity_type, entity_id, price_min, price_max, advert_age_days_max, agency_id, estate_area_min, estate_area_max, usable_area_min, usable_area_max, floor_min, floor_max, rooms, energy_rating, building_type, building_condition, ownership, furnished, balcony, terrace, parking_lots, elevator, loggia, cellar, garage, easy_access, garden, query, description_search, available_to, has_video, has_matterport, has_floor_plan, pois, lat_min, lat_max, lon_min, lon_max, sort, limit, offset. - GET /v1/sreality/suggest: Suggest. 1 credit. Params: phrase*, limit, category. - GET /v1/sreality/top-districts: Top Districts. 1 credit. Params: property_type, deal_type, type. ## SS.lv API https://perceptlayer.com/apis/ss-lv - GET /v1/ss-lv/agencies: Agencies. 1 credit. Params: page. - GET /v1/ss-lv/agency: Agency. 1 credit. Params: url*. - GET /v1/ss-lv/autocomplete: Autocomplete. 1 credit. Params: query*, type, limit. - GET /v1/ss-lv/latest: Latest. 1 credit. Params: category, sub_category, region, district, listing_type. - GET /v1/ss-lv/listing: Listing. 1 credit. Params: url*. - GET /v1/ss-lv/search: Search. 1 credit. Params: category, sub_category, region, district, listing_type, posted, min_price, max_price, min_price_per_sqm, max_price_per_sqm, min_rooms, max_rooms, min_area, max_area, min_floor, max_floor, series, sort, page. - GET /v1/ss-lv/text-search: Text Search. 1 credit. Params: query*, page. ## SSENSE API https://perceptlayer.com/apis/ssense - GET /v1/ssense/product: Product. 1 credit. Params: url, id, brand, slug, gender, country. - GET /v1/ssense/search: Search. 1 credit. Params: gender*, query, designer, category, sale_only, sort, page, country. ## Stack Overflow API https://perceptlayer.com/apis/stackoverflow - GET /v1/stackoverflow/answers: Answers. 1 credit. Params: question_id*, sort, order, page, pagesize. - GET /v1/stackoverflow/comments: Comments. 1 credit. Params: question_id*, sort, order, page, pagesize. - GET /v1/stackoverflow/question: Question. 1 credit. Params: question_id*. - GET /v1/stackoverflow/search: Search. 1 credit. Params: q, tagged, sort, order, page, pagesize. ## Standvirtual API https://perceptlayer.com/apis/standvirtual - GET /v1/standvirtual/dealer: Dealer. 1 credit. Params: dealer_id, url. - GET /v1/standvirtual/listing: Listing. 1 credit. Params: listing_id, url. - GET /v1/standvirtual/search: Search. 1 credit. Params: make, model, price_min, price_max, year_min, year_max, mileage_min, mileage_max, fuel[], gearbox[], sort, page. - GET /v1/standvirtual/taxonomy: Taxonomy. 1 credit. Params: make. ## Startpage API https://perceptlayer.com/apis/startpage - GET /v1/startpage/search: Search. 1 credit. Params: query*, language, page, safe_search. ## Steam API https://perceptlayer.com/apis/steam - GET /v1/steam/app: App. 1 credit. Params: appids*, cc, l. - GET /v1/steam/profile: Profile. 1 credit. Params: identifier*, include_html. - GET /v1/steam/reviews: Reviews. 1 credit. Params: appid*, language, num_per_page, purchase_type, filter, review_type, day_range, cursor, include_histogram. - GET /v1/steam/search: Search. 1 credit. Params: term*, l, cc. ## StepStone API https://perceptlayer.com/apis/stepstone - GET /v1/stepstone/autosuggest: Autosuggest. 1 credit. Params: query*, country, limit. - GET /v1/stepstone/jobs: Jobs. 1 credit. Params: query*, location, country, radius, sort, job_type, work_from_home, date_posted, page, limit. ## Stocktwits API https://perceptlayer.com/apis/stocktwits - GET /v1/stocktwits/stream-symbol: Stream Symbol. 1 credit. Params: symbol*, limit, max, since. - GET /v1/stocktwits/symbols-search: Symbols Search. 1 credit. Params: q*. - GET /v1/stocktwits/symbols-trending: Symbols Trending. 1 credit. ## StockX API https://perceptlayer.com/apis/stockx - GET /v1/stockx/product: Product. 1 credit. Params: url, slug, id, country*, currency*. - GET /v1/stockx/sales: Sales. 1 credit. Params: product*, size, country*, currency*. - GET /v1/stockx/search: Search. 1 credit. Params: query, category, brand, gender, min_price, max_price, sort*, page*, country*, currency*. ## StubHub API https://perceptlayer.com/apis/stubhub - GET /v1/stubhub/events-search: Events Search. 1 credit. Params: q, city, lat, lng, start_date, end_date, category, page. ## Subito API https://perceptlayer.com/apis/subito - GET /v1/subito/categories: Categories. 1 credit. - GET /v1/subito/listing: Listing. 1 credit. Params: urn*. - GET /v1/subito/places: Places. 1 credit. Params: query*, limit. - GET /v1/subito/regions: Regions. 1 credit. - GET /v1/subito/search: Search. 1 credit. Params: q, c, t, r, ci, to, ps, pe, rs, re, szs, sze, advt, sort, lim, start. ## Subito Motori API https://perceptlayer.com/apis/subito-motori - GET /v1/subito-motori/dealers: Dealers. 1 credit. Params: shopId*. - GET /v1/subito-motori/dealers-listings: Dealers Listings. 1 credit. Params: shopId*, uid, q, sort, lim, start. - GET /v1/subito-motori/dealers-search: Dealers Search. 1 credit. Params: q, r, sort, lim. - GET /v1/subito-motori/filters: Filters. 1 credit. Params: category. - GET /v1/subito-motori/listings: Listings. 1 credit. Params: urn*. - GET /v1/subito-motori/makes: Makes. 1 credit. Params: category. - GET /v1/subito-motori/makes-models: Makes Models. 1 credit. Params: brandKey*, category. - GET /v1/subito-motori/search: Search. 1 credit. Params: c, q, qso, cb, cm[], t, sort, ps, pe, ms, me, ys, ye, hps, hpe, eps, epe, fl[], gr, ct[], pl[], cl[], cvs[], dr, ss, se, advt[], eq[], ic[], r, ci, to, ndo, urg, shp, vatd, qltsf, qsms[], lim, start. ## Substack API https://perceptlayer.com/apis/substack - GET /v1/substack/comments: Comments. 1 credit. Params: publication*, post_id*. - GET /v1/substack/post: Post. 1 credit. Params: publication*, slug*. - GET /v1/substack/posts: Posts. 1 credit. Params: publication*, sort, offset, cursor, limit. - GET /v1/substack/publication: Publication. 1 credit. Params: publication*. ## SuperCasa API https://perceptlayer.com/apis/supercasa - GET /v1/supercasa/autocomplete: Autocomplete. 1 credit. Params: location, location_selection_token, location_level, business, category. - GET /v1/supercasa/filters: Filters. 1 credit. - GET /v1/supercasa/property: Property. 1 credit. Params: listing_id*. - GET /v1/supercasa/search: Search. 1 credit. Params: location, location_level, location_selection_token, business, category, category_ids[], condition, min_price, max_price, min_area, max_area, min_bedrooms, max_bedrooms, bathrooms, features[], sort, page. ## SUUMO API https://perceptlayer.com/apis/suumo - GET /v1/suumo/areas: Areas. 1 credit. Params: prefecture*, city. - GET /v1/suumo/lines: Lines. 1 credit. Params: prefecture*, line, line_group, area_code. - GET /v1/suumo/rent-listing: Rent Listing. 1 credit. Params: id*. - GET /v1/suumo/rent-search: Rent Search. 1 credit. Params: prefecture*, city, station, line, line_group, area_code, rent_min, rent_max, area_min, area_max, walk_max, age_max, layouts, sort, per_page, page. - GET /v1/suumo/sale-listing: Sale Listing. 1 credit. Params: id*, property_type*, prefecture*, city*. - GET /v1/suumo/sale-search: Sale Search. 1 credit. Params: prefecture*, property_type, city, price_min, price_max, area_min, area_max, land_area_min, land_area_max, walk_max, age_max, layouts, sort, per_page, page. ## Target API https://perceptlayer.com/apis/target - GET /v1/target/product: Product. 1–2 credits. 1 credit, plus 1 with include_fulfillment when store availability loads. Params: tcin*, url, store_id, zip, include_fulfillment. - GET /v1/target/reviews: Reviews. 1 credit. Params: tcin*, sort, page, size, verified_only, photos_only. - GET /v1/target/search: Search. 1 credit. Params: query*, page, sort, min_price, max_price, store_id, zip, category, include_fulfillment. - GET /v1/target/stores: Stores. 1 credit. Params: zip*. ## TCGplayer API https://perceptlayer.com/apis/tcgplayer - GET /v1/tcgplayer/price-history: Price History. 1 credit. Params: id*, range*. - GET /v1/tcgplayer/product: Product. 1 credit. Params: id, url. - GET /v1/tcgplayer/search: Search. 1 credit. Params: query, product_line*, set, page*, size*. ## Tecnocasa API https://perceptlayer.com/apis/tecnocasa - GET /v1/tecnocasa/agency: Agency. 1 credit. Params: url, country, path. - GET /v1/tecnocasa/agency-listings: Agency Listings. 1 credit. Params: agency_id*, country, listing_type, city_id*, province*, region, min_price, max_price, min_surface, max_surface, min_rooms, max_rooms, bathrooms, property_type, district_ids[], sort, page, limit. - GET /v1/tecnocasa/geo: Geo. 1 credit. Params: country, type*, city_id. - GET /v1/tecnocasa/listing: Listing. 1 credit. Params: url, country, path. - GET /v1/tecnocasa/locations: Locations. 1 credit. Params: country, q*. - GET /v1/tecnocasa/search: Search. 1 credit. Params: country, listing_type, city_id*, province*, region, min_price, max_price, min_surface, max_surface, min_rooms, max_rooms, bathrooms, property_type, district_ids[], agency_id, sort, page, limit. - GET /v1/tecnocasa/search-map: Search Map. 1 credit. Params: country, listing_type, city_id*, province*, region, min_price, max_price, min_surface, max_surface, min_rooms, max_rooms, bathrooms, property_type, district_ids[], agency_id. ## Telegram API https://perceptlayer.com/apis/telegram - GET /v1/telegram/channels: Channels. 1 credit. Params: username*. - GET /v1/telegram/channels-posts: Channels Posts. 1 credit. Params: username*, before. - GET /v1/telegram/channels-search: Channels Search. 1 credit. Params: username*, q*. - GET /v1/telegram/posts: Posts. 1 credit. Params: username*, post_id*, context. ## The RealReal API https://perceptlayer.com/apis/therealreal - GET /v1/therealreal/product: Product. 1 credit. Params: url, sku. - GET /v1/therealreal/search: Search. 1 credit. Params: query, category, designer[], color[], clothing_size[], shoe_size[], taxon_id[], condition[], price_min, price_max, on_sale, with_tags, vintage, editors_picks, page. ## Threads API https://perceptlayer.com/apis/threads - GET /v1/threads/oembed: Oembed. 1 credit. Params: url*. - GET /v1/threads/post: Post. 1 credit. Params: username*, code*. - GET /v1/threads/profile: Profile. 1 credit. Params: username*. - GET /v1/threads/search: Search. 1 credit. Params: query*. - GET /v1/threads/search-users: Search Users. 1 credit. Params: query*. - GET /v1/threads/tag: Tag. 1 credit. Params: name*. - GET /v1/threads/user-posts: User Posts. 1 credit. Params: username*, user_id. - GET /v1/threads/user-replies: User Replies. 1 credit. Params: username*, user_id. ## thredUP API https://perceptlayer.com/apis/thredup - GET /v1/thredup/product: Product. 1 credit. Params: item_number, url. - GET /v1/thredup/search: Search. 1 credit. Params: query, department, category, brand_id[], size_id[], condition[], color[], price_min, price_max, sort, page, per_page. ## Ticketmaster API https://perceptlayer.com/apis/ticketmaster - GET /v1/ticketmaster/artist: Artist. 1 credit. Params: artist_id*, page, page_size, domain. - GET /v1/ticketmaster/artists-search: Artists Search. 1 credit. Params: q*, domain. - GET /v1/ticketmaster/event: Event. 1 credit. Params: event_id, url, domain. - GET /v1/ticketmaster/events-search: Events Search. 1 credit. Params: q, city, lat, lng, start_date, end_date, category, sort, page, page_size, domain. - GET /v1/ticketmaster/venue: Venue. 1 credit. Params: venue_id*, page, page_size, domain. - GET /v1/ticketmaster/venues-search: Venues Search. 1 credit. Params: q*, domain. ## TikTok API https://perceptlayer.com/apis/tiktok - GET /v1/tiktok/ads-details: Ads Details. 1 credit. Params: url*. - GET /v1/tiktok/challenges-details: Challenges Details. 1 credit. Params: challenge_id, challenge_name. - GET /v1/tiktok/challenges-posts: Challenges Posts. 1 credit. Params: challenge_id, challenge_name, region, count, cursor. - GET /v1/tiktok/challenges-search: Challenges Search. 1 credit. Params: keywords*, count, cursor. - GET /v1/tiktok/collections-details: Collections Details. 1 credit. Params: collection_id*. - GET /v1/tiktok/collections-list: Collections List. 1 credit. Params: unique_id, user_id, count, cursor. - GET /v1/tiktok/collections-posts: Collections Posts. 1 credit. Params: collection_id*, count, cursor. - GET /v1/tiktok/comments-list: Comments List. 1 credit. Params: url*, count, cursor. - GET /v1/tiktok/comments-replies: Comments Replies. 1 credit. Params: comment_id*, video_id, count, cursor. - GET /v1/tiktok/feed-list: Feed List. 1 credit. Params: region*, count. - GET /v1/tiktok/feed-search: Feed Search. 1 credit. Params: keywords*, count, cursor, region, publish_time, sort_type. - GET /v1/tiktok/live-details: Live Details. 1 credit. Params: room_id*. - GET /v1/tiktok/music-details: Music Details. 1 credit. Params: url*. - GET /v1/tiktok/music-posts: Music Posts. 1 credit. Params: music_id*, count, cursor. - GET /v1/tiktok/playlists-details: Playlists Details. 1 credit. Params: mix_id*. - GET /v1/tiktok/playlists-list: Playlists List. 1 credit. Params: unique_id, user_id, count, cursor. - GET /v1/tiktok/playlists-posts: Playlists Posts. 1 credit. Params: mix_id*, count, cursor. - GET /v1/tiktok/regions: Regions. 1 credit. - GET /v1/tiktok/search-suggestions: Search Suggestions. 1 credit. Params: query*. - GET /v1/tiktok/transcript: Transcript. 1 credit. Params: url, video_id, language. - GET /v1/tiktok/trending-hashtags: Trending Hashtags. 1 credit. Params: country_code*, time_range. - GET /v1/tiktok/user-favorites: User Favorites. 1 credit. Params: unique_id, user_id, time, count, cursor. - GET /v1/tiktok/user-followers: User Followers. 1 credit. Params: unique_id, user_id, count, time. - GET /v1/tiktok/user-following: User Following. 1 credit. Params: unique_id, user_id, count, time. - GET /v1/tiktok/user-live: User Live. 1 credit. Params: unique_id*, count. - GET /v1/tiktok/user-posts: User Posts. 1 credit. Params: unique_id, user_id, count, cursor. - GET /v1/tiktok/user-profile: User Profile. 1 credit. Params: unique_id, user_id. - GET /v1/tiktok/user-search: User Search. 1 credit. Params: keywords*, count, cursor. - GET /v1/tiktok/user-similar: User Similar. 1 credit. Params: unique_id, user_id, count. - GET /v1/tiktok/user-story: User Story. 1 credit. Params: unique_id, user_id. - GET /v1/tiktok/video: Video. 1 credit. Params: url*, hd. ## TOCTOC API https://perceptlayer.com/apis/toctoc - GET /v1/toctoc/agencies: Agencies. 1 credit. Params: type*. - GET /v1/toctoc/agency: Agency. 1 credit. Params: agency_id, agency_type, url. - GET /v1/toctoc/autocomplete: Autocomplete. 1 credit. Params: query*, limit. - GET /v1/toctoc/listing: Listing. 1 credit. Params: url, hash_id. - GET /v1/toctoc/search: Search. 1 credit. Params: operation, region_id, commune_id, property_type, state, publisher_type, agency, agency_type, currency, min_price, max_price, min_bedrooms, max_bedrooms, min_bathrooms, max_bathrooms, min_area, max_area, sort, page, limit. ## Tokopedia API https://perceptlayer.com/apis/tokopedia - GET /v1/tokopedia/product: Product. 1 credit. Params: url, shop_domain, product_key. - GET /v1/tokopedia/reviews: Reviews. 1 credit. Params: product_id*, page. - GET /v1/tokopedia/search: Search. 1 credit. Params: query*, page, sort, min_price, max_price, min_rating, category, location. - GET /v1/tokopedia/shop: Shop. 1 credit. Params: sid*. - GET /v1/tokopedia/shop-products: Shop Products. 1 credit. Params: sid*, page, sort, min_price, max_price. ## Trade Me Property API https://perceptlayer.com/apis/trademe-property - GET /v1/trademe-property/listing: Listing. 1 credit. Params: id*. - GET /v1/trademe-property/localities: Localities. 1 credit. - GET /v1/trademe-property/search-rent: Search Rent. 1 credit. Params: page, rows, price_min, price_max, bedrooms_min, bedrooms_max, bathrooms_min, property_type, region, district, suburb, search_string, sort_order, pets_ok. - GET /v1/trademe-property/search-sale: Search Sale. 1 credit. Params: page, rows, price_min, price_max, bedrooms_min, bedrooms_max, bathrooms_min, property_type, region, district, suburb, search_string, sort_order. ## Trader Joe's API https://perceptlayer.com/apis/trader-joes - GET /v1/trader-joes/categories: Categories. 1 credit. - GET /v1/trader-joes/product: Product. 1 credit. Params: sku, url. - GET /v1/trader-joes/search: Search. 1 credit. Params: query*, page, per_page. ## TradingView API https://perceptlayer.com/apis/tradingview - GET /v1/tradingview/ideas: Ideas. 1 credit. Params: symbol, sort, page. - POST /v1/tradingview/screener-snapshot: Screener Snapshot. 1 credit. Params: symbols*, columns*, market, page, range. - GET /v1/tradingview/symbol-search: Symbol Search. 1 credit. Params: text*. ## Trainline API https://perceptlayer.com/apis/trainline - GET /v1/trainline/cards: Cards. 1 credit. - GET /v1/trainline/cards-discounts: Cards Discounts. 1 credit. - GET /v1/trainline/fares-best: Fares Best. 1 credit. - GET /v1/trainline/fares-calendar: Fares Calendar. 1 credit. Params: origin*, destination*, date_from*, date_to*, currency. - GET /v1/trainline/fares-calendar-return: Fares Calendar Return. 1 credit. Params: origin*, destination*, date_from*, date_to*, return_from*, return_to*, currency. - GET /v1/trainline/fares-calendar-times: Fares Calendar Times. 1 credit. Params: origin*, destination*, date_from*, date_to*, currency. - GET /v1/trainline/journeys: Journeys. 1 credit. Params: origin*, destination*, date*, time, journey_type, return_date, return_time, adults, children, child_age, transport_mode, currency. - GET /v1/trainline/journeys-calling-points: Journeys Calling Points. 1 credit. Params: timetable_id*, carrier*, departure_time*, origin*, destination*. - GET /v1/trainline/journeys-local-transport: Journeys Local Transport. 1 credit. Params: search_id*, alternative_ids[], currency. - GET /v1/trainline/journeys-page: Journeys Page. 1 credit. Params: search_id*, direction, page, transport_mode, currency. - GET /v1/trainline/journeys-price-prediction: Journeys Price Prediction. 1 credit. Params: search_id*, journey_id*, currency. - GET /v1/trainline/journeys-return: Journeys Return. 1 credit. Params: search_id*, journey_id*, alternative_ids[], transport_mode, currency. - GET /v1/trainline/journeys-ticket-options: Journeys Ticket Options. 1 credit. Params: search_id*, outward_journey_id*, inward_journey_id, currency. - GET /v1/trainline/stations: Stations. 1 credit. Params: query*, limit, locale. - GET /v1/trainline/stations-nearby: Stations Nearby. 1 credit. Params: station_id*, window, locale. ## Trendyol API https://perceptlayer.com/apis/trendyol - GET /v1/trendyol/filters: Filters. 1 credit. Params: query*. - GET /v1/trendyol/product: Product. 1 credit. Params: id, url. - GET /v1/trendyol/reviews: Reviews. 1 credit. Params: id*, page. - GET /v1/trendyol/search: Search. 1 credit. Params: query*, page, sort, brand_id, gender, color, category_id, min_price, max_price, min_rating. ## Trip.com API https://perceptlayer.com/apis/trip-com - GET /v1/trip-com/attractions-detail: Attractions Detail. 1 credit. Params: id, url, currency, locale. - GET /v1/trip-com/attractions-reviews: Attractions Reviews. 1 credit. Params: id*, page, page_size, locale. - GET /v1/trip-com/attractions-search: Attractions Search. 1 credit. Params: query*, page, sort, currency, locale. - GET /v1/trip-com/buses-search: Buses Search. 1 credit. Params: from*, to*, date*, currency, locale. - GET /v1/trip-com/cars-locations: Cars Locations. 1 credit. Params: query*, locale. - GET /v1/trip-com/cars-search: Cars Search. 10 credits. Params: pickup_location*, pickup_city_id*, pickup_location_name*, pickup_latitude*, pickup_longitude*, dropoff_location, dropoff_city_id, dropoff_location_name, dropoff_latitude, dropoff_longitude, pickup_datetime*, dropoff_datetime*, driver_age, page, page_size, car_class, supplier, transmission, free_cancellation, currency, locale. - GET /v1/trip-com/cruises-detail: Cruises Detail. 1 credit. Params: id*, departure_date, currency, locale. - GET /v1/trip-com/cruises-search: Cruises Search. 1 credit. Params: destination, month, start_date, end_date, page, sort, currency, locale. - GET /v1/trip-com/flights-calendar: Flights Calendar. 1 credit. Params: from*, to*, date*, return_date, currency. - GET /v1/trip-com/flights-search: Flights Search. 1–3 credits. 1 credit one way, 3 with return_date. Params: from*, to*, date*, return_date, policy_id, adults, cabin_class, currency. - GET /v1/trip-com/hotels-detail: Hotels Detail. 1 credit. Params: hotel_id, url, locale. - GET /v1/trip-com/hotels-filters: Hotels Filters. 1 credit. Params: city_id*, check_in*, check_out*, locale, currency. - GET /v1/trip-com/hotels-reviews: Hotels Reviews. 1 credit. Params: hotel_id*, page, page_size, sort. - GET /v1/trip-com/hotels-rooms: Hotels Rooms. 10 credits. Params: hotel_id*, check_in*, check_out*, adults, children_ages, currency, locale. - GET /v1/trip-com/hotels-search: Hotels Search. 1–18 credits. 1 credit for the first page in the default order; 3 per page from page 2, for each page read with pages, or with guest_score_min, free_cancellation, breakfast or another sort. At most 18. Params: city_id*, check_in*, check_out*, adults, children_ages[], rooms, page, pages, guest_score_min, free_cancellation, breakfast, stars[], min_price, max_price, sort, locale, currency. - GET /v1/trip-com/packages-search: Packages Search. 3 credits. Params: from*, to*, city_id*, date*, return_date*, adults, page, currency. - GET /v1/trip-com/suggest: Suggest. 1 credit. Params: query*, type, locale. - GET /v1/trip-com/trains-calendar: Trains Calendar. 1 credit. Params: from*, to*, date*, currency, locale. - GET /v1/trip-com/trains-search: Trains Search. 3 credits. Params: from*, to*, date*, adults, currency, locale. - GET /v1/trip-com/trains-stations: Trains Stations. 1 credit. Params: mode, query, country. ## Tripadvisor API https://perceptlayer.com/apis/tripadvisor - GET /v1/tripadvisor/place: Place. 1 credit. Params: location_id*, locale. - GET /v1/tripadvisor/reviews: Reviews. 1 credit. Params: location_id*, offset, limit, language. - GET /v1/tripadvisor/search: Search. 1 credit. Params: q*, locale, limit, type. ## Trivago API https://perceptlayer.com/apis/trivago - GET /v1/trivago/deals: Deals. 1 credit. Params: hotel_id*, check_in*, check_out*, adults, rooms, children_ages[], currency, market. - GET /v1/trivago/filters: Filters. 1 credit. Params: destination_id*, market. - GET /v1/trivago/hotel: Hotel. 1 credit. Params: hotel_id*, market. - GET /v1/trivago/price-calendar: Price Calendar. 1 credit. Params: hotel_id*, start_date*, end_date*, currency, market. - GET /v1/trivago/reviews: Reviews. 1 credit. Params: hotel_id*, limit, offset, language, market. - GET /v1/trivago/search: Search. 1 credit. Params: check_in*, check_out*, adults, rooms, children_ages[], currency, market, destination_id*, limit, offset, sort, min_price, max_price, stars[], min_rating, property_type[], amenities[]. - GET /v1/trivago/suggest: Suggest. 1 credit. Params: query*, market. ## TrueCar API https://perceptlayer.com/apis/truecar - GET /v1/truecar/listing: Listing. 1 credit. Params: vin*. - GET /v1/truecar/search: Search. 1 credit. Params: make*, model*, condition, page, postal_code, radius. ## Trulia API https://perceptlayer.com/apis/trulia - GET /v1/trulia/listing: Listing. 1 credit. Params: url*. - GET /v1/trulia/listing-by-id: Listing By Id. 1 credit. Params: id*. - GET /v1/trulia/neighborhood-insights: Neighborhood Insights. 1 credit. Params: url*. - GET /v1/trulia/schools: Schools. 1 credit. Params: url*. ## Trusted Shops API https://perceptlayer.com/apis/trusted-shops - GET /v1/trusted-shops/categories: Categories. 1 credit. Params: market. - GET /v1/trusted-shops/category-shops: Category Shops. 1 credit. Params: category*, page, market. - GET /v1/trusted-shops/markets: Markets. 1 credit. - GET /v1/trusted-shops/reviews: Reviews. 1 credit. Params: tsid*, page, size. - GET /v1/trusted-shops/search: Search. 1 credit. Params: q*, page, market. - GET /v1/trusted-shops/shop: Shop. 1 credit. Params: tsid*. ## Trustpilot API https://perceptlayer.com/apis/trustpilot - GET /v1/trustpilot/businesses: Businesses. 1 credit. Params: category*, page, sort, claimed, country, limit, trustscore. - GET /v1/trustpilot/categories: Categories. 1 credit. - GET /v1/trustpilot/company-details: Company Details. 1 credit. Params: company_domain*, locale. - GET /v1/trustpilot/company-reviews: Company Reviews. 1 credit. Params: company_domain*, page, per_page, verified, with_replies, query, rating, sort, locale, languages, fields, date_posted. - GET /v1/trustpilot/company-search: Company Search. 1 credit. Params: query*, page, country, min_rating, min_review_count, locale. - GET /v1/trustpilot/countries: Countries. 1 credit. ## TrustRadius API https://perceptlayer.com/apis/trustradius - GET /v1/trustradius/search: Search. 1 credit. Params: query*, type. ## Truth Social API https://perceptlayer.com/apis/truth-social - GET /v1/truth-social/featured-truth: Featured Truth. 1 credit. - GET /v1/truth-social/live-shows: Live Shows. 1 credit. - GET /v1/truth-social/post: Post. 1 credit. Params: post_id*. - GET /v1/truth-social/profile: Profile. 1 credit. Params: username*. - GET /v1/truth-social/tag-timeline: Tag Timeline. 1 credit. Params: tag*, limit, max_id. - GET /v1/truth-social/user-posts: User Posts. 1 credit. Params: account_id*, limit, max_id, until, since, only_media, exclude_reblogs, exclude_replies. - GET /v1/truth-social/video: Video. 1 credit. Params: video_id*. ## Tumblr API https://perceptlayer.com/apis/tumblr - GET /v1/tumblr/blog: Blog. 1 credit. Params: blog*, fields. - GET /v1/tumblr/post: Post. 1 credit. Params: blog*, post_id*. - GET /v1/tumblr/posts: Posts. 1 credit. Params: blog*, cursor, npf, reblog_info, include_pinned_posts, fields. - GET /v1/tumblr/tagged: Tagged. 1 credit. Params: tag*, cursor, sort, limit. ## Turo API https://perceptlayer.com/apis/turo - GET /v1/turo/car: Car. 1 credit. Params: vehicle_id*, country*. - GET /v1/turo/facets: Facets. 1 credit. Params: country*. - GET /v1/turo/search: Search. 1 credit. Params: country*, latitude*, longitude*, start_date*, end_date*, start_time, end_time, vehicle_type*, year_min, year_max, sort_type*, sort_direction*, price_min, price_max, page*. ## Twitch API https://perceptlayer.com/apis/twitch - GET /v1/twitch/channel: Channel. 1 credit. Params: login*. - GET /v1/twitch/channels: Channels. 1 credit. Params: logins[]. - GET /v1/twitch/clip: Clip. 1 credit. Params: slug*. - GET /v1/twitch/clips: Clips. 1 credit. Params: login*, first, after, sort, period. - GET /v1/twitch/game: Game. 1 credit. Params: id*, first. - GET /v1/twitch/game-clips: Game Clips. 1 credit. Params: id*, first, after. - GET /v1/twitch/games: Games. 1 credit. Params: first, after. - GET /v1/twitch/schedule: Schedule. 1 credit. Params: channel*, first, week_of. - GET /v1/twitch/search: Search. 1 credit. Params: query*, first, after, live_channels_after, games_after, videos_after. - GET /v1/twitch/search-games: Search Games. 1 credit. Params: query*, first, after. - GET /v1/twitch/search-streams: Search Streams. 1 credit. Params: query*, first, after. - GET /v1/twitch/search-users: Search Users. 1 credit. Params: query*, first, after. - GET /v1/twitch/streams: Streams. 1 credit. Params: first, after, sort. - GET /v1/twitch/suggestions: Suggestions. 1 credit. Params: query*, include_offline. - GET /v1/twitch/tags: Tags. 1 credit. Params: query*, limit. - GET /v1/twitch/team: Team. 1 credit. Params: name*. - GET /v1/twitch/video: Video. 1 credit. Params: id*. - GET /v1/twitch/videos: Videos. 1 credit. Params: login*, first, page. ## Uber Eats API https://perceptlayer.com/apis/uber-eats - GET /v1/uber-eats/store: Store. 1–11 credits. 1 credit, plus 1 for each of the first 10 items whose options load with include_options; at most 11. Params: store*, include_options, lat*, lng*, market. - GET /v1/uber-eats/stores: Stores. 1 credit. Params: query*, sort, min_rating, offset, page_size, lat*, lng*, market. ## Uniqlo API https://perceptlayer.com/apis/uniqlo - GET /v1/uniqlo/product: Product. 1 credit. Params: id, url, price_group, region. - GET /v1/uniqlo/search: Search. 1 credit. Params: query*, page, region, colorCodes, sizeCodes, flagCodes, priceRanges, category, sort. - GET /v1/uniqlo/store-stock: Store Stock. 1 credit. Params: id, url, price_group, region, l2_id, color, size, keyword, lat, lon, limit. ## Upwork API https://perceptlayer.com/apis/upwork - GET /v1/upwork/jobs: Jobs. 1 credit. Params: query, category, budget, job_type, experience, page. ## Urbania API https://perceptlayer.com/apis/urbania - GET /v1/urbania/agency: Agency. 1 credit. Params: id*, slug, page. - GET /v1/urbania/autocomplete: Autocomplete. 1 credit. Params: q*, limit. - GET /v1/urbania/listing: Listing. 1 credit. Params: url, id. - GET /v1/urbania/search: Search. 1 credit. Params: operation, property_type, location, price_min, price_max, currency, bedrooms_min, bedrooms_max, bathrooms_min, area_min, area_max, sort, exclude_projects, page. ## Vestiaire Collective API https://perceptlayer.com/apis/vestiaire - GET /v1/vestiaire/product: Product. 1 credit. Params: product*, country, locale. - GET /v1/vestiaire/search: Search. 1 credit. Params: query, brand[], category[], size[], condition[], color[], material[], seller_country[], price_min, price_max, sold, sort, size_type, page, per_page, country, locale. ## Viator API https://perceptlayer.com/apis/viator - GET /v1/viator/product: Product. 1 credit. Params: product_code*. - GET /v1/viator/reviews: Reviews. 1 credit. Params: product_code*. - GET /v1/viator/search: Search. 1 credit. Params: destination_id*, page. ## ViewIt API https://perceptlayer.com/apis/viewit - GET /v1/viewit/agency: Agency. 1 credit. Params: id*, page. - GET /v1/viewit/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/viewit/listing: Listing. 1 credit. Params: id*, path. - GET /v1/viewit/search: Search. 1 credit. Params: city_id*, page, bedrooms, price_min, price_max, keyword, furnished, loft, retirement, short_term. ## Vimeo API https://perceptlayer.com/apis/vimeo - GET /v1/vimeo/search: Search. 1 credit. Params: q*, page, per_page. - GET /v1/vimeo/user: User. 1 credit. Params: id*, page. - GET /v1/vimeo/video: Video. 1 credit. Params: id*. ## Vinted API https://perceptlayer.com/apis/vinted - GET /v1/vinted/categories: Categories. 1 credit. Params: country. - GET /v1/vinted/countries: Countries. 1 credit. - GET /v1/vinted/filters: Filters. 1 credit. Params: q, query, page, per_page, order, brand_ids, catalog_ids, color_ids, size_ids, material_ids, status_ids, price_from, price_to, country. - GET /v1/vinted/item-details: Item Details. 1–2 credits. 1 credit, plus 1 with include_member_items. Params: item_id*, country, include_member_items. - GET /v1/vinted/item-shipping: Item Shipping. 1 credit. Params: item_id*, country. - GET /v1/vinted/search: Search. 1 credit. Params: q, query, page, per_page, order, brand_ids, catalog_ids, color_ids, size_ids, material_ids, status_ids, price_from, price_to, country. - GET /v1/vinted/similar-items: Similar Items. 1 credit. Params: item_id*, page, country. - GET /v1/vinted/suggestions: Suggestions. 1 credit. Params: query*, country. - GET /v1/vinted/user-items: User Items. 1 credit. Params: user_id*, page, per_page, order, country. - GET /v1/vinted/user-profile: User Profile. 1 credit. Params: user_id*, country. ## VivaReal API https://perceptlayer.com/apis/vivareal - GET /v1/vivareal/advertiser: Advertiser. 1 credit. Params: portal, advertiser_id*. - GET /v1/vivareal/advertiser-listings: Advertiser Listings. 1 credit. Params: portal, advertiser_id*, business, rows, page. - GET /v1/vivareal/count: Count. 1 credit. Params: portal, business, rows, page, location_id, q, advertiser_id. - GET /v1/vivareal/listing: Listing. 1 credit. Params: portal, id*, business. - GET /v1/vivareal/location-autocomplete: Location Autocomplete. 1 credit. Params: portal, q*, size. - GET /v1/vivareal/map-pins: Map Pins. 1 credit. Params: portal, business, rows, page, location_id, q, advertiser_id. - GET /v1/vivareal/parse-filters: Parse Filters. 1 credit. Params: portal, q*. - GET /v1/vivareal/price-insights: Price Insights. 1 credit. Params: portal, city*, state*, neighborhood, business_type*, unit_type*, latitude*, longitude*, location_id*. - GET /v1/vivareal/search: Search. 1 credit. Params: portal, business, rows, page, location_id, q, advertiser_id, price_min, price_max, bedrooms, area_min, sort. ## VK API https://perceptlayer.com/apis/vk - GET /v1/vk/community: Community. 1 credit. Params: group_id*, fields. - GET /v1/vk/post: Post. 1 credit. Params: post_id*, extended. - GET /v1/vk/profile: Profile. 1 credit. Params: user_id*, fields. - GET /v1/vk/wall: Wall. 1 credit. Params: domain*, offset, count, extended. ## Vrbo API https://perceptlayer.com/apis/vrbo - GET /v1/vrbo/destinations: Destinations. 1 credit. Params: query*. - GET /v1/vrbo/filters: Filters. 1 credit. Params: check_in, check_out, adults, children, destination, region_id, map_bounds. - GET /v1/vrbo/listing: Listing. 1 credit. Params: check_in, check_out, adults, children, property_id*. - GET /v1/vrbo/listing-availability: Listing Availability. 1 credit. Params: property_id*, start_date, end_date. - GET /v1/vrbo/listing-reviews: Listing Reviews. 1 credit. Params: property_id*, sort, limit, offset. - GET /v1/vrbo/search: Search. 1 credit. Params: check_in*, check_out*, adults, children, destination, region_id, map_bounds, sort, min_price, max_price, price_type, premier_host, virtual_tour, limit, offset, property_type, amenities, location, house_rules, guest_rating, good_for, common_spaces, accessibility, nearby_activities, safety, booking_options, discounts, free_cancellation, beach_access, popular, neighborhood, bedrooms, bathrooms, beds, king_beds, queen_beds, full_beds, twin_beds, bunk_beds. ## Vuokraovi API https://perceptlayer.com/apis/vuokraovi - GET /v1/vuokraovi/agency: Agency. 1 credit. Params: id*. - GET /v1/vuokraovi/districts: Districts. 1 credit. Params: municipality_code*. - GET /v1/vuokraovi/listing: Listing. 1 credit. Params: id*. - GET /v1/vuokraovi/location-autocomplete: Location Autocomplete. 1 credit. Params: q*, type, page. - GET /v1/vuokraovi/search: Search. 1 credit. Params: location_code, location_type, parent_region_code, min_rent, max_rent, min_size, max_size, min_year, max_year, rooms, property_type, kitchen_type, condition, living_form, lessor_type, published_within, new_building, rental_agreement, available_immediately, has_images, has_panorama, has_video, has_showing_within_7_days, query, office_id, sort, direction, limit, page. ## Wallapop API https://perceptlayer.com/apis/wallapop - GET /v1/wallapop/categories: Categories. 1 credit. Params: context, search_country. - GET /v1/wallapop/filters: Filters. 1 credit. Params: keywords, category_id, order_by, search_country. - GET /v1/wallapop/items: Items. 1 credit. Params: item_id*, include_seller. - GET /v1/wallapop/items-by-legacy-id: Items By Legacy Id. 1 credit. Params: legacy_item_id*. - GET /v1/wallapop/items-legacy-id: Items Legacy Id. 1 credit. Params: item_id*. - GET /v1/wallapop/items-seller-items: Items Seller Items. 1 credit. Params: item_id*, cursor. - GET /v1/wallapop/markets: Markets. 1 credit. - GET /v1/wallapop/postal-codes: Postal Codes. 1 credit. Params: postal_code*, country_iso_code. - GET /v1/wallapop/search: Search. 1 credit. Params: keywords, category_id, min_price, max_price, latitude, longitude, radius_km, condition, is_shippable, time_filter, order_by, search_country, cursor. - GET /v1/wallapop/suggesters-car-brands: Suggesters Car Brands. 1 credit. Params: search_text, brand. - GET /v1/wallapop/suggesters-car-models: Suggesters Car Models. 1 credit. Params: search_text, brand. - GET /v1/wallapop/suggesters-car-years: Suggesters Car Years. 1 credit. Params: search_text, brand. - GET /v1/wallapop/users: Users. 1 credit. Params: user_id*, include_reputation, include_scoring, include_counters. - GET /v1/wallapop/users-items: Users Items. 1 credit. Params: user_id*, cursor. - GET /v1/wallapop/users-reviews: Users Reviews. 1 credit. Params: user_id*, page. ## Walmart API https://perceptlayer.com/apis/walmart - GET /v1/walmart/autocomplete: Autocomplete. 1 credit. Params: q*, department. - GET /v1/walmart/browse: Browse. 1 credit. Params: slug*, category_id*, page, sort, facet, country. - GET /v1/walmart/categories: Categories. 1 credit. Params: q, page. - GET /v1/walmart/deals: Deals. 1 credit. Params: type, query, page. - GET /v1/walmart/offers: Offers. 1 credit. Params: us_item_id*, country, slug. - GET /v1/walmart/product: Product. 1 credit. Params: us_item_id*, country, slug. - GET /v1/walmart/reviews: Reviews. 1 credit. Params: id*, page, sort, rating, country. - GET /v1/walmart/search: Search. 1 credit. Params: query*, page, sort, min_price, max_price, cat_id, facet_filter, country. - GET /v1/walmart/seller: Seller. 1 credit. Params: seller_id*. - GET /v1/walmart/seller-products: Seller Products. 1 credit. Params: seller_id*, q*, page. - GET /v1/walmart/store: Store. 1 credit. Params: store_id*. ## Wayfair API https://perceptlayer.com/apis/wayfair - GET /v1/wayfair/autocomplete: Autocomplete. 1 credit. Params: query*, domain. - GET /v1/wayfair/category: Category. 1 credit. Params: category_id, url, page, sort, filters, price_min, price_max, domain. - GET /v1/wayfair/product: Product. 1 credit. Params: sku, url, option_ids, domain. - GET /v1/wayfair/reviews: Reviews. 1 credit. Params: variant_id*, limit, cursor, sort, ratings, aspects, search, domain. - GET /v1/wayfair/search: Search. 1 credit. Params: query*, page, domain. ## Waze API https://perceptlayer.com/apis/waze - GET /v1/waze/route: Route. 2 credits. Params: from_lat*, from_lon*, to_lat*, to_lon*, alternatives, avoid_tolls, avoid_ferries, vehicle_type, passes[], include[]. ## Web Scraper API https://perceptlayer.com/apis/web-scraper - POST /v1/web-scraper/crawl: Crawl. 1–110 credits. 1 credit per page fetched, 3 per page that needs a browser, at most 110 per call. Params: url*, limit, max_depth, include_paths, exclude_paths, format, include_subdomains. - GET /v1/web-scraper/map: Map. 1 credit. Params: url*, limit, search, include_subdomains. - GET /v1/web-scraper/scrape: Scrape. 1 credit. Params: url*, include_html, javascript, response_type. - GET /v1/web-scraper/screenshot: Screenshot. 5 credits. Params: url*, full_page, width, height, format, wait_for_selector, remove_overlays, locale, response. ## Website Contacts API https://perceptlayer.com/apis/contacts - GET /v1/contacts/emails: Emails. 1 credit. Params: email_domain*, query, limit, page. - GET /v1/contacts/social-links: Social Links. 1 credit. Params: query*, social_networks. - GET /v1/contacts/website: Website. 1–8 credits. 1 credit per page fetched; max_pages sets how many, up to 8. Params: domain*, max_pages, match_email_domain, include_external. ## Weibo API https://perceptlayer.com/apis/weibo - GET /v1/weibo/hot-search: Hot Search. 1 credit. - GET /v1/weibo/post: Post. 1 credit. Params: mid*, with_comments. - GET /v1/weibo/posts: Posts. 1 credit. Params: uid*, page. - GET /v1/weibo/user: User. 1 credit. Params: uid*. ## Welcome to the Jungle API https://perceptlayer.com/apis/welcome-to-the-jungle - GET /v1/welcome-to-the-jungle/company: Company. 1 credit. Params: organization*. - GET /v1/welcome-to-the-jungle/company-jobs: Company Jobs. 1 credit. Params: organization*, page. - GET /v1/welcome-to-the-jungle/job: Job. 1 credit. Params: organization*, job*. - GET /v1/welcome-to-the-jungle/jobs: Jobs. 1 credit. Params: query, page, per_page, language, contract_type, remote, country_code, latitude, longitude, radius_km. ## Wellfound API https://perceptlayer.com/apis/wellfound - GET /v1/wellfound/company: Company. 1 credit. Params: slug*. - GET /v1/wellfound/job: Job. 1 credit. Params: id*, slug*. - GET /v1/wellfound/jobs: Jobs. 1 credit. Params: q, role, location, remote, salary, page. ## WG-Gesucht API https://perceptlayer.com/apis/wg-gesucht - GET /v1/wg-gesucht/districts: Districts. 1 credit. Params: city_id*. - GET /v1/wg-gesucht/listings: Listings. 1 credit. Params: ids[]*. - GET /v1/wg-gesucht/locations: Locations. 1 credit. Params: query, city_id. - GET /v1/wg-gesucht/search: Search. 1 credit. Params: categories*, city_id*, rent_types*, page, limit, sort_column, sort_order, language, rMin, rMax, sMin, sMax, rmMin, rmMax, aMin, aMax, wgMnF, wgMxT, flo, radDis, radLat, radLng, fur, kit, gar, han, pet, pets_present, sin, exc, ff, bal, bal_or_ter, noDeact, img, img_only, flatshare_friendly, onl_tour, exContAds, exCu, dFr, dTo, dFrDe, dToDe, wgArt, wgFla, wgSmo, wgSea, gen, smo, pu, ad_type, ot, radAdd. ## Whole Foods Market API https://perceptlayer.com/apis/whole-foods - GET /v1/whole-foods/product: Product. 1 credit. Params: id, url, store_id. - GET /v1/whole-foods/search: Search. 1 credit. Params: query*, store_id*, page, per_page, category, diet. - GET /v1/whole-foods/store: Store. 1 credit. Params: store_id*. ## Wikicasa API https://perceptlayer.com/apis/wikicasa - GET /v1/wikicasa/agencies: Agencies. 1 credit. Params: city_id*, page, limit. - GET /v1/wikicasa/agency: Agency. 1 credit. Params: id*. - GET /v1/wikicasa/agency-agents: Agency Agents. 1 credit. Params: agency_id*. - GET /v1/wikicasa/agency-listings: Agency Listings. 1 credit. Params: agency_id*, page, sort. - GET /v1/wikicasa/autocomplete: Autocomplete. 1 credit. Params: query, url. - GET /v1/wikicasa/listing: Listing. 1 credit. Params: id*. - GET /v1/wikicasa/property-types: Property Types. 1 credit. - GET /v1/wikicasa/search: Search. 1 credit. Params: transaction*, city_id*, city_slug*, page, price_min, price_max, area_min, area_max, rooms_min, rooms_max, bathrooms_min, bathrooms_max, property_type, condition, sort. ## Wikipedia API https://perceptlayer.com/apis/wikipedia - GET /v1/wikipedia/article: Article. 1 credit. Params: title*, language. - GET /v1/wikipedia/search: Search. 1 credit. Params: q*, language, page, per_page. ## willhaben API https://perceptlayer.com/apis/willhaben - GET /v1/willhaben/agency: Agency. 1 credit. Params: adId*. - GET /v1/willhaben/agency-listings: Agency Listings. 1 credit. Params: orgId*, rows, page. - GET /v1/willhaben/agency-trust-signals: Agency Trust Signals. 1 credit. Params: userId*. - GET /v1/willhaben/autocomplete: Autocomplete. 1 credit. Params: term*. - GET /v1/willhaben/details: Details. 1 credit. Params: adId*. - GET /v1/willhaben/locations: Locations. 1 credit. Params: area_id, vertical. - GET /v1/willhaben/search: Search. 1 credit. Params: vertical, rows, page, sort, keyword, area_id, price_from, price_to, living_area_from, living_area_to, rooms. - GET /v1/willhaben/similar: Similar. 1 credit. Params: adId*, orgId*. ## wlw API https://perceptlayer.com/apis/wlw - GET /v1/wlw/search: Search. 1 credit. Params: q*, page, per_page, country, countries, category, supplier_type, attributes, verified, top_responder, latitude, longitude, radius, sort, language. ## Wolt API https://perceptlayer.com/apis/wolt - GET /v1/wolt/dishes: Dishes. 1 credit. Params: query*, lat*, lon*, sort, page, per_page. - GET /v1/wolt/menu: Menu. 1 credit. Params: slug*, lat, lon, language. - GET /v1/wolt/restaurants: Restaurants. 1 credit. Params: lat*, lon*, query, cuisine, sort, open_now, page, per_page. - GET /v1/wolt/venue: Venue. 1 credit. Params: slug*, lat, lon, language. ## X (Twitter) API https://perceptlayer.com/apis/x - GET /v1/x/community: Community. 1 credit. Params: community_id*. - GET /v1/x/community-posts: Community Posts. 1 credit. Params: community_id*. - GET /v1/x/notes: Notes. 1 credit. Params: id*. - GET /v1/x/profile: Profile. 1 credit. Params: handle, rest_id, tweet_id. - GET /v1/x/profile-articles: Profile Articles. 1 credit. Params: handle*, count, cursor. - GET /v1/x/profile-followers: Profile Followers. 1 credit. Params: handle*, count, cursor. - GET /v1/x/profile-following: Profile Following. 1 credit. Params: handle*, count, cursor. - GET /v1/x/profile-media: Profile Media. 1 credit. Params: handle*, count, cursor. - GET /v1/x/search-tweets: Search Tweets. 1 credit. Params: q*, count, cursor, lang. - GET /v1/x/search-typeahead: Search Typeahead. 1 credit. Params: q*, result_type. - GET /v1/x/search-users: Search Users. 1 credit. Params: q*, count, cursor, lang. - GET /v1/x/trends: Trends. 1 credit. Params: type, count. - GET /v1/x/tweet: Tweet. 1 credit. Params: id*. - GET /v1/x/tweet-conversation: Tweet Conversation. 1 credit. Params: id*, count, cursor, ranking_mode, about_account, lang. - GET /v1/x/tweet-media: Tweet Media. 1 credit. Params: id*. - GET /v1/x/tweet-quotes: Tweet Quotes. 1 credit. Params: id*, count, cursor. - GET /v1/x/tweet-reposts: Tweet Reposts. 1 credit. Params: id*, count, cursor. - GET /v1/x/tweet-text: Tweet Text. 1 credit. Params: id*. - GET /v1/x/tweet-thread: Tweet Thread. 1 credit. Params: id*. - GET /v1/x/tweet-transcript: Tweet Transcript. 1 credit. Params: id*. - GET /v1/x/tweet-video: Tweet Video. 1 credit. Params: id*. - GET /v1/x/user-tweets: User Tweets. 1 credit. Params: handle*, count, cursor, with_replies, groupthreads, since. ## Xbox Store API https://perceptlayer.com/apis/xbox - GET /v1/xbox/game: Game. 1 credit. Params: id*, region, page. - GET /v1/xbox/search: Search. 1 credit. Params: query*, region, page. ## XING Jobs API https://perceptlayer.com/apis/xing-jobs - GET /v1/xing-jobs/company: Company. 1 credit. Params: slug*. - GET /v1/xing-jobs/job: Job. 1 credit. Params: id*. - GET /v1/xing-jobs/search: Search. 1 credit. Params: query, location, employment_type, remote, salary_min, salary_max, since, page. ## Yaencontre API https://perceptlayer.com/apis/yaencontre - GET /v1/yaencontre/autocomplete: Autocomplete. 1 credit. Params: search_term*, operation*, family*. - GET /v1/yaencontre/filters: Filters. 1 credit. Params: operation*, family*, location*. - GET /v1/yaencontre/listing: Listing. 1 credit. Params: reference*. - GET /v1/yaencontre/listing-related: Listing Related. 1 credit. Params: reference*, page_number*, page_size*. - GET /v1/yaencontre/search: Search. 1 credit. Params: operation*, family*, location, real_estate_agency_id, min_price, max_price, rooms, bathrooms, rental_type, lat_min, lat_max, lon_min, lon_max, size, page_number*, page_size*. ## Yahoo Finance API https://perceptlayer.com/apis/yahoo-finance - GET /v1/yahoo-finance/fundamentals: Fundamentals. 1 credit. Params: symbol*. - GET /v1/yahoo-finance/history: History. 1 credit. Params: symbol*, range, interval. - GET /v1/yahoo-finance/news: News. 1 credit. Params: symbol*. - GET /v1/yahoo-finance/quote: Quote. 1 credit. Params: symbols*. - GET /v1/yahoo-finance/search: Search. 1 credit. Params: q*. ## Yahoo Search API https://perceptlayer.com/apis/yahoo - GET /v1/yahoo/images: Images. 1 credit. Params: q*, page, size, color, type, layout, age, format, license. - GET /v1/yahoo/search: Search. 1 credit. Params: p*, b, pz, vm, vc, vl, fr2. - GET /v1/yahoo/videos: Videos. 1 credit. Params: q*, page, duration, age, site. ## Yahoo! Auctions Japan API https://perceptlayer.com/apis/yahoo-auctions-jp - GET /v1/yahoo-auctions-jp/item: Item. 1 credit. Params: id*. - GET /v1/yahoo-auctions-jp/search: Search. 1 credit. Params: query, category, condition, min_price, max_price, status, sort, page. ## Yandex API https://perceptlayer.com/apis/yandex - GET /v1/yandex/images: Images. 1 credit. Params: text, url, yandex_domain, page, site, orientation, size, file_type. - GET /v1/yandex/search: Search. 1–4 credits. 1 credit, or 4 when the standard route is blocked and the call falls back to a slower one. Params: text*, yandex_domain, lang, lr, family_mode, period, page. - GET /v1/yandex/suggest: Suggest. 1 credit. Params: text*, lang. - GET /v1/yandex/videos: Videos. 1 credit. Params: text*, yandex_domain, page, duration. ## Yellow Pages API https://perceptlayer.com/apis/yellowpages - GET /v1/yellowpages/business: Business. 9 credits. Params: id*. - GET /v1/yellowpages/reviews: Reviews. 9 credits. Params: id*, page. - GET /v1/yellowpages/search: Search. 12 credits. Params: query*, location*, page. ## Yelp API https://perceptlayer.com/apis/yelp - GET /v1/yelp/business: Business. 1 credit. Params: business*. - GET /v1/yelp/menu: Menu. 1 credit. Params: business*. - GET /v1/yelp/reviews: Reviews. 1 credit. Params: business*, sort, rating, after. - GET /v1/yelp/search: Search. 1 credit. Params: query*, location*, limit, page. ## YouTube API https://perceptlayer.com/apis/youtube - GET /v1/youtube/channel: Channel. 1 credit. Params: channel_id, channelId. - GET /v1/youtube/channel-community: Channel Community. 1 credit. Params: channel_id, channelId, continuation. - GET /v1/youtube/channel-playlists: Channel Playlists. 1 credit. Params: channel_id, channelId. - GET /v1/youtube/channel-videos: Channel Videos. 1 credit. Params: channel_id, channelId, limit, page, sort, type, continuation. - GET /v1/youtube/chapters: Chapters. 1 credit. Params: video_id, videoId. - GET /v1/youtube/comments: Comments. 1 credit. Params: video_id*, limit. - GET /v1/youtube/locales: Locales. 1 credit. - GET /v1/youtube/playlist: Playlist. 1 credit. Params: playlist_id*. - GET /v1/youtube/related: Related. 1 credit. Params: video_id*, limit. - GET /v1/youtube/search: Search. 1 credit. Params: query, limit, page, continuation, hl, gl, type, order, videoDuration, publishedAfter, publishedBefore, safeSearch. - GET /v1/youtube/suggestions: Suggestions. 1 credit. Params: query*, hl, gl. - GET /v1/youtube/transcript: Transcript. 1 credit. Params: video_id, videoId, id, language, lang, hl, gl. - GET /v1/youtube/transcript-by-video-id: Transcript By Video Id. 1 credit. Params: videoId*, video_id, id, language, lang, hl, gl. - GET /v1/youtube/trending: Trending. 1 credit. Params: type, gl, hl, continuation. - GET /v1/youtube/video: Video. 1 credit. Params: video_id, videoId. ## Zalando API https://perceptlayer.com/apis/zalando - GET /v1/zalando/brands: Brands. 1 credit. Params: country, query, page, per_page. - GET /v1/zalando/categories: Categories. 1 credit. Params: country. - GET /v1/zalando/product: Product. 1 credit. Params: sku, url, country, include. - GET /v1/zalando/search: Search. 1 credit. Params: query, category, country, page, sort, brand, size, color, filters, price_min, price_max, sale, condition, gender. ## Zara API https://perceptlayer.com/apis/zara - GET /v1/zara/categories: Categories. 1 credit. Params: country, section. - GET /v1/zara/product: Product. 1 credit. Params: id, url, country, color_id. - GET /v1/zara/search: Search. 1 credit. Params: query, category_id, page, country, section. - GET /v1/zara/stores: Stores. 1 credit. Params: lat*, lng*, country. ## Zigbang API https://perceptlayer.com/apis/zigbang - GET /v1/zigbang/agency: Agency. 1 credit. Params: id*. - GET /v1/zigbang/agency-listings: Agency Listings. 1 credit. Params: id*, page, page_size. - GET /v1/zigbang/autocomplete: Autocomplete. 1 credit. Params: q*, service, limit. - GET /v1/zigbang/listing: Listing. 1 credit. Params: id*. - GET /v1/zigbang/search: Search. 1 credit. Params: property_type*, sales_type, lat, lng, subway_id, radius, deposit_min, deposit_max, rent_min, rent_max, price_min, price_max, manage_cost_min, manage_cost_max, size_min, size_max, floor[], room_type[], bathroom_count, elevator, parking, pet, cctv, south_facing, immediate_move, loan_lease, page, page_size. ## Zillow API https://perceptlayer.com/apis/zillow - GET /v1/zillow/agent: Agent. 1 credit. Params: screen_name*. - GET /v1/zillow/agent-listings: Agent Listings. 1 credit. Params: encoded_zuid*, page, page_size, home_status. - GET /v1/zillow/agent-reviews: Agent Reviews. 1 credit. Params: encoded_zuid*, page, page_size, sort_type, sort_order, service_provided_type_ids[]. - GET /v1/zillow/agent-sold: Agent Sold. 1 credit. Params: encoded_zuid*, page, page_size, home_status. - GET /v1/zillow/agents: Agents. 1 credit. Params: location*, page, specialties[], languages[], is_top_agent, is_buying, is_selling. - GET /v1/zillow/autocomplete: Autocomplete. 1 credit. Params: query*, result_count. - GET /v1/zillow/building: Building. 1 credit. Params: slug, lot_id, latitude, longitude. - GET /v1/zillow/comps: Comps. 1 credit. Params: zpid*, alt_id. - GET /v1/zillow/landing-pages: Landing Pages. 1 credit. Params: limit. - GET /v1/zillow/market-data: Market Data. 1 credit. Params: family*, geography*, segment, stat, variant, region_name, state, metro, county, limit, offset. - GET /v1/zillow/open-houses: Open Houses. 1 credit. Params: location*, page. - GET /v1/zillow/photo: Photo. 1 credit. Params: photo_id*, size. - GET /v1/zillow/photos: Photos. 1 credit. Params: zpid[]. - GET /v1/zillow/property: Property. 1 credit. Params: zpid[]. - GET /v1/zillow/property-history: Property History. 1 credit. Params: zpid*, alt_id. - GET /v1/zillow/rentals: Rentals. 1 credit. Params: location*, page, min_rent, max_rent, min_beds, max_beds, pets_allowed, cats_allowed, large_dogs_allowed, small_dogs_allowed, parking, air_conditioning, furnished, short_term_lease, outdoor_space, utilities_included, no_pets, pool, instant_tour, in_unit_laundry. - GET /v1/zillow/schools: Schools. 1 credit. Params: school_ids[], north_latitude, south_latitude, east_longitude, west_longitude, page, page_size. - GET /v1/zillow/search: Search. 1 credit. Params: latitude, longitude, radius_mi, north_latitude, south_latitude, east_longitude, west_longitude, region_ids[], region_id_type, polygon, listing_category, sort_order, sort_ascending, min_price, max_price, min_beds, max_beds, min_baths, max_baths, living_area_min, lot_size_min, year_built_min, home_statuses[], keywords, zoom_level, include_off_market, allow_empty, page, page_size. - GET /v1/zillow/value-chart: Value Chart. 1 credit. Params: zpid*, metric, time_period. - GET /v1/zillow/zestimate-accuracy: Zestimate Accuracy. 1 credit. Params: state, metro, stage. ## Zimmo API https://perceptlayer.com/apis/zimmo - GET /v1/zimmo/agencies: Agencies. 1 credit. Params: place_id, page, size, locale. - GET /v1/zimmo/agency: Agency. 1 credit. Params: id*, locale. - GET /v1/zimmo/agency-listings: Agency Listings. 1 credit. Params: service, place_id, agency_id*, category[], sub_type[], energy_label[], construction_type[], condition[], new_construction, sort, order, page, size, locale, price_min, price_max, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max, area_min, area_max, plot_area_min, plot_area_max, construction_year_min, construction_year_max, epc_min, epc_max. - GET /v1/zimmo/autocomplete: Autocomplete. 1 credit. Params: query*, limit, locale. - GET /v1/zimmo/listing: Listing. 1 credit. Params: id*, locale. - GET /v1/zimmo/listing-scores: Listing Scores. 1 credit. Params: code*. - GET /v1/zimmo/locations: Locations. 1 credit. Params: query*, locale. - GET /v1/zimmo/search: Search. 1 credit. Params: service*, place_id, agency_id, category[], sub_type[], energy_label[], construction_type[], condition[], new_construction, sort, order, page, size, locale, price_min, price_max, bedrooms_min, bedrooms_max, bathrooms_min, bathrooms_max, area_min, area_max, plot_area_min, plot_area_max, construction_year_min, construction_year_max, epc_min, epc_max. ## ZipRecruiter API https://perceptlayer.com/apis/ziprecruiter - GET /v1/ziprecruiter/company: Company. 1 credit. Params: company*. - GET /v1/ziprecruiter/job: Job. 1 credit. Params: id, url, country. - GET /v1/ziprecruiter/salary: Salary. 1 credit. Params: title*, city, state, country. - GET /v1/ziprecruiter/search: Search. 1 credit. Params: query*, location, country, radius, days, employment_type, salary_min, salary_max, remote, page. ## Zolo API https://perceptlayer.com/apis/zolo - GET /v1/zolo/autocomplete: Autocomplete. 1 credit. Params: q*. - GET /v1/zolo/listing: Listing. 1 credit. Params: url*. - GET /v1/zolo/search: Search. 1 credit. Params: location*, mode, min_price, max_price, min_beds, min_baths, property_type, sort, page. ## Zonaprop API https://perceptlayer.com/apis/zonaprop - GET /v1/zonaprop/developments: Developments. 1 credit. Params: posting_id*. - GET /v1/zonaprop/developments-units: Developments Units. 1 credit. Params: posting_id*. - GET /v1/zonaprop/listings: Listings. 1–3 credits. 1 credit, plus 1 each for include_recommendations and include_visits. Params: posting_id*, include_recommendations, include_visits, include_v2_fallback. - GET /v1/zonaprop/locations: Locations. 1 credit. Params: onboarding_searcher*, real_estate_type, location. - GET /v1/zonaprop/locations-polygon: Locations Polygon. 1 credit. Params: location_id*. - GET /v1/zonaprop/locations-suggestions: Locations Suggestions. 1 credit. Params: query*. - GET /v1/zonaprop/search: Search. 1 credit. Params: operation_type, real_estate_type, real_estate_subtype, location[]*, keyword, address, publisher_type, currency, price_from, price_to, condo_price_from, condo_price_to, area_from, area_to, area_unit, covered_area_from, covered_area_to, rooms_from, rooms_to, bedrooms_from, bedrooms_to, bathrooms_from, bathrooms_to, garage_from, garage_to, age_ranges, services, general, room_type, max_results*, limit*, offset*, sort*. - GET /v1/zonaprop/search-count: Search Count. 1 credit. Params: operation_type, real_estate_type, real_estate_subtype, location[]*, keyword, address, publisher_type, currency, price_from, price_to, condo_price_from, condo_price_to, area_from, area_to, area_unit, covered_area_from, covered_area_to, rooms_from, rooms_to, bedrooms_from, bedrooms_to, bathrooms_from, bathrooms_to, garage_from, garage_to, age_ranges, services, general, room_type, sort. - GET /v1/zonaprop/search-map: Search Map. 1 credit. Params: operation_type, real_estate_type, real_estate_subtype, location[]*, keyword, address, publisher_type, currency, price_from, price_to, condo_price_from, condo_price_to, area_from, area_to, area_unit, covered_area_from, covered_area_to, rooms_from, rooms_to, bedrooms_from, bedrooms_to, bathrooms_from, bathrooms_to, garage_from, garage_to, age_ranges, services, general, room_type. ## ZoomInfo API https://perceptlayer.com/apis/zoominfo - GET /v1/zoominfo/companies: Companies. 1 credit. Params: industry, country, page. - GET /v1/zoominfo/industries: Industries. 1 credit. - GET /v1/zoominfo/locations: Locations. 1 credit. - GET /v1/zoominfo/top-lists: Top Lists. 1 credit. Params: industry, country. ## Zoopla API https://perceptlayer.com/apis/zoopla - GET /v1/zoopla/addresses: Addresses. 1 credit. Params: postcode*. - GET /v1/zoopla/agent: Agent. 1 credit. Params: branchId*. - GET /v1/zoopla/listing: Listing. 1 credit. Params: listingId*. - GET /v1/zoopla/locations: Locations. 1 credit. Params: query*. - GET /v1/zoopla/market-activity: Market Activity. 1 credit. Params: geo*, range_months, house_type. - GET /v1/zoopla/market-insights: Market Insights. 1 credit. Params: outcode*. - GET /v1/zoopla/market-local-stats: Market Local Stats. 1 credit. Params: uprn*. - GET /v1/zoopla/property: Property. 1 credit. Params: uprn*. - GET /v1/zoopla/property-agents: Property Agents. 1 credit. Params: uprn*, transaction_type. - GET /v1/zoopla/property-demand: Property Demand. 1 credit. Params: uprn*. - GET /v1/zoopla/property-nearby-sold: Property Nearby Sold. 1 credit. Params: uprn*. - GET /v1/zoopla/property-similar: Property Similar. 1 credit. Params: uprn*. - GET /v1/zoopla/property-valuation-history: Property Valuation History. 1 credit. Params: uprn*. - GET /v1/zoopla/search: Search. 1 credit. Params: location*, section, page. - GET /v1/zoopla/search-count: Search Count. 1 credit. Params: location*, section. - GET /v1/zoopla/sold: Sold. 1 credit. Params: location*, first, after, from_last_sale_date, to_last_sale_date. - GET /v1/zoopla/sold-summary: Sold Summary. 1 credit. Params: paths[]*, section, location. ## Zumper API https://perceptlayer.com/apis/zumper - GET /v1/zumper/address: Address. 1 credit. Params: pa_url*. - GET /v1/zumper/address-faq: Address Faq. 1 credit. Params: city*. - GET /v1/zumper/address-pros-cons: Address Pros Cons. 1 credit. Params: permanent_address_id*. - GET /v1/zumper/address-rent-history: Address Rent History. 1 credit. Params: pa_url*. - GET /v1/zumper/agent: Agent. 1 credit. Params: agent_url*. - GET /v1/zumper/amenity-counts: Amenity Counts. 1 credit. Params: city*, hood. - GET /v1/zumper/autocomplete: Autocomplete. 1 credit. Params: query*. - GET /v1/zumper/blog: Blog. 1 credit. - GET /v1/zumper/building: Building. 1 credit. Params: building_id*. - GET /v1/zumper/building-additional: Building Additional. 1 credit. Params: building_id*. - GET /v1/zumper/building-aggregate: Building Aggregate. 1 credit. Params: building_id*. - GET /v1/zumper/building-fees: Building Fees. 1 credit. Params: building_id*. - GET /v1/zumper/building-map: Building Map. 1 credit. Params: building_id*. - GET /v1/zumper/building-pros-cons: Building Pros Cons. 1 credit. Params: building_id*. - GET /v1/zumper/building-rating: Building Rating. 1 credit. Params: building_id*. - GET /v1/zumper/building-related: Building Related. 1 credit. Params: building_id*. - GET /v1/zumper/building-resident-quotes: Building Resident Quotes. 1 credit. Params: building_id*. - GET /v1/zumper/cities: Cities. 1 credit. Params: cities*. - GET /v1/zumper/city: City. 1 credit. Params: city*. - GET /v1/zumper/city-bounds: City Bounds. 1 credit. Params: city*. - GET /v1/zumper/city-content: City Content. 1 credit. Params: city*. - GET /v1/zumper/count: Count. 1 credit. Params: city*. - GET /v1/zumper/facets: Facets. 1 credit. Params: city*, attribute*. - GET /v1/zumper/featured: Featured. 1 credit. Params: city*. - GET /v1/zumper/geos: Geos. 1 credit. Params: city*, hood. - GET /v1/zumper/geosearch: Geosearch. 1 credit. Params: query*. - GET /v1/zumper/lifestyles: Lifestyles. 1 credit. Params: city*. - GET /v1/zumper/linkpacks: Linkpacks. 1 credit. - GET /v1/zumper/listing: Listing. 1 credit. Params: listing_id*. - GET /v1/zumper/listing-fees: Listing Fees. 1 credit. Params: listing_id*. - GET /v1/zumper/location-scores: Location Scores. 1 credit. Params: type*, name*, lat*, lng*. - GET /v1/zumper/map-pins: Map Pins. 1 credit. Params: min_lat*, max_lat*, min_lng*, max_lng*. - GET /v1/zumper/map-search: Map Search. 1 credit. Params: city*, min_lat*, max_lat*, min_lng*, max_lng*. - GET /v1/zumper/nearby-pois: Nearby Pois. 1 credit. Params: lat*, lng*. - GET /v1/zumper/neighborhood: Neighborhood. 1 credit. Params: city*, hood*. - GET /v1/zumper/neighborhood-bounds: Neighborhood Bounds. 1 credit. Params: city*, hood*. - GET /v1/zumper/neighborhood-content: Neighborhood Content. 1 credit. Params: city*, hood*. - GET /v1/zumper/neighborhoods: Neighborhoods. 1 credit. Params: min_lat*, max_lat*, min_lng*, max_lng*. - GET /v1/zumper/price-trends: Price Trends. 1 credit. Params: city*, hood. - GET /v1/zumper/recommendations: Recommendations. 1 credit. Params: group_id*. - GET /v1/zumper/rent-estimate: Rent Estimate. 1 credit. Params: lat*, lng*, bedrooms*, bathrooms*. - GET /v1/zumper/rent-report: Rent Report. 1 credit. Params: slug*. - GET /v1/zumper/rent-report-cities: Rent Report Cities. 1 credit. - GET /v1/zumper/rent-research: Rent Research. 1 credit. Params: city*. - GET /v1/zumper/school-districts: School Districts. 1 credit. Params: city*. - GET /v1/zumper/schools: Schools. 1 credit. Params: lat*, lng*. - GET /v1/zumper/search: Search. 1 credit. Params: city*. - GET /v1/zumper/sitemap: Sitemap. 1 credit. Params: kind*. - GET /v1/zumper/spotlight: Spotlight. 1 credit. Params: min_lat*, max_lat*, min_lng*, max_lng*. - GET /v1/zumper/walkscore: Walkscore. 1 credit. Params: address*, lat*, lng*. ## ZVG-Portal API https://perceptlayer.com/apis/zvg-portal - GET /v1/zvg-portal/court: Court. 1 credit. Params: court*, sort, page, per_page. - GET /v1/zvg-portal/listing: Listing. 1 credit. Params: zvg_id*, land*. - GET /v1/zvg-portal/locations: Locations. 1 credit. Params: q, land. - GET /v1/zvg-portal/reference: Reference. 1 credit. - GET /v1/zvg-portal/search: Search. 1 credit. Params: land*, court, object_type[], procedure_type, plz, city, district, street, house_number, case_number, date_from, date_to, min_price, max_price, sort, page, per_page.