协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
zocdoc-doctor-finder【开发与工程】Use when a user needs to find a doctor, dentist, specialist, therapist, or healthcare provider — especially when they mention insurance, in-network, availability, location, appointments, or booking. Also use for browsing provider reviews, comparing doctors by specialty, or checking if a provider takes their insurance.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Find in-network healthcare providers with real-time availability on Zocdoc.com using browser automation. Extract data from Zocdoc's Redux store and GraphQL API — no authentication required.
This skill requires the user's real browser session — not a headless browser, fresh profile, or isolated automation context. Use the browser the user already has open, with their existing cookies, history, and login state. A clean profile with no browsing history is more likely to trigger bot detection.
Pacing: Wait for each page to fully load before taking the next action. Do not rapid-fire navigate between pages. A 2-3 second pause between actions mimics normal browsing and reduces bot detection risk.
Two interaction modes exist:
| Mode | Can run console JS? | How to extract data |
|---|---|---|
| Programmatic (Playwright, Puppeteer) | Yes | Redux state extraction (preferred) |
| Computer use (screen-based agent) | No | Read data directly from the visible page |
Both modes follow the same workflow — the only difference is how you extract data at each step. Instructions for both are included below.
When NOT to use:
Collect from the user (ask only what's missing — infer from context when possible):
If the user is vague ("I need a doctor"), ask one focused question: "What kind of doctor, and where are you located?"
Agent tips:
Build a Zocdoc search URL. See references/url-patterns.md for full parameter documentation.
Quick reference — search URL structure:
https://www.zocdoc.com/search?
address=<City,+State+or+Zip>
&dr_specialty=<specialty_id>
&insurance_carrier=<carrier_name>
&insurance_plan=<plan_id>
&day_filter=<AnyDay|Today|Tomorrow|NextWeek>
&sort_type=Default
&visitType=<inPersonAndVirtualVisits|virtualVisits|inPersonVisits>
&after_5pm=<true|false>
&before_10am=<true|false>
&gender=<-1|1|2>
&language=<language_id|-1>
&offset=<page_number>
Common specialty IDs: Primary Care = 153, Dentist = 98, Dermatologist = 105, OB-GYN = 133, Psychiatrist = 319, Eye Doctor = 113, Urgent Care = 702.
For a complete specialty list, see references/url-patterns.md.
If the specialty ID is unknown, use the homepage search: navigate to zocdoc.com, type the specialty/condition in the search combobox, and select from autocomplete suggestions.
(() => {
const sr = window.__REDUX_STATE__?.searchResults?.search?.searchResponse;
if (!sr) return JSON.stringify({error: 'no results'});
return JSON.stringify(sr.providerLocations.map(pl => ({
name: pl.provider.approvedFullName,
rating: pl.provider.averageRating,
reviewCount: pl.provider.reviewCount,
specialty: pl.provider.relevantSpecialty?.name,
profileUrl: 'https://www.zocdoc.com' + pl.provider.profileUrl,
address: [pl.location.address, pl.location.cityName, pl.location.stateName, pl.location.zip].filter(Boolean).join(', '),
distance: pl.location.distanceMiles,
isVirtual: pl.location.isVirtual,
isSponsored: !!pl.spoData?.adDecisionId,
badges: pl.provider.badges?.map(b => b.displayText) || []
})), null, 2);
})()
This returns clean JSON from the Redux store — much more reliable than parsing the DOM.
Computer-use alternative: If you cannot run JavaScript (screen-based agent), read the search results directly from the visible page. Each result card shows:
Read each card carefully and extract these fields from what is visible. Do not infer or fabricate any field you cannot see on the page.
Fallback: If Redux state is unavailable and you are in programmatic mode, read search results from the DOM snapshot. Each article/result card contains provider name, rating, reviews, address, badges, and availability grid.
Present results to the user in a clean summary. Format each provider like:
1. **Dr. Name, MD** — ⭐ 4.96 (312 reviews) · Highly Recommended
📍 1.2 mi — 680 N Lake Shore Dr, Chicago, IL 60611
🗓 Next available: Tomorrow, Mar 4
🔗 https://www.zocdoc.com/doctor/name-slug-123456
ℹ️ Sponsored result (if applicable)
Include for each: name + credentials, rating + review count, address + distance, notable badges, next available date, direct profile link, and whether it's a sponsored result.
Agent tips:
See references/api-patterns.md for full Redux state structure and GraphQL API details.
When the user wants details on a specific doctor, navigate to their profile URL and extract:
Summarize relevant sections based on what the user cares about.
Agent tips:
Option A — GQL API (best for bulk/extended availability): Call POST https://api.zocdoc.com/directory/v3/gql with the providerLocationsAvailability operation to get exact timeslots per date. See references/api-patterns.md for the full query and response structure. Get searchRequestId and providerLocationIds from the Redux state extracted in step 3.
Option B — DOM / visual interaction: On the provider profile page:
Report available dates/times clearly: "Dr. X has 15 appointments available on Thu Feb 19, and 19 on Thu Feb 26."
Agent tips:
When the user is ready to book:
Do not attempt to complete the booking flow — it requires authentication and personal health information.
Agent tips:
Apply these filters via the search page filter buttons:
| Filter | Options |
|---|---|
| Time of day | Morning, Afternoon, Evening |
| I'm flexible | Date flexibility |
| Illness | Condition-based filtering |
| Specialty | Refine specialty |
| Distance | Radius from location |
| In-person/video | Visit type |
| More filters | Gender, language, sees children, etc. |
Only report data you actually extracted from Zocdoc. Never present a provider name, address, phone number, rating, review count, or availability that you did not read from Zocdoc's page, Redux state, or API response. If a field is not visible or not returned, omit it — do not guess or fill in from another source.
If you used a different source (e.g., a web search), you must explicitly tell the user: "I couldn't load Zocdoc results, so these come from a general web search and may not reflect current Zocdoc availability or insurance acceptance."
If you cannot load Zocdoc search results — for any reason — tell the user immediately. Do not silently switch to a web search or another data source.
Specifically:
Never fabricate results to fill a gap. An honest "I couldn't load results" is always better than plausible-looking data the user can't verify.
window.__REDUX_STATE__ may not be populated on initial page load. If the extraction returns {error: 'no results'}, wait for the page to fully render and retry.isSponsored field and tell the user which results are ads.firstAvailability from the GQL response or look at the availability grid dates, not by default ranking. Tell the user: "The soonest available is Dr. X with an appointment today at 3pm."after_5pm=true or day_filter=NextWeek and note that weekend availability is limited for most specialties.User: I need a dermatologist in Chicago that takes Aetna.
Agent: Searching Zocdoc for dermatologists in Chicago accepting Aetna...
Here are the top results:
1. **Dr. Sarah Kim, MD** — ⭐ 4.96 (312 reviews) · Highly Recommended
📍 1.2 mi — 680 N Lake Shore Dr, Chicago, IL 60611
🗓 Next available: Tomorrow, Mar 4
🔗 https://www.zocdoc.com/doctor/sarah-kim-md-234567
2. **Dr. James Chen, DO** — ⭐ 4.89 (187 reviews)
📍 2.4 mi — 1253 N Milwaukee Ave, Chicago, IL 60622
🗓 Next available: Thu, Mar 6
🔗 https://www.zocdoc.com/doctor/james-chen-do-345678
3. **Dr. Maria Lopez, MD** — ⭐ 4.85 (95 reviews) · Patient Choice
📍 3.1 mi — 150 E Huron St, Chicago, IL 60611
🗓 Next available: Mon, Mar 9
🔗 https://www.zocdoc.com/doctor/maria-lopez-md-456789
ℹ️ Sponsored result
Dr. Kim has the highest rating and earliest availability. Want details on any of these, or should I check specific appointment times?
User: Tell me more about Dr. Kim. Does she have anything Thursday afternoon?
Agent: Here's Dr. Kim's profile:
**Dr. Sarah Kim, MD — Dermatologist**
⭐ 4.96 overall · 4.98 bedside manner · 4.94 wait time (312 reviews)
🎓 Northwestern Feinberg School of Medicine · Board Certified
💼 Specializes in: acne, eczema, skin cancer screening, cosmetic dermatology
✅ Accepts Aetna (confirmed)
**Thursday Mar 6 availability:**
- 1:00 PM, 1:30 PM, 2:15 PM, 3:00 PM, 3:45 PM
5 afternoon slots available. Want to book one? I'll send you the direct link.
User: The 2:15 slot.
Agent: Here's your booking link:
🔗 https://www.zocdoc.com/doctor/sarah-kim-md-234567?insuranceCarrier=Aetna&insurancePlan=-1&reason_visit=75
Click the 2:15 PM slot on Thursday Mar 6 and follow the booking flow. You'll need a Zocdoc account (free signup, takes about 1 minute). Dr. Kim was the top-rated dermatologist in your area with the earliest availability — great pick.
User: My back has been killing me. Who should I see near 10001?
Agent: Back pain could be treated by several specialties — let me search Zocdoc to find the right match.
Searching zocdoc.com for "back pain" near 10001...
Zocdoc suggests these provider types for back pain:
- **Orthopedic Surgeon** — for structural/joint issues
- **Pain Management Specialist** — for chronic pain treatment
- **Physical Therapist** — for rehab and exercises
- **Chiropractor** — for spinal alignment
Here are the top-rated providers for back pain near 10001:
1. **Dr. Robert Patel, MD** — Pain Management · ⭐ 4.91 (245 reviews) · Highly Recommended
📍 0.8 mi — 317 E 34th St, New York, NY 10016
🗓 Next available: Today, 4:30 PM
🔗 https://www.zocdoc.com/doctor/robert-patel-md-567890
2. **Dr. Lisa Wong, MD** — Orthopedic Surgeon · ⭐ 4.87 (178 reviews)
📍 1.1 mi — 535 E 70th St, New York, NY 10021
🗓 Next available: Wed, Mar 5
🔗 https://www.zocdoc.com/doctor/lisa-wong-md-678901
Do you have insurance you'd like me to filter by? That will narrow results to in-network providers.
User: What appointments does Dr. Laurence Gordon have available next week?
Agent: Looking up Dr. Laurence Gordon on Zocdoc...
**Dr. Laurence Gordon, DO**
📍 258 Broadway, New York, NY 10007
Next week's availability:
- **Mon Mar 9:** 9:00 AM, 10:30 AM, 2:00 PM (3 slots)
- **Tue Mar 10:** 9:00 AM, 11:00 AM, 1:00 PM, 3:30 PM (4 slots)
- **Wed Mar 11:** 10:00 AM, 2:30 PM (2 slots)
- **Thu Mar 12:** No availability
- **Fri Mar 13:** 9:00 AM, 11:30 AM, 4:00 PM (3 slots)
12 total appointments next week. Tuesday has the most options. Want to book one?
Search: https://www.zocdoc.com/search?address={loc}&dr_specialty={id}&insurance_carrier={carrier}
Profile: https://www.zocdoc.com/doctor/{name-slug}-{id}
GQL API: POST https://api.zocdoc.com/directory/v3/gql
153 Primary Care 98 Dentist 105 Dermatologist
133 OB-GYN 319 Psychiatrist 113 Eye Doctor
702 Urgent Care 141 Orthopedic 149 Pediatrician
47 Cardiologist 7 ENT 117 Gastroenterologist
address City, State or zip (URL-encoded)
dr_specialty Specialty ID
insurance_carrier Carrier name
insurance_plan Plan ID (-1 = any)
day_filter AnyDay | Today | Tomorrow | NextWeek
visitType inPersonAndVirtualVisits | virtualVisits | inPersonVisits
sort_type Default | Distance
offset Page number (0-indexed)
window.__REDUX_STATE__?.searchResults?.search?.searchResponse?.providerLocations
Build search URL → Navigate → Bypass visit picker → Extract Redux state → Present results
→ Call GQL for availability → Report timeslots
→ Navigate to profile → Extract details