Skip to main content
Ground locates target text. It is target location, not claim verification. After a search, poll any jobs listed in grounding_job_ids instead of creating duplicates — see Search a workspace. When the list is empty or absent, you can use this endpoint to locate the answer’s quotes explicitly. Automatic grounding may be disabled for API searches by deployment policy. Standalone quotes also use this endpoint. An agent answer (automatic search’s agent route, or a QA turn) comes back without Ground jobs: its grounding_job_ids is null. To locate its quotes, run Ground on the answer’s evidences, one job per file: a workspace_file source with the evidence’s source_file_id, and its quotes as targets, with component as sheet for a spreadsheet. See Agent and QA answers for an example.
Pass 1–30 targets. Optional hint (nearby context) and sheet (spreadsheet tab) disambiguate a repeated quote. hint works on PDF, image, text and HTML sources; for spreadsheet and CSV sources only sheet is used. On an HTML source, hint is nearby visible text: the occurrence nearest that text ranks first. Without a hint, rank 1 is the first visible occurrence. With semantic=true, text describes what to find instead of quoting it. On deployments that ground PDF, Word and PowerPoint sources with the exact-match runtime, the answering sentences, table cells, lines, blocks, sections (a heading with its text) or table rows come back best first, up to max_matches, each with match_method: semantic. A target whose answer is not in the source comes back not found. If the picking model is unavailable, the target fails with error native_2_semantic_unavailable. A JSON quote that names several fields is matched as a subset of one node: every named field must be present, extra fields on the node are ignored, and [] / {} stand for any array or object. If a target is itself a JSON object and the literal search misses, the matcher retries that object as a subset pattern and keeps the hit only when exactly one node matches. A stitched field-run quote ("period": "2024", ..., "accounts": [...]) is first repaired into an object ([] / {} for elisions) and then run through the same unique-subset check. If that check still misses, an LLM query rewrite may be tried; its structural matches don’t have to be unique and come back ranked, normally with match_method: semantic. Set options.include_previews=true to mint crop URLs; fetch them with the same API key via client.jobs.ground_crop or GET /v1/jobs/{job_id}/ground-crops/{artifact_ref}. An HTML source is matched against the text a browser would paint. Markup a reader never sees is skipped: the contents of script and style, anything under a hidden or aria-hidden="true" attribute, a <dialog> without open, and anything its own style attribute hides (display:none, visibility:hidden, a zero opacity). Attribute values are never matched, so a phrase that appears only in a <title>, an alt or a social-preview tag is not returned. Hiding is read from the markup itself rather than from a browser, so a stylesheet or a media query that hides a phrase — a nav that collapses on small screens, say — is not evaluated, and such a phrase can still be returned. Offsets count from the start of the uploaded HTML, tags included. Ground reads a Parse of the source. Set it with the optional parse section, for example "parse": {"parse_mode": "medium", "figures": {"mode": "omit"}}. Ground accepts parse_mode low and medium. Word-level grounding reads OCR words rather than a Parse, so it accepts only the default settings. Ground uses the requested Parse’s text to find where each target is and keeps its own OCR for box placement. Ground reads a requested Parse only for PDF, image, and Word sources, and only on the default Ground provider. Where it cannot, for example another Ground provider, customer-managed storage, or zero retention, the request still succeeds on the default Parse and the result warns Ground did not read the Parse for this source for each setting. A deployment can switch PDF and Word sources to the exact-match provider, which does not read a requested Parse. For another file type, each setting warns with that file type’s own reason, for example parse.parse_mode was not applied: Spreadsheet files do not support it. page_ranges always applies to sources with pages and drops matches on other pages. A parse_result source applies only page_ranges. See Parse settings. A parse_result source is supported. See Ground response.