### DaumSearch.search_web - Search web documents Source: https://context7.com/wooiljeong/pykakao/llms.txt Searches Daum for web documents matching the query. Returns URLs, titles, contents, and metadata for matching web pages with pagination support. ```APIDOC ## GET /search/web ### Description Searches Daum for web documents matching the query. Returns URLs, titles, contents, and metadata for matching web pages with pagination support. ### Method GET ### Endpoint /search/web ### Parameters #### Query Parameters - **query** (string) - Required - The search keyword. - **page** (integer) - Optional - The page number for pagination (1-50). Defaults to 1. - **size** (integer) - Optional - The number of results to return per page (1-50). Defaults to 10. - **sort** (string) - Optional - The sorting order. Options: 'accuracy', 'recency'. Defaults to 'accuracy'. - **dataframe** (boolean) - Optional - If true, returns results as a pandas DataFrame. ### Request Example ```python from PyKakao import DaumSearch api = DaumSearch(service_key="YOUR_KAKAO_REST_API_KEY") result = api.search_web( query="Python 프로그래밍", page=1, size=10, sort="accuracy" ) result_df = api.search_web( query="Python 프로그래밍", dataframe=True ) ``` ### Response #### Success Response (200) - **meta** (object) - Metadata about the search results. - **total_count** (integer) - The total number of results. - **pageable_count** (integer) - The number of results that can be paged. - **is_end** (boolean) - Whether this is the last page. - **documents** (array) - An array of web document objects. - **title** (string) - The title of the web document. - **contents** (string) - A snippet of the content. - **url** (string) - The URL of the web document. - **datetime** (string) - The publication date and time of the document (ISO 8601 format). #### Response Example ```json { "meta": {"total_count": 1000, "pageable_count": 800, "is_end": false}, "documents": [ { "title": "Python 프로그래밍 기초", "contents": "Python은 강력한...", "url": "https://example.com/python", "datetime": "2025-01-15T10:30:00.000+09:00" } ] } ``` ``` -------------------------------- ### KoGPT.generate - Generate text with AI Source: https://context7.com/wooiljeong/pykakao/llms.txt Generates text completions using Kakao's KoGPT (Korean GPT) language model. Supports various parameters to control generation including temperature, top_p, and max_tokens. ```APIDOC ## POST /kogpt/text/completions ### Description Generates text completions using Kakao's KoGPT (Korean GPT) language model. Supports various parameters to control generation including temperature, top_p, and max_tokens. ### Method POST ### Endpoint /kogpt/text/completions ### Parameters #### Request Body - **prompt** (string) - Required - The input text prompt for the model. - **max_tokens** (integer) - Optional - The maximum number of tokens to generate. Defaults to 30. - **temperature** (float) - Optional - Controls the randomness of the output. Higher values mean more random. Defaults to 1.0. - **top_p** (float) - Optional - Nucleus sampling parameter. Controls diversity via probability mass. Defaults to 1.0. - **n** (integer) - Optional - The number of completions to generate. Defaults to 1. - **stop** (string or array) - Optional - Specifies sequences where the API will stop generating further tokens. ### Request Example ```python from PyKakao import KoGPT api = KoGPT(service_key="YOUR_KAKAO_REST_API_KEY") response = api.generate( prompt="인공지능의 미래는", max_tokens=100, temperature=0.7, top_p=0.9 ) # Access generated text generated_text = response["generations"][0]["text"] print(generated_text) ``` ### Response #### Success Response (200) - **id** (string) - The ID of the request. - **generations** (array) - An array of generated text objects. - **text** (string) - The generated text completion. - **finish_reason** (string) - The reason for stopping generation (e.g., 'max_tokens', 'stop_sequence'). #### Response Example ```json { "id": "req_abc123xyz", "generations": [ { "text": " 인공지능의 미래는 매우 밝으며, 우리 삶의 많은 부분을 변화시킬 것입니다.", "finish_reason": "max_tokens" } ] } ``` ``` -------------------------------- ### DaumSearch.search_image - Search images Source: https://context7.com/wooiljeong/pykakao/llms.txt Searches for images on Daum with support for filtering by image size, file format, and sorting options. ```APIDOC ## GET /search/image ### Description Searches for images on Daum with support for filtering by image size, file format, and sorting options. ### Method GET ### Endpoint /search/image ### Parameters #### Query Parameters - **query** (string) - Required - The search keyword. - **size** (integer) - Optional - The number of results to return per page (1-50). Defaults to 10. - **page** (integer) - Optional - The page number for pagination (1-50). Defaults to 1. - **sort** (string) - Optional - The sorting order. Options: 'accuracy', 'recency'. Defaults to 'accuracy'. - **extensions** (string) - Optional - Filter by image file format (e.g., 'jpg', 'png', 'gif'). - **size_filter** (string) - Optional - Filter by image size. Options: 'small', 'medium', 'large'. - **dataframe** (boolean) - Optional - If true, returns results as a pandas DataFrame. ### Request Example ```python from PyKakao import DaumSearch api = DaumSearch(service_key="YOUR_KAKAO_REST_API_KEY") result = api.search_image( query="강아지", size=10, page=1 ) result_df = api.search_image( query="강아지", dataframe=True ) ``` ### Response #### Success Response (200) - **documents** (array) - An array of image objects. - **collection** (string) - The collection the image belongs to (e.g., 'blog', 'cafe'). - **thumbnail_url** (string) - The URL of the image thumbnail. - **image_url** (string) - The URL of the original image. - **width** (integer) - The width of the image in pixels. - **height** (integer) - The height of the image in pixels. - **display_sitename** (string) - The name of the site where the image is displayed. - **datetime** (string) - The datetime the image was uploaded or indexed (ISO 8601 format). #### Response Example ```json { "documents": [ { "collection": "blog", "thumbnail_url": "https://img1.example.com/thumb.jpg", "image_url": "https://img1.example.com/image.jpg", "width": 800, "height": 600, "display_sitename": "Tistory", "datetime": "2025-01-15T10:30:00.000+09:00" } ] } ``` ``` -------------------------------- ### Local.search_keyword - Search places by keyword Source: https://context7.com/wooiljeong/pykakao/llms.txt Searches for places using a keyword query with optional filtering by location, category, and radius. Returns detailed information about matching locations including coordinates, addresses, and place metadata. ```APIDOC ## POST /local/search/keyword ### Description Searches for places using a keyword query with optional filtering by location, category, and radius. Returns detailed information about matching locations including coordinates, addresses, and place metadata. ### Method POST ### Endpoint /local/search/keyword ### Parameters #### Query Parameters - **query** (string) - Required - The search keyword. - **x** (string) - Optional - The X coordinate (longitude) for radius search. - **y** (string) - Optional - The Y coordinate (latitude) for radius search. - **radius** (integer) - Optional - The search radius in meters (if x and y are provided). - **category** (string) - Optional - The category code for filtering. - **size** (integer) - Optional - The number of results to return (max 15). - **page** (integer) - Optional - The page number for pagination. - **dataframe** (boolean) - Optional - If true, returns results as a pandas DataFrame. ### Request Example ```python from PyKakao import Local api = Local(service_key="YOUR_KAKAO_REST_API_KEY") result = api.search_keyword( query="카페", x="127.027621", y="37.497952", radius="1000", size=15, dataframe=True ) ``` ### Response #### Success Response (200) - **meta** (object) - Metadata about the search results. - **total_count** (integer) - The total number of results. - **pageable_count** (integer) - The number of results that can be paged. - **is_end** (boolean) - Whether this is the last page. - **documents** (array) - An array of place objects. - **place_name** (string) - The name of the place. - **address_name** (string) - The full address of the place. - **x** (string) - The longitude of the place. - **y** (string) - The latitude of the place. - **phone** (string) - The phone number of the place. #### Response Example ```json { "meta": {"total_count": 100, "pageable_count": 45, "is_end": false}, "documents": [ { "place_name": "스타벅스", "address_name": "서울 강남구 역삼동", "x": "127.028621", "y": "37.498952", "phone": "02-1234-5678" } ] } ``` ``` -------------------------------- ### PyKakao KoGPT Generate Text Source: https://context7.com/wooiljeong/pykakao/llms.txt Generates text completions using Kakao's KoGPT model. Allows control over generation parameters like temperature, top_p, and maximum tokens. Requires a Kakao REST API key. ```python from PyKakao import KoGPT api = KoGPT(service_key="YOUR_KAKAO_REST_API_KEY") # Generate text response = api.generate( prompt="인공지능의 미래는", max_tokens=100, temperature=0.7, top_p=0.9 ) # Access generated text generated_text = response["generations"][0]["text"] print(generated_text) ``` -------------------------------- ### PyKakao Daum Search Images Source: https://context7.com/wooiljeong/pykakao/llms.txt Searches for images on Daum with options to filter by size, format, and sort order. Results include thumbnail and image URLs, dimensions, and display site information. Supports JSON or pandas DataFrame output. Requires a Kakao REST API key. ```python from PyKakao import DaumSearch api = DaumSearch(service_key="YOUR_KAKAO_REST_API_KEY") # Search for images result = api.search_image( query="강아지", size=10, page=1 ) # Get as DataFrame for data analysis result_df = api.search_image( query="강아지", dataframe=True ) # Expected output: # { # "documents": [ # { # "collection": "blog", # "thumbnail_url": "https://img1.example.com/thumb.jpg", # "image_url": "https://img1.example.com/image.jpg", # "width": 800, # "height": 600, # "display_sitename": "Tistory", # "datetime": "2025-01-15T10:30:00.000+09:00" # } # ] # } ``` -------------------------------- ### PyKakao Daum Search Web Documents Source: https://context7.com/wooiljeong/pykakao/llms.txt Searches Daum for web documents matching a query, returning URLs, titles, and content. Supports pagination and sorting options. Results can be fetched as JSON or pandas DataFrame. Requires a Kakao REST API key. ```python from PyKakao import DaumSearch api = DaumSearch(service_key="YOUR_KAKAO_REST_API_KEY") # Basic web search result = api.search_web(query="Python 프로그래밍") # With pagination and sorting result = api.search_web( query="Python 프로그래밍", page=1, size=10, sort="accuracy" ) # Get results as DataFrame result_df = api.search_web( query="Python 프로그래밍", dataframe=True ) # Expected output: # { # "meta": {"total_count": 1000, "pageable_count": 800, "is_end": false}, # "documents": [ # { # "title": "Python 프로그래밍 기초", # "contents": "Python은 강력한...", # "url": "https://example.com/python", # "datetime": "2025-01-15T10:30:00.000+09:00" # } # ] # } ``` -------------------------------- ### PyKakao Local Search Places by Keyword Source: https://context7.com/wooiljeong/pykakao/llms.txt Searches for places using a keyword and optional location filters. Returns detailed place information, supporting JSON or pandas DataFrame output. Requires a Kakao REST API key. ```python from PyKakao import Local # Initialize with REST API key api = Local(service_key="YOUR_KAKAO_REST_API_KEY") # Basic keyword search result = api.search_keyword(query="카페") # Advanced search with location filtering result = api.search_keyword( query="카페", x="127.027621", y="37.497952", radius="1000", size=15, dataframe=True ) # Expected output (dict format): # { # "meta": {"total_count": 100, "pageable_count": 45, "is_end": false}, # "documents": [ # { # "place_name": "스타벅스", # "address_name": "서울 강남구 역삼동", # "x": "127.028621", # "y": "37.498952", # "phone": "02-1234-5678" # } # ] # } ``` -------------------------------- ### Local.geo_coord2address - Convert coordinates to address Source: https://context7.com/wooiljeong/pykakao/llms.txt Converts geographic coordinates (longitude, latitude) to a human-readable address. Supports multiple coordinate systems including WGS84, TM, and others. ```APIDOC ## POST /local/geo/coord2address ### Description Converts geographic coordinates (longitude, latitude) to a human-readable address. Supports multiple coordinate systems including WGS84, TM, and others. ### Method POST ### Endpoint /local/geo/coord2address ### Parameters #### Query Parameters - **x** (string) - Required - The X coordinate (longitude). - **y** (string) - Required - The Y coordinate (latitude). - **input_coord_id** (string) - Optional - The coordinate system ID for the input coordinates (e.g., 'WGS84', 'TM', 'CONGNAMUL', 'BEYOND'). Defaults to 'WGS84'. - **output** (string) - Optional - The desired output format. Can be 'json' or 'xml'. Defaults to 'json'. - **dataframe** (boolean) - Optional - If true, returns results as a pandas DataFrame. ### Request Example ```python from PyKakao import Local api = Local(service_key="YOUR_KAKAO_REST_API_KEY") result = api.geo_coord2address(x="127.027621", y="37.497952") result_df = api.geo_coord2address( x="127.027621", y="37.497952", dataframe=True ) ``` ### Response #### Success Response (200) - **documents** (array) - An array of address objects. - **address** (object) - The detailed address information. - **address_name** (string) - The full address. - **region_1depth_name** (string) - The first level administrative region (e.g., 'Seoul'). - **region_2depth_name** (string) - The second level administrative region (e.g., 'Gangnam-gu'). - **region_3depth_name** (string) - The third level administrative region (e.g., 'Yeoksam-dong'). - **road_address** (object) - The road address information. - **address_name** (string) - The full road address. - **building_name** (string) - The building name. #### Response Example ```json { "documents": [ { "address": { "address_name": "서울 강남구 역삼동 123", "region_1depth_name": "서울", "region_2depth_name": "강남구", "region_3depth_name": "역삼동" }, "road_address": { "address_name": "서울 강남구 테헤란로 123", "building_name": "역삼빌딩" } } ] } ``` ``` -------------------------------- ### PyKakao Local Convert Coordinates to Address Source: https://context7.com/wooiljeong/pykakao/llms.txt Converts geographic coordinates (longitude, latitude) to a human-readable address, supporting multiple coordinate systems. Results can be obtained as JSON or pandas DataFrame. Requires a Kakao REST API key. ```python from PyKakao import Local api = Local(service_key="YOUR_KAKAO_REST_API_KEY") # Convert coordinates to address result = api.geo_coord2address(x="127.027621", y="37.497952") # With DataFrame output result_df = api.geo_coord2address( x="127.027621", y="37.497952", dataframe=True ) # Expected output: # { # "documents": [ # { # "address": { # "address_name": "서울 강남구 역삼동 123", # "region_1depth_name": "서울", # "region_2depth_name": "강남구", # "region_3depth_name": "역삼동" # }, # "road_address": { # "address_name": "서울 강남구 테헤란로 123", # "building_name": "역삼빌딩" # } # } # ] # } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.