graph TD
A[Start: Input URL] --> B{Domain Check}
B -- Amazon URL --> C[Extract ASIN]
B -- Other URL --> D[Non-Amazon Extraction]
C --> E[Call Amazon API]
D --> F[Web Scraping API]
E --> G[Raw Data Processing]
F --> G
G --> H[Character Limit Check]
H --> I[Data Validation]
I --> J[Format JSON Structure]
J --> K{Data Complete?}
K -- No --> L[Error Handling]
L --> B
K -- Yes --> M[Final Output]
subgraph Output Structure
M --> N[title: string max 60 chars]
M --> O[bullet_points: array max 200 chars each]
M --> P[description: string max 1000 chars]
M --> Q[main_image_url: string]
end
style A fill:#f9f,stroke:#333
style M fill:#9f9,stroke:#333
style B fill:#ff9,stroke:#333
style K fill:#ff9,stroke:#333