graph TD
A[Start: Receive listing URL] --> B{Check Domain}
B --> |Amazon URL| C[Amazon API Call]
B --> |Other URL| D[Generic URL Extractor]
C --> E[Extract Amazon Data]
D --> F[Extract Generic Data]
E --> G[Process Raw Data]
F --> G
G --> H[Format JSON Structure]
H --> I[Validate Data Format]
I --> J{Data Complete?}
J --> |Yes| K[Return Structured Output]
J --> |No| L[Error Handler]
L --> B
K --> M[End: Return JSON]
subgraph Data Elements
N[Title max 60 chars]
O[Bullet Points max 200 chars each]
P[Description max 1000 chars]
Q[Main Image URL]
end
H --> Data Elements
subgraph API Tracking
R[Log API Call]
S[Update Monthly Counter]
end
C --> API Tracking
D --> API Tracking