# Integration via API (REST)

The following graphic shows the integration via API schematically:

![](/files/cKSLor8DgMIXV9m5XKHR)

## Preparations and design

The server-side integration (server script) is the code layer placed between the FactFinder Search server and your destination pages. It governs communication between the two and must be implemented before an API integration.

The steps are as follows:

1. Search query is sent to FactFinder: The search parameters entered by the user must be sent to the FactFinder Search server via an HTTP request.
2. Search results are received (response): The FactFinder Search server delivers the search results via a structured response (XML/JSON).
3. Search results are processed: The returned data must be parsed by the shop system.
4. Search results page is generated (display): The HTML structure of the search results page must be based on the delivered search result information.

The most important difference between this method and the Web Components result is that the design of the search results page is created by the shop. In this way the design is centrally managed and does not need to be monitored and corrected at multiple locations.

## Ways to integrate

The integration via API comes in two flavors:

1. Develop the integration code from scratch. All necessary information can be found on your Swagger UI page: `https://[your FactFinder setup here]/FactFinder/swagger-ui.html`. Demos and examples can be found on [GitHub](https://github.com/fact-finder).
2. Use **Swagger Codegen**. Classes like `SearchRequest`, `SearchParams`, and `TrackingApi` are generated automatically, simplifying your integration code. Learn more here: [How to use Swagger Codegen for the integration via API](/integration/factfinder-search-integration/integrating-the-search-into-the-shop-system/how-to-use-swagger-codegen-for-the-integration-via-api.md)


---

# Agent Instructions: 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:

```
GET https://docs.fact-finder.com/integration/factfinder-search-integration/integrating-the-search-into-the-shop-system/integration-via-api-rest.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
