Yeh course seekhne ke liye general jaankari hai, legal advice nahi. Ikattha kiye data ke business use ke liye kisi lawyer se poochho.
Is lesson ke end tak aap jaan jaoge ki website se data lene ke chaar tareeke kaunse hain, unhe kis order mein try karna hai, aur kisi ke scraper likhne se pehle sabse aasaan tareeka try karoge.
Aapko chahiye: ek browser aur Google account (Google Sheets ke liye) · Time: 7 minute
Neha Pune mein BBA student hai. Project ke liye use har state ke baarish ke numbers chahiye, aur ek online store ki 50 books ke daam. Haath se copy karne mein poora weekend chala jaata. Paanch shabd use sochne mein madad karte hain:
- Web data: website pe dikhne wali koi bhi jaankari: daam, tables, lists, numbers.
- CSV: rows aur columns wali simple file jisme values comma se alag hoti hain. Excel aur Google Sheets ise seedha kholte hain.
- API: ek darwaza jo website jaan-boojh ke banati hai taaki programs uska data maang sakein aur saaf jawab paayein.
- JSON: woh text format jisme zyaadatar APIs jawab dete hain, labels aur values ke saath, jaise
"price": 51.77. - Scraping: ek program jo browser ki tarah web pages kholta hai aur unme se data copy karta hai.
Kyun?AI agent ke saath scraper likhna paanch minute ka kaam hai, isliye wahin se shuru karne ka mann karta hai. Par scraping data lene ka sabse dheema, sabse jaldi tootne wala aur sabse risky tareeka hai. Baaki tareeke jaanoge toh time aur pareshani dono bachegi.
Apne options ko ek seedhi ki tarah socho. Upar se shuru karo, aur neeche tabhi utro jab upar wala daanda kaam na kare:
Har neeche wala daanda matlab zyaada kaam, zyaada tootna aur zyaada risk. Kyun?Upar ke daande woh data dete hain jo owner ne share karna chuna, saaf format mein jo website ka design badalne pe nahi toot-ta. Scraper har baar toot-ta hai jab koi ek button idhar-udhar kar de.
Kai websites data pehle se de deti hain. Table ke paas, page ke neeche, ya menu mein Download, Export, CSV, Excel ya Data jaise shabd dhoondho.
Indian public data ke liye data.gov.in se shuru karo, sarkaar ka Open Government Data Platform. Neha wahan "rainfall" search karti hai aur state-wise baarish ki tables milti hain jo file ki tarah download ho jaati hain. Wahan ke zyaadatar datasets Government Open Data License – India ke under hain, jo source ka credit dene pe dobara use karne deta hai.
Agent se kuch bhi banwane se pehle use aasaan raasta dhoondhne bolo:
Prompt · ise apne AI agent mein paste karoI need [state-wise annual rainfall for the last 10 years] for a college project, in a CSV file I can open in Google Sheets. Before writing any scraper, find out: does [data.gov.in or the website I name] offer this as a download (CSV or Excel), an official API, or an RSS feed? Give me the exact links and what each one contains. Only suggest scraping if none of these exist, and tell me why.
Kyun?Download ki hui file poori, sahi aur allowed hoti hai. Paanch minute mein woh mil jaata hai jo scraper ek din mein ikattha karta, bina koi rule tode.
Download button nahi hai toh API ka link dhoondho, aksar site ke neeche "Developers", "API" ya "Data" ke under. API ko aksar ek free API key chahiye hoti hai (password jaisa code jo aapko pehchaanta hai), aur uski limits hoti hain, jaise din ki 1,000 requests. Misaal ke liye, data.gov.in sign in karne ke baad kai datasets ki API deta hai.
API saaf JSON mein jawab deti hai. Ek row aisi dikh sakti hai:
JSON{ "state": "Kerala", "year": 2024, "annual_rainfall_mm": 2890.4 }Aapka agent aise jawabon ko minuton mein CSV bana sakta hai. API key kisi bhi share hone wali file mein mat rakho, jaise baaki keys secret rakhte ho (dekho Keep secrets secret).
Kyun?API owner ka kehna hai "programs ka swagat hai, aise aao". Aapko bilkul wahi fields milte hain jo chahiye, aur limits pehle se pata hoti hain, block hone ke baad nahi.
Daanda 3: feeds aur sitemaps. News sites aur blogs ka aksar RSS feed hota hai, unke latest posts ki list jo programs ke padhne ke liye bani hai. Kai sites ka
sitemap.xmlbhi hota hai: unke saare pages ki list jo woh search engines ke liye publish karti hain. Dono woh lists hain jo site jaan-boojh ke deti hai.Daanda 4: scraping, sirf tab jab upar kuch kaam na kare, aur sirf agle lesson ke checks ke baad.
Atak gaye? Owner ko email karo. Chhote businesses, NGOs aur sarkaari offices aksar student ki polite request pe haan bol dete hain:
Prompt · ise apne AI agent mein paste karoWrite a short, polite email to [the office of the Pune Municipal Corporation] asking for [ward-wise water supply data for 2025] as a CSV or Excel file. Explain that I am a [BBA student at XYZ College] using it for a college project, that I will credit them as the source, and that I won't share personal data. Keep it under 120 words.
Jodi banao Har situation ko us daande se jodo jo use karna hai
Left mein ek cheez tap karo, phir right mein uska matlab.
Kyun?Poochhne mein ek email lagti hai aur ek hafta bach sakta hai. Aur owner ne mana kiya, toh pata chal gaya ki scraping bhi unki marzi ke khilaaf hoti.
Neha ko ek store se books ke daam chahiye. Site pe na download hai, na API, na feed. Uska dost Rahul kehta hai "aaj raat scrape kar le, saare pages, jitna tez ho sake".
- Web data chaar daandon se aata hai: download, official API, feeds aur sitemaps, phir scraping.
- Hamesha upar se shuru karo: owner ki di hui file poori, sahi aur allowed hoti hai.
- Indian public data ke liye pehla stop data.gov.in; kai datasets file mein download hote hain, aur kai ki API hai.
- Scraper likhwane se pehle agent se download ya API dhundhwao; kuch na mile toh owner ko email karo.
- Aage: kuch bhi ikattha karne se pehle robots.txt aur terms padho.
Free account banao taaki progress save ho aur har lesson khule. Free account banao