예측 엔드포인트는 최대 5일간의 일일 꽃가루 정보를 제공합니다. 사용자에게 표시되는 다음 정보를 제어할 수 있습니다.
- 예측 일수
- 번역된 필드의 언어 코드
- 응답 페이지 크기
- 특정 지역의 식물 및 알레르기 유발 가능성에 관한 자세한 정보
API 탐색기를 사용하면 API 및 API 옵션에 익숙해질 수 있도록 실시간으로 요청할 수 있습니다.
예측 요청 정보
예측 엔드포인트를 사용하여 일일 꽃가루 정보를 요청하려면 다음 주소로 HTTP GET 요청을 전송합니다.
https://pollen.googleapis.com/v1/forecast:lookup?key=YOUR_API_KEY
URL에 매개변수를 포함합니다. 요청에는 꽃가루 예측을 가져올 위치, 예측 일수, 응답에 포함할 꽃가루 정보가 포함됩니다.
예측 응답 정보
응답 본문은 요청된 좌표의 지역 코드와 요청된 각 날짜의 일일 예보 정보를 제공합니다. 2일 이상의 정보를 요청하는 경우 정보가 요청된 페이지 크기에 맞지 않는 경우 다음 페이지를 가져오는 토큰도 응답 본문에 포함됩니다.
응답 본문에는 다음 세 가지 객체도 포함됩니다.
DayInfo는 PollenTypeInfo 및 PlantInfo와 함께 표시된 예측의 날짜를 제공합니다.
PollenTypeInfo는 요청된 좌표에서 사용 가능한 꽃가루 유형 (
GRASS
,TREE
,WEED
), 꽃가루 지수, 관련 건강 권장사항의 시즌성을 제공합니다.PlantInfo는 요청된 좌표에서 식물 이름과 설명(시즌성, 모양, 교차 반응 포함)을 제공합니다.
기본 매개변수
요청 예시
다음 코드는 forecast:lookup 요청에 대한 기본 요청을 구성하는 방법을 보여줍니다. 이 예에서는 꽃가루 정보의 위치와 일 수를 설정합니다.
curl -X GET "https://pollen.googleapis.com/v1/forecast:lookup?key=YOUR_API_KEY&location.longitude=35.32 &location.latitude=32.32 &days=1"
응답 예
위 호출은 다음과 같은 JSON 응답을 생성합니다.
{ "regionCode": "IL", "dailyInfo": [ { "date": { "year": 2023, "month": 7, "day": 11 }, "pollenTypeInfo": [ { "code": "GRASS", "displayName": "Grass", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Pollen levels are very low right now. It's a great day to enjoy theoutdoors!" ] }, { "code": "TREE", "displayName": "Tree", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Pollen levels are very low right now. It's a great day to enjoy theoutdoors!" ] }, { "code": "WEED", "displayName": "Weed", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Pollen levels are very low right now. It's a great day to enjoy theoutdoors!" ] } ], "plantInfo": [ { "code": "BIRCH", "displayName": "Birch", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "plantDescription": { "type": "TREE", "family": "Betulaceae (the Birch family)", "season": "Late winter, spring", "specialColors": "The bark is usually whitish-gray, silver, orsometimes red." , "specialShapes": "Birch leaves are often triangular with jaggededges. The bark on most birch trees has horizontal dark streaks that look like scoring. Birch tree bark is also , "crossReaction": "Alder, Hazel, Hornbeam, Beech, Willow, and Oakwell-known for its paper-like texture and peeling nature." pollen. In addition, there may be a higher risk for food allergies like hazelnuts, almonds, peanuts, pears, apples, , "picture": "https://storage.googleapis.com/pollen-pictures/birch_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/birch_closeup.jpg" } }, { "code": "OLIVE", "displayName": "Olive" }, { "code": "GRAMINALES", "displayName": "Grasses", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arecherries and carrots." likely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "plantDescription": { "type": "GRASS", "family": "Poaceae", "season": "Late spring, summer", "specialColors": "None", "specialShapes": "The leaves are alternate, long and narrow and theleaf margin is smooth." , "crossReaction": "Plantain (Plantago) pollen. In addition, there maybe a higher risk for food allergies like melons, oranges, tomatoes, peanuts, soy, potato, and other legumes." , "picture": "https://storage.googleapis.com/pollen-pictures/graminales_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/graminales_closeup.jpg" } }, { "code": "RAGWEED", "displayName": "Ragweed", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 0, "category": "None", "indexDescription": "Pollen levels are very low and are not likelyto trigger allergic reactions" , "color": {} }, "plantDescription": { "type": "WEED", "family": "Asteraceae (the daisy family)", "season": "Late summer, fall", "specialColors": "None", "specialShapes": "The leaves are alternate or opposite, divided andlobed. The leaf margin is smooth or serrated." , "crossReaction": "Mugwort and Goldenrod as well as daisies such asSunflower, Dandelion, and Chamomile." , "picture": "https://storage.googleapis.com/pollen-pictures/ragweed_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/ragweed_closeup.jpg" } }, { "code": "ALDER", "displayName": "Alder" }, { "code": "MUGWORT", "displayName": "Mugwort", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "plantDescription": { "type": "WEED", "family": "Asteraceae (the daisy family)", "season": "Late summer, fall", "specialColors": "The leaves are green on the upper side andgray-green on the lower side." , "specialShapes": "The leaves are alternate, divided and pinnate.", "crossReaction": "Ragweed and Goldenrod pollen as well as daisiessuch as Sunflower, Dandelion and Chamomile. In addition, there may be a higher risk for food allergies like mustard, , "picture": "https://storage.googleapis.com/pollen-pictures/mugwort_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/mugwort_closeup.jpg" } } ] } ] }peach, celery and various herbs and spices."
추가 매개변수
요청 예시
다음 코드는 forecast:lookup 요청을 구성하는 방법을 보여줍니다. 이 예에서는 위치, 일수, 응답 언어를 설정하고 발전소 설명을 삭제합니다.
curl -X GET "https://pollen.googleapis.com/v1/forecast:lookup?key=YOUR_API_KEY&location.longitude=35.32 &location.latitude=32.32 &days=1 &languageCode=fr &plantsDescription=false"
응답 예
위 호출은 다음 JSON 응답을 생성합니다.
{ "regionCode": "IL", "dailyInfo": [ { "date": { "year": 2023, "month": 7, "day": 11 }, "pollenTypeInfo": [ { "code": "GRASS", "displayName": "Herbacée", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Très faible", "indexDescription": "Les personnes extrêmement sensibles au pollensont susceptibles de ressentir des symptômes." , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Les niveaux de pollen sont très faibles actuellement. La journéeest idéale pour profiter du grand air !" ] }, { "code": "TREE", "displayName": "Arbre", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Très faible", "indexDescription": "Les personnes extrêmement sensibles au pollensont susceptibles de ressentir des symptômes." , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Les niveaux de pollen sont très faibles actuellement. La journéeest idéale pour profiter du grand air !" ] }, { "code": "WEED", "displayName": "Herbacées", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Très faible", "indexDescription": "Les personnes extrêmement sensibles au pollensont susceptibles de ressentir des symptômes." , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Les niveaux de pollen sont très faibles actuellement. La journéeest idéale pour profiter du grand air !" ] } ], "plantInfo": [ { "code": "BIRCH", "displayName": "Bouleau", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Très faible", "indexDescription": "Les personnes extrêmement sensibles au pollensont susceptibles de ressentir des symptômes." , "color": { "green": 0.61960787, "blue": 0.22745098 } } }, { "code": "OLIVE", "displayName": "Olivier" }, { "code": "GRAMINALES", "displayName": "Graminées", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Très faible", "indexDescription": "Les personnes extrêmement sensibles au pollensont susceptibles de ressentir des symptômes." , "color": { "green": 0.61960787, "blue": 0.22745098 } } }, { "code": "RAGWEED", "displayName": "Ambroisie", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 0, "category": "Aucun", "indexDescription": "Les niveaux de pollen sont très faibles et ontpeu de risque de déclencher des réactions allergiques." , "color": {} } }, { "code": "ALDER", "displayName": "Aulne" }, { "code": "MUGWORT", "displayName": "Armoise", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Très faible", "indexDescription": "Les personnes extrêmement sensibles au pollensont susceptibles de ressentir des symptômes." , "color": { "green": 0.61960787, "blue": 0.22745098 } } } ] } ] }
페이지 크기 제한
요청 예시
다음 코드는 forecast:lookup 요청을 구성하는 방법을 보여줍니다. 이 예에서는 위치, 예측 일수 (이 경우 4일), 페이지 크기 제한을 1로 설정합니다. 이 요청은 첫 번째 날짜의 예측만 반환합니다. 응답에는 nextPageToken
속성이 포함되어 있으며, 이 속성은 두 번째 요청에서 사용하여 4일 중 2일차에 액세스합니다.
curl -X GET "https://pollen.googleapis.com/v1/forecast:lookup?key=YOUR_API_KEY&location.longitude=35.32 &location.latitude=32.32 &days=4 &pageSize=1"
응답 예
위의 호출은 nextPageToken
를 포함하는 다음 JSON 응답을 생성합니다. 두 번째 요청에서 nextPageToken
를 사용하여 예측의 다음 날짜에 액세스합니다.
{ "regionCode": "IL", "dailyInfo": [ { "date": { "year": 2023, "month": 7, "day": 14 }, "pollenTypeInfo": [ { "code": "GRASS", "displayName": "Grass", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 2, "category": "Low", "indexDescription": "People with high allergy to pollen are likelyto experience symptoms" , "color": { "red": 0.5176471, "green": 0.8117647, "blue": 0.2 } }, "healthRecommendations": [ "It's a good day for outdoor activities since pollen levels arelow." , "Do you know which plants cause your pollen allergy? Check out thepollen data to be prepared." ] }, { "code": "TREE", "displayName": "Tree", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Pollen levels are very low right now. It's a great day to enjoythe outdoors!" ] }, { "code": "WEED", "displayName": "Weed", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Pollen levels are very low right now. It's a great day to enjoy theoutdoors!" ] } ], "plantInfo": [ { "code": "BIRCH", "displayName": "Birch", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "plantDescription": { "type": "TREE", "family": "Betulaceae (the Birch family)", "season": "Late winter, spring", "specialColors": "The bark is usually whitish-gray, silver, orsometimes red." , "specialShapes": "Birch leaves are often triangular with jaggededges. The bark on most birch trees has horizontal dark streaks that look like scoring. Birch tree bark is also , "crossReaction": "Alder, Hazel, Hornbeam, Beech, Willow, and Oakwell-known for its paper-like texture and peeling nature." pollen. In addition, there may be a higher risk for food allergies like hazelnuts, almonds, peanuts, pears, apples, , "picture": "https://storage.googleapis.com/pollen-pictures/birch_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/birch_closeup.jpg" } }, { "code": "OLIVE", "displayName": "Olive" }, { "code": "GRAMINALES", "displayName": "Grasses", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 2, "category": "Low", "indexDescription": "People with high allergy to pollen are likelycherries and carrots." to experience symptoms" , "color": { "red": 0.5176471, "green": 0.8117647, "blue": 0.2 } }, "plantDescription": { "type": "GRASS", "family": "Poaceae", "season": "Late spring, summer", "specialColors": "None", "specialShapes": "The leaves are alternate, long and narrow and theleaf margin is smooth." , "crossReaction": "Plantain (Plantago) pollen. In addition, there maybe a higher risk for food allergies like melons, oranges, tomatoes, peanuts, soy, potato, and other legumes." , "picture": "https://storage.googleapis.com/pollen-pictures/graminales_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/graminales_closeup.jpg" } }, { "code": "RAGWEED", "displayName": "Ragweed", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 0, "category": "None", "indexDescription": "Pollen levels are very low and are not likelyto trigger allergic reactions" , "color": {} }, "plantDescription": { "type": "WEED", "family": "Asteraceae (the daisy family)", "season": "Late summer, fall", "specialColors": "None", "specialShapes": "The leaves are alternate or opposite, divided andlobed. The leaf margin is smooth or serrated." , "crossReaction": "Mugwort and Goldenrod as well as daisies such asSunflower, Dandelion, and Chamomile." , "picture": "https://storage.googleapis.com/pollen-pictures/ragweed_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/ragweed_closeup.jpg" } }, { "code": "ALDER", "displayName": "Alder" }, { "code": "MUGWORT", "displayName": "Mugwort", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "plantDescription": { "type": "WEED", "family": "Asteraceae (the daisy family)", "season": "Late summer, fall", "specialColors": "The leaves are green on the upper side andgray-green on the lower side." , "specialShapes": "The leaves are alternate, divided and pinnate.", "crossReaction": "Ragweed and Goldenrod pollen as well as daisiessuch as Sunflower, Dandelion and Chamomile. In addition, there may be a higher risk for food allergies like mustard, , "picture": "https://storage.googleapis.com/pollen-pictures/mugwort_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/mugwort_closeup.jpg" } } ] } ], "nextPageToken": "CAESdApadHlwZS5nb29nbGVhcGlzLm..." }peach, celery and various herbs and spices."
2페이지에 액세스하려면 요청에 nextPageToken
를 삽입합니다. 응답에는 예측의 3일 차에 액세스하는 데 사용할 수 있는 nextPageToken
이 포함됩니다.
curl -X GET "https://pollen.googleapis.com/v1/forecast:lookup?key=YOUR_API_KEY&location.longitude=35.32 &location.latitude=32.32 &days=4 &pageSize=1 &pageToken=CAESdApadHlwZS5nb29nbGVhcGlzLm..."
응답은 꽃가루 예측 2일차에 대한 정보를 제공합니다.
{ "regionCode": "IL", "dailyInfo": [ { "date": { "year": 2023, "month": 7, "day": 15 }, "pollenTypeInfo": [ { "code": "GRASS", "displayName": "Grass", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 2, "category": "Low", "indexDescription": "People with high allergy to pollen are likely to experience symptoms", "color": { "red": 0.5176471, "green": 0.8117647, "blue": 0.2 } }, "healthRecommendations": [ "It's a good day for outdoor activities since pollen levels are low.", "Do you know which plants cause your pollen allergy? Check out thepollen data to be prepared." ] }, { "code": "TREE", "displayName": "Tree", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Pollen levels are very low right now. It's a great day to enjoy theoutdoors!" ] }, { "code": "WEED", "displayName": "Weed", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "healthRecommendations": [ "Pollen levels are very low right now. It's a great day to enjoy theoutdoors!" ] } ], "plantInfo": [ { "code": "BIRCH", "displayName": "Birch", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "plantDescription": { "type": "TREE", "family": "Betulaceae (the Birch family)", "season": "Late winter, spring", "specialColors": "The bark is usually whitish-gray, silver, orsometimes red." , "specialShapes": "Birch leaves are often triangular with jagged edges.The bark on most birch trees has horizontal dark streaks that look like scoring. Birch tree bark is also , "crossReaction": "Alder, Hazel, Hornbeam, Beech, Willow, and Oakwell-known for its paper-like texture and peeling nature." pollen. In addition, there may be a higher risk for food allergies like hazelnuts, almonds, peanuts, pears, apples, cherries and carrots." , "picture": "https://storage.googleapis.com/pollen-pictures/birch_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/birch_closeup.jpg" } }, { "code": "OLIVE", "displayName": "Olive" }, { "code": "GRAMINALES", "displayName": "Grasses", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 2, "category": "Low", "indexDescription": "People with high allergy to pollen are likelyto experience symptoms" , "color": { "red": 0.5176471, "green": 0.8117647, "blue": 0.2 } }, "plantDescription": { "type": "GRASS", "family": "Poaceae", "season": "Late spring, summer", "specialColors": "None", "specialShapes": "The leaves are alternate, long and narrow and theleaf margin is smooth." , "crossReaction": "Plantain (Plantago) pollen. In addition, there maybe a higher risk for food allergies like melons, oranges, tomatoes, peanuts, soy, potato, and other legumes." , "picture": "https://storage.googleapis.com/pollen-pictures/graminales_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/graminales_closeup.jpg" } }, { "code": "RAGWEED", "displayName": "Ragweed", "inSeason": true, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 0, "category": "None", "indexDescription": "Pollen levels are very low and are not likelyto trigger allergic reactions" , "color": {} }, "plantDescription": { "type": "WEED", "family": "Asteraceae (the daisy family)", "season": "Late summer, fall", "specialColors": "None", "specialShapes": "The leaves are alternate or opposite, divided andlobed. The leaf margin is smooth or serrated." , "crossReaction": "Mugwort and Goldenrod as well as daisies such asSunflower, Dandelion, and Chamomile." , "picture": "https://storage.googleapis.com/pollen-pictures/ragweed_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/ragweed_closeup.jpg" } }, { "code": "ALDER", "displayName": "Alder" }, { "code": "MUGWORT", "displayName": "Mugwort", "inSeason": false, "indexInfo": { "code": "UPI", "displayName": "Universal Pollen Index", "value": 1, "category": "Very Low", "indexDescription": "People with very high allergy to pollen arelikely to experience symptoms" , "color": { "green": 0.61960787, "blue": 0.22745098 } }, "plantDescription": { "type": "WEED", "family": "Asteraceae (the daisy family)", "season": "Late summer, fall", "specialColors": "The leaves are green on the upper side andgray-green on the lower side." , "specialShapes": "The leaves are alternate, divided and pinnate.", "crossReaction": "Ragweed and Goldenrod pollen as well as daisiessuch as Sunflower, Dandelion and Chamomile. In addition, there may be a higher risk for food allergies like mustard, , "picture": "https://storage.googleapis.com/pollen-pictures/mugwort_full.jpg", "pictureCloseup": "https://storage.googleapis.com/pollen-pictures/mugwort_closeup.jpg" } } ] } ], "nextPageToken": "CAISdApadHlwZS5nb29nbGVhcGlzLm..." }peach, celery and various herbs and spices."