Json To Excel avatar
Json To Excel
Try for free

No credit card required

View all Actors
Json To Excel

Json To Excel

zuzka/json-to-excel
Try for free

No credit card required

Convert your json into a tabular form, such as CSV, Excel or HTML table fast and easy.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4client = ApifyClient("<YOUR_API_TOKEN>")
5
6# Prepare the Actor input
7run_input = { "JSON": """[
8    {
9    \"title\": \"Apify: Full-stack web scraping and data extraction platform\",
10    \"url\": \"https://apify.com/\",
11    \"displayedUrl\": \"https://apify.com\",
12    \"description\": \"Crawls arbitrary websites using the Chrome browser and extracts data from pages using a provided JavaScript code. The actor supports both recursive crawling and ...\",
13    \"emphasizedKeywords\": [],
14    \"productInfo\": {},
15    \"type\": \"organic\",
16    \"position\": 1
17    },
18    {
19    \"title\": \"Apify (@apify) · X\",
20    \"url\": \"https://twitter.com/apify?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor\",
21    \"displayedUrl\": \"https://twitter.com/apify\",
22    \"description\": \"\",
23    \"emphasizedKeywords\": [],
24    \"siteLinks\": [],
25    \"productInfo\": {},
26    \"type\": \"organic\",
27    \"position\": 2
28    },
29    {
30    \"title\": \"Apify\",
31    \"url\": \"https://github.com/apify\",
32    \"displayedUrl\": \"https://github.com › apify\",
33    \"description\": \"Generic REST API for scraping websites. Drop-in replacement for ScrapingBee, ScrapingAnt, and ScraperAPI services. And it is open-source!\",
34    \"emphasizedKeywords\": [],
35    \"siteLinks\": [],
36    \"productInfo\": {},
37    \"type\": \"organic\",
38    \"position\": 3
39    },
40    {
41    \"title\": \"Apify Pricing, Alternatives & More 2024\",
42    \"url\": \"https://www.capterra.com/p/150854/Apify/\",
43    \"displayedUrl\": \"https://www.capterra.com › Data Extraction Software\",
44    \"description\": \"Apify is used by large enterprises, SMEs, and independent developers. The Apify platform lets you turn any website into an API and reliably extract data at any ...\",
45    \"emphasizedKeywords\": [
46    \"Apify\"
47    ],
48    \"siteLinks\": [],
49    \"productInfo\": {
50    \"rating\": 4.8,
51    \"numberOfReviews\": 150
52    },
53    \"type\": \"organic\",
54    \"position\": 4
55    },
56    {
57    \"title\": \"Apify\",
58    \"url\": \"https://cz.linkedin.com/company/apifytech\",
59    \"displayedUrl\": \"6.6K+ followers\",
60    \"description\": \"Apify is a full-stack web scraping and browser automation platform that lets you extract data from websites and automate workflows on the web.\",
61    \"emphasizedKeywords\": [
62    \"Apify\"
63    ],
64    \"siteLinks\": [],
65    \"productInfo\": {},
66    \"type\": \"organic\",
67    \"position\": 5
68    },
69    {
70    \"title\": \"Apify Reviews 2024: Details, Pricing, & Features\",
71    \"url\": \"https://www.g2.com/products/apify/reviews\",
72    \"displayedUrl\": \"https://www.g2.com › ... › Apify › Apify Reviews\",
73    \"description\": \"One of the best features of Apify is their own free scrapers. They provide a variety of ready-made solutions for common web scraping tasks, such as extracting ...\",
74    \"emphasizedKeywords\": [
75    \"Apify\"
76    ],
77    \"siteLinks\": [],
78    \"productInfo\": {
79    \"rating\": 4.8,
80    \"numberOfReviews\": 112
81    },
82    \"type\": \"organic\",
83    \"position\": 6
84    },
85    {
86    \"title\": \"Apify Tutorial For Beginners | How To Use Apify\",
87    \"url\": \"https://www.youtube.com/watch?v=3rrpfW0bEdc\",
88    \"displayedUrl\": \"4.9K+ views  ·  9 months ago\",
89    \"description\": \"Apify review: https://speakaboutdigital.com/apify-review/ Apify Tutorial For Beginners | How To Use Apify This is my video tutorial on Apify ...\",
90    \"emphasizedKeywords\": [
91    \"Apify\"
92    ],
93    \"siteLinks\": [],
94    \"productInfo\": {},
95    \"type\": \"organic\",
96    \"position\": 7
97    }]""" }
98
99# Run the Actor and wait for it to finish
100run = client.actor("zuzka/json-to-excel").call(run_input=run_input)
101
102# Fetch and print Actor results from the run's dataset (if there are any)
103print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
104for item in client.dataset(run["defaultDatasetId"]).iterate_items():
105    print(item)
106
107# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start
Developer
Maintained by Community
Actor metrics
  • 4 monthly users
  • 2 stars
  • 94.1% runs succeeded
  • Created in Oct 2021
  • Modified 2 months ago
Categories