Yelp Search Ads

Beta
Yelp search results with sponsored rows flagged (isAd), plus name, rating, reviews, price range, categories and position, as Apify-style dataset items.
POST/v1/ads/yelp

Beta. The parser for this endpoint was written from the upstream format and has not yet been checked against a live response. Field shapes may change; tell us if you see a mismatch.

Open as Markdown
On this page

Price

Priceresult
Live
$0.00045

Per result returned.

Description

POST the input as one JSON object. Every term in searchTerms runs in every place in locations, plus one search per directUrls entry, up to 50 searches per request. Results are read page by page until searchLimit is reached.

The response body is a JSON array of items, with no wrapper. Every item carries receipt_id, and the same id is in the X-Receipt-Id response header.

Billing. Per result returned, sponsored rows included, whatever fetch level was needed. An input that finds nothing costs $0. Results are cached for 6 h.

Beta. The parser behind this route was written from public documentation and hasn't been checked against live pages yet. Item field names are fixed; some values may be null more often than they should be until that check is done.

Request

Endpoint
POST https://api.dataforgaio.com/v1/ads/yelp
Authentication
HTTP Basic auth: any login, with your dg_ API key as the password. A Bearer header with the key also works. Create a key.
Body
JSON objectMode: Live

Fields

  • searchTermsarray<string>|stringoptional
    What to search for. Each term runs in each of locations. search_terms and searchTerm are accepted too. Send this with locations, or directUrls, or both.
    Example["running store"]
  • search_termsarray<string>|stringoptional
    Same as searchTerms.
  • searchTermstringoptional
    Same as searchTerms, for a single term.
  • locationsarray<string>|stringoptional
    Where to search, for example Boulder, CO. Required with searchTerms. location is accepted too.
    Example["Boulder, CO"]
  • locationstringoptional
    Same as locations, for a single place.
  • directUrlsarray<string|object>optional
    Yelp search URLs (yelp.com/search?find_desc=…&find_loc=…). Business page URLs aren't supported. startUrls is accepted too.
    Example["https://www.yelp.com/search?find_desc=running+store&find_loc=Boulder%2C+CO"]
  • startUrlsarray<string|object>optional
    Same as directUrls.
  • searchLimitintegeroptional
    Results per search, sponsored rows included.
    Default10Min1Max240Example10
  • auto_upgradebooleanoptional
    Lets the request move to a higher fetch level when the included level can't get the data, billed at the level that delivered it. false stops at the Standard level and returns the failure at $0. Also accepts "true", "false", 1 and 0.
    DefaulttrueExampletrue
  • max_levelstringoptional
    The highest fetch level Auto-upgrade may use. rendered never uses the Protected level.
    DefaultprotectedOne ofstandardrenderedprotectedExamplerendered
  • max_costnumberoptional
    The most this task may cost, in USD. The wallet check reserves this amount instead of the worst-case price, the request never upgrades past it, and the charge never exceeds it. Results stop at the number this amount pays for.
    Min0Example0.002
  • max_ageintegeroptional
    Accept a cached result up to this many seconds old, 0 to 86,400. 0 always fetches fresh. Default window: 6 h.
    Min0Max86400Example3600

Response

Shape: Apify actor shape. Expand a field to see its children; every field has a link anchor.

  • namestring
    Business name.
    ExampleSummit Running Co.
  • bizIdstring|null
    Yelp business id.
    ExamplesRc0001
  • directUrlstring
    The business's Yelp page, without tracking parameters.
    Examplehttps://www.yelp.com/biz/summit-running-co
  • alternateNamesarray<string>
    Other names. Always empty for now.
    Example[]
  • addressobject
    Address. Only addressLine1 is filled from search results.
    Show 7 child fields
  • neighborhoodsarray<string>
    Neighborhoods shown in the result.
    Example["Downtown"]
  • phonestring|null
    Phone number.
    Example(303) 555-0142
  • Not in search results. Always null.
  • aggregatedRatingnumber|null
    Star rating, 1 to 5.
    Example4.5
  • reviewCountinteger|null
    Number of reviews.
    Example211
  • priceRangestring|null
    Price range, for example $$.
    Example$$
  • typenull
    Always null.
  • Always null.
  • categoriesarray<string>
    Yelp categories.
    Example["Shoe Stores","Sporting Goods"]
  • primaryPhotostring|null
    Main photo URL.
  • imagesarray<string>
    Always empty for now.
    Example[]
  • Not in search results. Always null.
  • Not in search results. Always null.
  • advertiserboolean
    True for a sponsored row.
    Exampletrue
  • isAdboolean
    True for a sponsored row.
    Exampletrue
  • sponsoredboolean
    True for a sponsored row.
    Exampletrue
  • positioninteger
    Position in this search, sponsored rows included, starting at 1.
    Example1
  • The term this row came from.
    Examplerunning store
  • locationstring
    The location this row came from.
    ExampleBoulder, CO
  • When this search started, ISO 8601.
    Example2026-12-03T10:42:18.000000+00:00
  • When this search finished, ISO 8601.
    Example2026-12-03T10:42:18.000000+00:00
  • receipt_idstring|null
    Id of the ledger receipt for this request. Same on every item.
    Example8cbb5b5c-8e15-5c82-9959-45f93cdad009

Item types

Each entry in items has a type. These are the fields of each type.

result27 fields

Errors

CodeWhen
400Invalid input (no terms or URLs, searchTerms without locations, a non-search URL, or more than 50 searches), or max_cost below the price of one item. Body: {"error": {"type": "invalid-input", "message": ..., "receipt_id": null}}.
400Nothing found for the input (type: invalid-input). $0.
401No valid API key (type: user-or-token-not-found).
402Wallet balance below the worst case for this request (type: not-enough-usage-to-run-paid-actor).
429Too many requests (type: rate-limit-exceeded).
500No allowed fetch level got the page (type: internal-error). $0.
Tasks that end in an error are not billed. All status codes

Migrating

Replaces Apify Yelp scraper actor input and dataset items. The request body and response envelope match: change the base URL to https://api.dataforgaio.com/v1 and use your dg_ key as the password.