Hi, I’m having an issue with the scrap badges. No matter what I do, it always returns only one result instead of multiple results. I want to understand why this happens.
( n8n node javascrpit)
Here’s a simplified version of my current code:
return [
{
json: {
body: {
urls: $input.first().json.links,
formats: [
{
type: "json",
prompt: "Extract from each page: address (.lc-location), price in COP (digits only, .main-price), property type (h2.lc-title), transaction type (h2.lc-title), and absolute URL (a.lc-data href)",
schema: {
type: "object",
properties: {
url: { type: "string" },
address: { type: "string" },
priceCOP: { type: "integer" },
property_type: { type: "string" },
transaction_type: { type: "string" }
},
required: ["url", "address", "priceCOP", "property_type", "transaction_type"]
}
}
],
maxConcurrency: 1,
onlyMainContent: true,
includeTags: ["h2.lc-title", "strong", "p.main-price", "a.lc-data"],
maxAge: 10,
removeBase64Images: true,
waitFor: 10000
}
}
}
];
Could you please help me understand why it always returns only one result and how I can get all the results?