PHPackages                             ctwj/wechat\_search\_api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ctwj/wechat\_search\_api

ActiveLibrary[API Development](/categories/api)

ctwj/wechat\_search\_api
========================

api for wechat subscribe account and articles by sogou search

v0.1.3(7y ago)541MITPHPPHP &gt;=7.0

Since May 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ctwj/wechat_search)[ Packagist](https://packagist.org/packages/ctwj/wechat_search_api)[ Docs](http://www.safecode.cc)[ RSS](/packages/ctwj-wechat-search-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

wechat\_search
==============

[](#wechat_search)

api for wechat subscribe account and articles by sogou search

install
-------

[](#install)

```
composer require ctwj\wechat_search_api

```

example
-------

[](#example)

- getInstance 获取实例

    ```
    $instance = \Ctwj\WechatSearch\WechatSearch::->getInstance();

    ```

    or

    ```
    $instance = \Ctwj\WechatSearch\WechatSearch::getInstance(
        [
            'cachePath'   => 'path to save cache',  //缓存路径,结尾需要友分隔符, 默认项目内
            'cacheTime'   => 10,        //分钟数,为0时关闭代理, 默认十分钟
            'proxyEnable' => false,     //是否开启代理
            'proxyObject' => '127.0.0.1:8080', //代理
            'useragent'   => [          //数组设置为多个每次随机选择
                "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1",
                "Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11",
            ]
        ]
    );

    ```

    or

    ```
    $instance = \Ctwj\WechatSearch\WechatSearch::getInstance(
        [
            'proxyEnable' => false,     //是否开启代理
            'proxyObject' => [
                '127.0.0.1:8080',
                'username',
                'password'
        ]
    );

    ```
- searchAccounts 搜索公众号

    ```
    $instance->searchAccounts(['keyword'=>'童话','page'=>1]);

    ```

    or

    ```
    $instance->searchAccounts('童话', 1);

    ```

    or

    ```
    $instance->searchAccounts('?query=%E7%AB%A5%E8%AF%9D&type=1&page=8&ie=utf8');

    ```
- searchArticles 搜索文章

    ```
    $instance->searchArticles(['keyword'=>'童话','page'=>1]);

    ```

    or

    ```
    $instance->searchArticles('童话', 1);

    ```

    or

    ```
    $instance->searchArticles('?query=%E7%AB%A5%E8%AF%9D&type=1&page=8&ie=utf8');

    ```
- accountArticles 获取公众号文章列表

    ```
    $instance->accountArticles('a accont temp link');

    ```
- getArticle 获取文章内容

    ```
    $instance->getArticle('a article temp link');

    ```
- getHots 获取分类热门文章列表

    ```
    $instance->getHots('育儿', 1);

    ```
- getTypes 获取分类

    ```
    $instance->getTypes();

    ```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

4

Last Release

2907d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ffac147263c409533a4d44c45c9444ac483f727baf010b279a02b4c65e39d2b?d=identicon)[908504609](/maintainers/908504609)

---

Top Contributors

[![ctwj](https://avatars.githubusercontent.com/u/10569013?v=4)](https://github.com/ctwj "ctwj (32 commits)")

---

Tags

apisearchwechatsogou

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ctwj-wechat-search-api/health.svg)

```
[![Health](https://phpackages.com/badges/ctwj-wechat-search-api/health.svg)](https://phpackages.com/packages/ctwj-wechat-search-api)
```

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M114](/packages/algolia-algoliasearch-client-php)[gigablah/sphinxphp

Sphinx Search PHP 5.3+ API with PSR compliance

861.4M16](/packages/gigablah-sphinxphp)[gigablah/fsphinxphp

Facet extension for Sphinx Search

5362.8k](/packages/gigablah-fsphinxphp)[hmerritt/imdb-api

IMDB API that can fetch film data and search results

6911.3k](/packages/hmerritt-imdb-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
