# Meet the Baidu Search macro for ONLYOFFICE

**URL:** https://community.onlyoffice.com/t/meet-the-baidu-search-macro-for-onlyoffice/6706
**Category:** News
**Created:** [25 October 2023 11:50 UTC](https://community.onlyoffice.com/t/meet-the-baidu-search-macro-for-onlyoffice/6706 "2023-10-25T11:50:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ONLYOFFICE\_team](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/onlyoffice_team/32/431_2.png) [@ONLYOFFICE\_team](https://community.onlyoffice.com/u/ONLYOFFICE_team)
#### Post date: [25 October 2023 11:50 UTC](https://community.onlyoffice.com/t/meet-the-baidu-search-macro-for-onlyoffice/6706/1 "2023-10-25T11:50:59Z")

</div>

Originally published at: [Meet the Baidu Search macro for ONLYOFFICE | ONLYOFFICE Blog](https://www.onlyoffice.com/blog/2023/10/meet-the-baidu-search-macro-for-onlyoffice/)

In the dynamic world of open-source innovation, May 2023 marked a significant milestone. We [ventured](https://www.onlyoffice.com/blog/2023/05/apply-for-onlyoffice-projects-in-ospp-2023?utm_source=blog&utm_medium=article&utm_id=Baidu_macro_OSPP) into the Open Source Promotion Plan program. We’re excited to share our experience in the open-source community, where we had the privilege of collaborating with [Eeshaan Sawant](https://www.linkedin.com/in/sawanteeshaan/), a participant in the OSSP program. In this article, we’ll delve into the details of a remarkable macro developed by Eeshaan, highlighting its robust functionality and strong points.

![Meet the Baidu Search macro for ONLYOFFICE](https://static-blog.onlyoffice.com/wp-content/uploads/2023/10/25123032/baidu.png)

## **About the project**

At the helm of the Open Source Promotion Plan is the Open Source Software Supply Chain Promotion Plan, operated by the Institute of Software at the Chinese Academy of Sciences. This initiative’s core objective is to involve students on a global scale in the improvement and sustenance of open-source software. The program fosters partnerships with open-source communities, whether local or international, concentrating its efforts on tasks that enhance critical open-source software projects.

One of our projects focuses on creating a macro for integrating Baidu search results into ONLYOFFICE Spreadsheets. The aim of this project is to provide ONLYOFFICE users with a convenient tool for inserting Baidu search results into their spreadsheets. The final version of the macro consists of three parts:

- A Proxy server for handling API requests.
- The Basic version.
- The Advanced version.

This macro harnesses the full potential of the [SERP API](https://serpapi.com/baidu-search-api), a service that provides access to invaluable search engine data and results. It offers 100 free monthly requests, with subscription options available for those with greater data needs.

## **Features and functionality**

Macros are small scripts that simplify your daily tasks when handling various types of documents. The beauty of this macro lies in its simplicity. Even if you have no prior experience with JavaScript or programming, you can effortlessly harness its capabilities:

**Basic Macro** : The Basic Macro is tailored for users who are new to macro scripting and want a straightforward way to integrate search results into their spreadsheets. Its primary features include:

- _Seamless Integration:_ The Basic Macro allows you to effortlessly import search results directly into your spreadsheet with a single query.
- _Efficiency:_ This version is designed for efficiency, making it a great choice for users who want to quickly incorporate search data into their documents without the need for complex configurations.
- _U __ser-Friendly Setup__ :_ Setting up the Basic Macro is user-friendly. Getting the macro up and running is a straightforward process, requiring just a few actions.

**A**** dvanced Macro**: The Advanced Macro is for experienced users who require more control and precision. It offers additional parameters and advanced capabilities, including:

- _P__arameter Customization:_ The Advanced Macro provides the flexibility to customize parameters such as _rn_ and _pn_. The rn parameter lets you specify the number of results. The _pn_ parameter allows you to target specific pages, allowing you to fine-tune your search results.
- _No Cache Option_: The no\_cache parameter empowers you to choose whether to use cached data for repetitive queries. This feature enhances your ability to keep your data fresh and relevant, especially when dealing with real-time or rapidly changing data.
- _Layout Guidance_: The Advanced Macro incorporates a layout designed by the _fmtMacro_ to guide you through configuring and customizing your query parameters.
- _Multiple Queries_: You can execute multiple queries simultaneously, enabling more complex and dynamic tasks.

The Baidu Macro is a versatile tool designed to boost efficiency in managing single and multiple search queries. Regardless of your experience level, its user-friendly design and adaptability make it a beneficial addition to your toolkit.

For comprehensive information and a detailed step-by-step guide on setting up and utilizing both versions, we invite you to explore the macro [repository](https://github.com/IlyaSob/ONLYOFFICE-API-macro/tree/main/server). It contains all the essential files and comprehensive [documentation](https://github.com/IlyaSob/ONLYOFFICE-API-macro/tree/main/server#readme) to assist you.

Besides we invite you to read Eshaant’s new [blog post](https://dev.to/sawanteeshaan/from-rookie-to-remarkable-navigating-my-internship-experience-at-onlyoffice-20ga), in which he shares his journey and experiences in developing this macro.

## **What’s next**

Engaging in the 2023 projects of the ONLYOFFICE Open Source Promotion Plan, we discover a blend of determination and inspiration. Every project is thoughtfully crafted to improve how users interact with ONLYOFFICE. Being part of this program and interacting with passionate contributors inspires us to persist on the open-source community path, striving to enhance technology for the better.

As we move ahead, our community flourishes on the spirit of collaboration. We are resolutely committed to refining technology and making it widely accessible. We wholeheartedly invite everyone to become part of the open-source community that inspires each one of us. Thank you for reading, and stay tuned for updates on our journey!

### **Useful links**

[Baidu Search macro](https://github.com/IlyaSob/ONLYOFFICE-API-macro/tree/main/server)

[Exploring the ZhiPu Plugin: Our Second OSPP Project](https://www.onlyoffice.com/blog/2023/09/meet-the-zhipu-copilot-plugin-for-onlyoffice?utm_source=blog&utm_medium=article+&utm_id=Baidu_macro_OSPP)

[OSPP official website](https://summer-ospp.ac.cn/)

[Eeshaan Sawant’s Insight](https://dev.to/sawanteeshaan/from-rookie-to-remarkable-navigating-my-internship-experience-at-onlyoffice-20ga)

[Contribute to ONLYOFFICE](https://www.onlyoffice.com/contribute.aspx?utm_source=blog&utm_medium=article+&utm_id=Baidu_macro_OSPP)
