{
  "name": "SocialCrawl: Reviews of a local business",
  "nodes": [
    {
      "id": "node-1",
      "position": [
        260,
        0
      ],
      "name": "Run recipe",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "parameters": {}
    },
    {
      "id": "node-2",
      "position": [
        520,
        0
      ],
      "name": "search",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "parameters": {
        "method": "GET",
        "url": "https://www.socialcrawl.dev/v1/yelp/search?query=pizza&location=New%20York%2C%20NY",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "timeout": 300000
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "SocialCrawl API key"
        }
      },
      "executeOnce": true,
      "retryOnFail": true,
      "maxTries": 4,
      "waitBetweenTries": 2000
    },
    {
      "id": "node-3",
      "position": [
        780,
        0
      ],
      "name": "reviews",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "parameters": {
        "method": "GET",
        "url": "=https://www.socialcrawl.dev/v1/yelp/business/reviews?id={{ encodeURIComponent($('search').first().json.data.items[0].place.id) }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "timeout": 300000
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "SocialCrawl API key"
        }
      },
      "executeOnce": true,
      "retryOnFail": true,
      "maxTries": 4,
      "waitBetweenTries": 2000
    },
    {
      "id": "note",
      "name": "How this recipe works",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -460
      ],
      "parameters": {
        "content": "## Reviews of a local business\n\nPrice for one search page, one business's first review page: 6 credits held up front (exact; the unused hold is refunded).\n\nMeasured on 25/10/2026: 6 credits in 2 calls (the quote held 6). The TypeScript and Python programs both ran.\n\nFRESH=1 skips the cache and bills every call; a cache hit is free.\n\nInputs, set to a working example (change them to yours):\n\n  business: Business name or category\n\n  location: City or neighbourhood\n\n**Key:** create a Header Auth credential named SocialCrawl API key, with Name x-api-key and your API key as Value, and pick it on every request node.\n\n**Rows:** a step that runs once per row takes the first 1 rows (change the number in its rows node).\n\n**Errors:** a request node stops the workflow on an API error. Read error.type in its output; retry only when error.retryable is true.",
        "width": 520,
        "height": 420
      }
    }
  ],
  "connections": {
    "Run recipe": {
      "main": [
        [
          {
            "node": "search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "search": {
      "main": [
        [
          {
            "node": "reviews",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {}
}
