search_opportunities
Search open government solicitations (SAM.gov, DLA DIBBS, CalProcure, OpenGov, PlanetBids, PublicPurchase, Bonfire, and agency notices syndicated by InstantMarkets) in NextBid's normalized corpus. Returns one deduplicated record per opportunity with agency, deadline, codes, document status and a source link, plus total and facets. Metered on two account meters: one request per call, and each solicitation the first time it reaches the account (repeats are free on that meter). page_size 0 = counts and facets only. Trial: 100 requests and 250 solicitations per account, page_size up to 25. If the solicitation allowance runs out mid-page, delivery.truncated is true and delivery.withheld says how many were held back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Keywords (full-text over title and description). | |
| city | No | A city (needs states). Keeps only rows tied to it; each row says how in location_match: work_site (place of performance), named_in_title, service_area (needs county), mentioned_in_description (work site not confirmed) or buyer_only (only the buyer's name/office; not the work site). | |
| open | No | Default true: only opportunities that are still open. false also returns closed and past-deadline solicitations. | |
| page | No | ||
| sort | No | ||
| county | No | A county name without 'County' (needs states), e.g. "Riverside". Matches the record's service area or a county named in the title (service_area) or description (mentioned_in_description). | |
| states | No | Two-letter states, e.g. ["CA"]. Matched on the job location (place of performance, service area, buyer state, CalProcure=CA); each result carries a location object with its basis. | |
| sources | No | Restrict to sources: sam.gov, dibbs, calprocure, opengov, planetbids, publicpurchase, bonfire, instantmarkets. | |
| agencies | No | Agency name fragments, e.g. ["Sacramento", "SMUD"]. | |
| page_size | No | Results per page (default 25). 0 = counts and facets only. Trial max 25, paid max 100; above the plan max is a 400. | |
| set_asides | No | Set-aside programs from list_set_asides: small_business, 8a, hubzone, sdvosb, wosb, isbee, california_sb_dvbe, open, or any alias ("8(a)", "HUBZone", "DVBE"). Results carry set_aside_basis: designated (the source marked it) or mentioned (title language only). Not an eligibility determination. | |
| tradelines | No | Trade ids or any alias from list_tradelines: e.g. lowvoltage, "access control", "badge readers", "structured cabling", roofing. Omit for all trades. | |
| specialties | No | Your specialties, e.g. ["access control", "surveillance cameras", "fire alarm"]. Never filters: all matches stay; those naming a specialty in the title (2) or description (1) come first, each row lists specialty_matches. | |
| location_match | No | Keep only these location tiers (needs city or county). Default: all five. | |
| due_within_days | No | Only opportunities closing within N days. | |
| tradeline_match | No | validated (default): a trade matches only with NAICS/PSC or text evidence for that trade; loose: tag only (noisier). |