Building a LangChain pipeline that consumes Shopify product data requires clean, structured input. Without a dedicated tool, you face inconsistent HTML across Shopify themes, JavaScript-rendered content that generic HTTP clients miss, and noise from navigation, footers, and popups that pollute your output. EnConvert's Perceive endpoint solves this by rendering the page in a headless browser and returning only the product data as LLM-ready markdown in a single API call. You get titles, descriptions, pricing variants, stock status, and attributes in a consistent format, ready to pass directly into a LangChain retriever or vector store.
How to Scrape Shopify with LangChain
Use EnConvert's Perceive endpoint to scrape Shopify product pages into clean markdown for LangChain pipelines without HTML parsing or scraping infrastructure.
Get API keyExample
python
import requests
from langchain_core.documents import Document
API_KEY = "[•your EnConvert API key]"
SHOPIFY_URL = "[•Shopify product page URL]"
# Step 1: Convert the Shopify product page to clean markdown
# direct_download returns the markdown bytes as the response body
response = requests.post(
"https://api.enconvert.com/v2/perceive",
headers={
"X-API-Key": API_KEY,
"Content-Type": "application/json",
},
json={
"url": SHOPIFY_URL,
"outputs": ["markdown"],
"direct_download": True,
},
)
"direct_download": True,
},
)
response.raise_for_status()
markdown = response.text
print(markdown)
# Step 2: Create a LangChain Document
document = Document(
page_content=markdown,
metadata={
"source": SHOPIFY_URL
}
)
# Pass to your retriever, vector store, or downstream LangChain pipeline.
What you get back
The Perceive endpoint returns the product title, full description, each pricing variant with currency and amount, availability status, and all structured attributes as clean markdown. Navigation menus, cookie consent banners, sidebar promotions, and footer links are removed before the response is returned. A raw HTML scrape of the same URL returns tens of thousands of characters of markup with JavaScript placeholders where the variant and pricing data should be, requiring a parsing layer before any of it is usable.