> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/typeahead.md).

# DataForB2B Typeahead

Resolve free-text queries into the exact filter values DataForB2B's search endpoints expect, so structured search filters match real records instead of failing silently on typos or near-misses.

## Search Filter Typeahead

### What it is

Resolve the exact filter value (company, industry, job title, skill, school, investor, location, category) for people and company searches with DataForB2B.

### How it works

The block trims and validates the free-text query `q`, then sends it with `filter_type` to DataForB2B's typeahead endpoint. Use the returned `values` as a People Search or Company Search filter rather than guessing at exact spellings — the search endpoints match on stored taxonomy values, so a plausible-looking guess silently returns zero results (`industry` is `software development`, not `software`). Industry is split per-side upstream: resolve `people_industry` for People Search and `company_industry` for Company Search, since the two taxonomies differ in both membership and casing. `limit` is clamped to 1-20, client and server errors are surfaced via `error`, and a valid query with no match returns empty `results` and `values` lists.

### Inputs

| Input        | Description                                                                                                                         | Type                                                                                                                                                     | Required |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| filter\_type | Filter type to resolve. Industry is split per-side: use people\_industry for People Search and company\_industry for Company Search | "company" \| "people\_industry" \| "company\_industry" \| "title" \| "skill" \| "school" \| "investor" \| "location" \| "city" \| "region" \| "category" | Yes      |
| q            | Free-text query to resolve                                                                                                          | str                                                                                                                                                      | Yes      |
| limit        | Max suggestions (1-20)                                                                                                              | int                                                                                                                                                      | No       |

### Outputs

| Output  | Description                           | Type                   |
| ------- | ------------------------------------- | ---------------------- |
| error   | Error message if the operation failed | str                    |
| result  | Full typeahead response               | Dict\[str, Any]        |
| results | List of suggestions                   | List\[Dict\[str, Any]] |
| values  | Resolved stored values                | List\[str]             |

### Possible use case

**Filter Autocomplete**: Resolve a user-typed company or industry name to the exact stored value before running a structured People/Company Search.

**Search Validation**: Confirm a job title or location exists in DataForB2B's taxonomy before building a filter around it.

**Query Normalization**: Convert user-entered company, school, or skill names into canonical values for repeatable searches.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://agpt.co/docs/integrations/block-integrations/typeahead.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
