Big Data 7 min read

Unlock 100+ Free Data APIs with Just 3 Lines of Python

This article introduces the GoPUP library, which provides over a hundred free data interfaces—including social media indexes, macro‑economic figures, company information, and epidemic statistics—accessible with simple Python code, making data analysis faster and easier.

Python Crawling & Data Mining
Python Crawling & Data Mining
Python Crawling & Data Mining
Unlock 100+ Free Data APIs with Just 3 Lines of Python

Data analysis starts with data, and the GoPUP library offers over 100 free data interfaces covering index, macroeconomics, new economy, KOL, information, life, and epidemic data.

Install the library via pip install gopup --upgrade and start using it.

1. Weibo Index

Retrieve the Weibo index for a keyword:

import gopup as gp
df_index = gp.weibo_index(word="马保国", time_type="1month")
print(df_index)
time_type

can be "1hour", "1day", "1month", or "3month".

2. Baidu Search Index

Get Baidu search index (requires login cookie):

import gopup as gp
cookie = "your_cookie_here"
index_df = gp.baidu_search_index(word="马保国", start_date='2020-11-15', end_date='2020-11-25', cookie=cookie)
print(index_df)

3. Toutiao Index

Fetch Toutiao index (may be unavailable):

import gopup as gp
index_df = gp.toutiao_index(keyword="马保国", start_date='20201115', end_date='20201125')
print(index_df)

4. Google Index

Requires a proxy; usage similar to the above:

import gopup as gp
index_df = gp.google_index(keyword="马保国", start_date='2020-11-15T10', end_date='2020-11-25T23')
print(index_df)

5. Macro Economic Data

Example: leverage ratio data:

import gopup as gp
df_index = gp.marco_cmlrd()
print(df_index)

6. New Economy Data

Unicorn and bankrupt company data:

import gopup as gp
df_index = gp.nicorn_company()
print(df_index)
import gopup as gp
df_index = gp.death_company()
print(df_index)

7. KOL Data

Weibo KOL example:

import gopup as gp
g = gp.pro_api(token="...")
df_index = g.weibo_user(keyword="雷军")
print(df_index)

8. Oil Price Data

import gopup as gp
df_index = gp.energy_oil_hist()
print(df_index)

9. Baidu Migration Data

import gopup as gp
migration_area_baidu_df = gp.migration_area_baidu(area="湖北省", indicator="move_in", date="20200201")
print(migration_area_baidu_df)

10. Real‑time Box Office

import gopup as gp
df_index = gp.realtime_boxoffice()
print(df_index)

11. University Data

import gopup as gp
df_index = gp.university()
print(df_index)

12. Epidemic Data

import gopup as gp
covid_163_df = gp.covid_163(indicator="世界历史累计数据")
print(covid_163_df)

For full documentation and more interfaces, visit the GitHub repository https://github.com/justinzm/gopup and the official docs at http://doc.gopup.cn/#/README.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Big DataPythonAPIgopupWeb Data
Python Crawling & Data Mining
Written by

Python Crawling & Data Mining

Life's short, I code in Python. This channel shares Python web crawling, data mining, analysis, processing, visualization, automated testing, DevOps, big data, AI, cloud computing, machine learning tools, resources, news, technical articles, tutorial videos and learning materials. Join us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.