structured-extraction

작성자: firecrawl

웹사이트에서 JSON 스키마와 일치하는 구조화된 데이터를 추출합니다. 복잡한 중첩 스키마, 배열, 페이지 매김 및 검증을 처리합니다. 항상 다음을 통해 출력합니다…

npx skills add https://github.com/firecrawl/web-agent --skill structured-extraction

Structured Extraction

Use this skill when extracting data that must match a specific JSON schema.

Strategy by task type

Simple query (single fact or small object)

  1. Search for relevant results.
  2. Scrape promising results with a targeted query.
  3. Build the result object and call formatOutput immediately.

Single target research (one entity, multiple fields)

  1. Search for relevant URLs.
  2. Scrape to extract data — stay in the orchestrator unless you have many independent sources (roughly 5+) where parallel workers clearly help.
  3. Compile findings and call formatOutput.

List of items (array in schema)

  1. Search/scrape to get the list of items.
  2. Are all requested details included in the list?
    • Yes: Build the result and call formatOutput.
    • No: If there are many items (roughly 5+), use spawnAgents so each worker gets the item and fields; otherwise fetch details sequentially in the orchestrator.
  3. Aggregate all results and call formatOutput.

All items from a website

  1. Check sitemaps (sitemap.xml, robots.txt) for an easy route to all pages.
  2. Scrape the entry page. Determine: pagination? Categories? Subcategories?
  3. For pagination, use interact to click through every page.
  4. For categories, scrape each category — use spawnAgents only when many independent categories warrant parallel fan-out.
  5. Aggregate and call formatOutput.

Scraping for structured data

  • PREFER scrape with a targeted query over raw page dumps. It keeps context lean.
  • When scraping lists, ALWAYS ask about pagination in your query: "How many total results? Is there a next page?"
  • For many independent URLs (roughly 5+), spawnAgents can help — each worker gets specific URLs and fields. Fewer URLs: handle in the orchestrator.
  • If a scrape returns a 404 or bot-check, do NOT retry. Move on to alternative sources.

Building the output

  • Match the schema EXACTLY. Every required field must be present.
  • Use null for missing fields — never omit keys.
  • Arrays must be arrays even for single items.
  • Numbers must be actual numbers, not strings (10.99 not "$10.99").
  • Use bashExec with jq to merge data from multiple sources:
    jq -s '.[0] * .[1]' /data/part1.json /data/part2.json > /data/merged.json
    

Validation before output

Before calling formatOutput, verify:

  1. All required fields from the schema are present.
  2. Types match (numbers are numbers, arrays are arrays).
  3. No duplicate entries in arrays.
  4. Source URLs are included where the schema has citation fields.

CRITICAL: Always call formatOutput

When you have gathered ALL data, call formatOutput with format "json" and the structured data. Do NOT stream data inline as markdown tables or JSON code blocks. Do NOT skip formatOutput — downstream systems depend on the structured output.

firecrawl의 다른 스킬

oracle
firecrawl
oracle CLI 사용 모범 사례 (프롬프트 + 파일 번들링, 엔진, 세션 및 파일 첨부 패턴)
official
pinecone
firecrawl
프로덕션 AI 애플리케이션을 위한 관리형 벡터 데이터베이스입니다. 완전 관리형, 자동 확장, 하이브리드 검색(밀집 + 희소), 메타데이터 필터링, 네임스페이스를 지원합니다.
official
sentence-transformers
firecrawl
최신 문장, 텍스트 및 이미지 임베딩을 위한 프레임워크입니다. 의미 유사도, 클러스터링, 검색을 위한 5000개 이상의 사전 훈련된 모델을 제공합니다.
official
wp-playground
firecrawl
WordPress Playground 워크플로우에 사용: 브라우저 또는 @wp-playground/cli(서버, run-blueprint, build-snapshot)를 통해 로컬에서 빠르게 일회용 WP 인스턴스를 실행합니다.
official
wp-plugin-development
firecrawl
WordPress 플러그인 개발 시 사용: 아키텍처 및 훅, 활성화/비활성화/제거, 관리자 UI 및 Settings API, 데이터 저장, 크론/작업, 보안…
official
wp-project-triage
firecrawl
WordPress 저장소(플러그인/테마/블록 테마/WP 코어/Gutenberg/전체 사이트)의 도구/테스트/버전 등을 포함한 결정론적 검사가 필요할 때 사용합니다.
official
wp-rest-api
firecrawl
WordPress REST API 엔드포인트/라우트를 구축, 확장 또는 디버깅할 때 사용: register_rest_route, WP_REST_Controller/컨트롤러 클래스, 스키마/인수…
official
wp-wpcli-and-ops
firecrawl
WP-CLI(wp)를 사용한 워드프레스 작업 시 활용: 안전한 검색-바꾸기, DB 내보내기/가져오기, 플러그인/테마/사용자/콘텐츠 관리, 크론, 캐시 비우기 등
official