Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ Fern AI Search indexes your documentation and provides an interface for your use

## Pricing

AI Search is available on the [Pro plan](https://buildwithfern.com/pricing#Docs) of Fern Docs. Billing is by usage.
AI Search is available on the [Pro plan](https://buildwithfern.com/pricing#Docs) of Fern Docs. Billing is by usage.
32 changes: 25 additions & 7 deletions fern/products/docs/pages/customization/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,37 @@ DocSearch is designed specifically for documentation sites to help users quickly
DocSearch scans your Fern site's content and builds an index to generate search results.
It includes built-in filters that let users refine their searches by content type:

- **Versions:** For sites with separate documentation for different API versions.
- **Endpoints:** Filters results by API reference documentation.
- **Guides:** Filters results by non-API reference documentation.
- **Changelog:** Filters results by changelog updates.
- **Versions:** For sites with separate documentation for different API versions
- **Endpoints:** Filters results by API reference documentation
- **Guides:** Filters results by non-API reference documentation
- **Changelog:** Filters results by changelog updates

If you are using the AI Search feature, the search box also functions as your sites chat window.
If you are using the AI Search feature, the search box also functions as your site's chat window.

<Note>
**Note:** If an article includes the `nofollow` or `noindex` [frontmatter](/learn/docs/content/frontmatter#indexing-properties), it will not be indexed by Algolia DocSearch and won't appear in search results.
</Note>

## Integrating with Algolia

If you need to integrate Fern's documentation search into your own application or dashboard, you can request Algolia credentials directly from the Fern team. These credentials will allow you to query the same search index that powers your documentation site's search functionality.

### Making Search Requests

Once you have your credentials, you can make requests to Algolia's API to search your documentation. The search endpoint follows this pattern:

```
https://[APPLICATION_ID]-dsn.algolia.net/1/indexes/[INDEX_NAME]/query
```

Contact the Fern team to get your specific application ID and index name. Credentials are provided on a per-customer basis to maintain security.

<Note>
**Note:** Keep your Algolia credentials secure and avoid exposing them in client-side code. Consider implementing a backend proxy to make the Algolia requests.
</Note>

## Using an alternative search

You can override Fern's search with your own solution.
[Here](https://github.com/deepgram/deepgram-docs/blob/main/fern/assets/component.js) is an example of custom JavaScript a customer used to replace the default search with their own implementation and additional features.
To learn more, see [Custom JavaScript](/learn/docs/building-and-customizing-your-docs/custom-css-global-js#custom-javascript).

To learn more, see [Custom JavaScript](/learn/docs/building-and-customizing-your-docs/custom-css-global-js#custom-javascript).