getting actor input schema

Hi. how to get an actor input-schema.json ?
9 Replies
extended-salmon
extended-salmonโ€ข3y ago
You want the input schema of an actor existing on the platform? Which actor?
!!!Joefree!!! ๐Ÿ‘‘
!!!Joefree!!! ๐Ÿ‘‘OPโ€ข3y ago
I mean any actor for example I want to create a GUI client for running actor and need the INPUT_SCHEMA.json to construct the GUI interface is there any way to get the input-schema using api or else ?
extended-salmon
extended-salmonโ€ข3y ago
It doesn't seem possible The only way I can find is to go to the actor's source code tab: https://apify.com/apify/google-search-scraper/source-code Then visit the repo: https://github.com/apify/actor-google-search-scraper And grab the INPUT_SCHEMA.json from there
!!!Joefree!!! ๐Ÿ‘‘
!!!Joefree!!! ๐Ÿ‘‘OPโ€ข3y ago
Thanks. I guess I can scrape directly from the actor page. but I wonder if there an official way to do this ๐Ÿป
extended-salmon
extended-salmonโ€ข3y ago
@Lukas Krivka Know of any potential way that I might be missing?
!!!Joefree!!! ๐Ÿ‘‘
!!!Joefree!!! ๐Ÿ‘‘OPโ€ข3y ago
yeah. for example https://apify.com/apify/web-scraper if you look on the HTML source there is <script id="__NEXT_DATA__" type="application/json">...... the input_schema is there ๐Ÿ˜ƒ
Apify
Web Scraper ยท Apify
Crawls arbitrary websites using the Chrome browser and extracts data from pages using a provided JavaScript code. The actor supports both recursive crawling and lists of URLs and automatically manages concurrency for maximum performance. This is Apify's basic tool for web crawling and scraping.
extended-salmon
extended-salmonโ€ข3y ago
Oh epic! Yeah we're using NextJS for static pages. Just wasn't aware the data was present in the __NEXT_DATA__ object. Cool find!! Scrape us!! Haha Very excited to see what you build ๐Ÿ™‚ Be sure to share it in #๐Ÿ—จapify-chat once you deploy it!
!!!Joefree!!! ๐Ÿ‘‘
!!!Joefree!!! ๐Ÿ‘‘OPโ€ข3y ago
sure ๐Ÿ˜„ although I am a bit hesitate to use actor to scrap its own host, is it ethical ? ๐Ÿ˜„ maybe next updates will add the ability to get the schema using api.
extended-salmon
extended-salmonโ€ข3y ago
Totally ethical! Apify is scraping-friendly ๐Ÿ˜„ Go right ahead

Did you find this page helpful?