Content Management

Import Website

Kick off an async website import; returns a job to poll.

The whole pipeline — crawl (~20–60s) → LLM structuring (minutes) → DB write — is 5–7 min for a real multi-page property, which outlives browser/proxy timeouts (the operator saw a failure while the server kept running and eventually wrote the pages). So this endpoint does only the fast, synchronous part inline and enqueues the slow part as a background job that owns its own DB session, returning immediately with the job. Poll GET /import-website/jobs/{job_id} for status/progress; pages land as reviewable DRAFTs when it completes.

Inline verification (a guide belongs to one property): the pasted URL's registrable domain must match the property's verified website (its stored website_url, else Google Maps' websiteUri for a linked place). A mismatch is a hard block (422) — a user cannot pour an unrelated site into a property's knowledge base.

Single in-flight per property+source: a re-import (e.g. a client-abort retry) while a job for the same canonical URL is still running returns that same job instead of starting a concurrent duplicate.

post/api/v1/content/properties/{property_id}/import-website

Path parameters

property_idstring uuid required

Request body

urlstring required
content_type'general' | 'dining'

Response

Successful Response

idstring uuid required
property_idstring uuid required
status'queued' | 'crawling' | 'structuring' | 'completed' | 'failed' required

Lifecycle of an async website-import job (see WebsiteImportJob).

A real multi-page property import takes 5–7 min (crawl + LLM structuring), which outlives client/proxy timeouts, so the work runs on the arq worker and the operator polls this status. QUEUED → CRAWLING → STRUCTURING → COMPLETED, or → FAILED at any point with a human-readable error_message.

urlstring required
source_refstring required
content_typestring required
source_pages_crawledinteger nullable
sources_totalinteger nullable
sources_doneinteger
error_messagestring nullable
created_atstring date-time required
updated_atstring date-time required
started_atstring date-time nullable
completed_atstring date-time nullable

Changes

No recorded changes to this endpoint across all 3 revisions of this API.